Yeah, you can do that now if you know the name of em, I actually made a point to stick to the way the createitem script works as much as possible, so you can make an artifact gold bed, tetrahedrite mechanism, platinum war hammer, or blazing metal long sword.
Was thinking about this some more, I think having a set of pre-defined artifacts with suitable metals and such that would be preferentially dropped in dorf sites, stuff like more obscure/non-native type but still usable boons which get dropped in megabeast lairs, things like crowns and amulets and daggers in tombs, maybe thrones and statues in human/goblin sites, artifact wooden armor and bows and stuff in elf sites.
Once I get down and dig into the world_gen stuff with gm-editor I'll get a better idea of how to set the triggers, then it'll just be a matter of getting the script set up to... hell, can't eventful pick up when world-gen starts?
Hmmm, even if you had to manually trigger it it wouldn't be too hard, just hit a keybind once the history starts ticking within the first ten or fifteen years.
I could have it go through the hist_fig lists and cross-reference it with their own site_links, then once the various triggers activate have it do a hmmm, this is in no way going to be remotely working code, just an outline to get it in my head.
function setBaseLists()
local dorflist = {}
whatever.the.hell advfort.does.to.determine for dorfs_can_make == true
return dorflist
local beastlist = {}
do.the.same.for.dorflist.but for dorfs_can_make == false
return beastlist
local tomblist = {}
for _,k in ipairs(jewelrystuff) do
if k.bling then sort.and.label[k]
return tomblist
local treehumperlist = {}
get.stuff.stinky elves_can_make == true
return treehumperlist
local otherlist = {}
if not stuff.covered.above then others_can_make == true
return otherlist
end
function assignMaterials(allthosedamnlists)
if dorflist do steel except war hammers do platinum
if beastlist do divine_1 except mauls do gold or something
if tomblist do crazy_precious_shit like ruby crowns and platinum amulets
if treehumperlist do interesting_woods like nether_cap and feather and glumprong
if otherslist do slade thrones and statues and shit for demon sites gold and bronze for humans
end
scriptArgs={...}
utils=require('utils')
validArgs = validArgs or utils.invert({
'rate', --how many years between artinsert running
'freq', --how many artifakes to create each time artinsert runs
'type', --whether it should be limited to one, a few, or all of the types from the lists above
})
if year = date+args.rate do
siteCheck(args.freq, args.type)
return sites
function siteCheck()
for k, v in ipairs(conditions) do
if k.some.trigger == some.state[v] do
return k
function unitCheck()
for i,j in ipairs(histfigs) do
if site_links[k] do
if i.goals == suitable.goals then
local cid = i.unit_id
local creator = df.units.find(cid)
return creator
function getBase()
if creator.race == dorfs then
baseopts == dorflist
if creator.is_power == true then
baseopts == beastlist
if df.hist_figs.find(creator).site_links == tomb then
baseopts == tomblist
if creator.race == treehumpers then
baseopts == treehumperslist
if df.hist_figs.find(creator).site_links == dark_fortress or town then
baseopts == otherslist
randomNumsomethingHere()
baseopts[randomoutput] == base
return base
artifake -base -creator
names -random --(I'll need to add that in as a flag so it just calls the random input/applies it)
update_next_id stuff
date = date+args.year