1
Mod Releases / Re: [47.05] Witcher Mod (Total Conversion)
« on: May 14, 2023, 07:22:38 pm »
Do you have any ideas for if it is 50.08 compatible?
March 6, 2024: Dwarf Fortress 50.12 has been released.
News: February 3, 2024: The February '24 Report is up.
News: February 4, 2021: Dwarf Fortress Talk #28 has been posted.
News: November 21, 2018: A new Threetoe story has been posted.
Forum Guidelines
So, with a little change, it can create my raw defined secret called 'all secrets of life and death'?Great! But will it be random secret? Some secrets give you ability to raise lieutenants with only power to cause blisters, when better undeads can have more useful and numerous attacks, also calling upon the night and experimenting (the last one only in worldgen).
It's like semi-random? If you run it in different worlds you'll get different secrets, but if you run it multiple times in the same world you'll get the same secret. This is because it just iterates over the secrets vector until it finds one called "the secrets of life and death".
[CASTE:WITCHER]
[MALE]
[NAME:witcher:witchers:witcher]
[SET_BP_GROUP:BY_TYPE:LOWERBODY][BP_ADD_TYPE:GELDABLE]
[BODY_DETAIL_PLAN:FACIAL_HAIR_TISSUE_LAYERS]
[CAN_DO_INTERACTION:AARD]
[CDI:ADV_NAME:Propel away]
[CDI:TARGET:B:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:B:25]
[CDI:BP_REQUIRED:BY_TYPE:GRASP]
[CDI:USAGE_HINT:ATTACK]
[CDI:VERB:point:points:NA]
[CDI:MAX_TARGET_NUMBER:B:1]
[CDI:WAIT_PERIOD:50]
[POP_RATIO:0]
interaction_new
[OBJECT:INTERACTION]
[INTERACTION:AARD]
[I_SOURCE:CREATURE_ACTION]
[I_TARGET:A:LOCATION]
[IT_LOCATION:CONTEXT_LOCATION]
[I_TARGET:B:CREATURE]
[IT_LOCATION:CONTEXT_CREATURE]
[IT_MANUAL_INPUT:target]
[I_EFFECT:PROPEL_UNIT]
[IE_PROPEL_FORCE:100000]
[IE_TARGET:A]
[IE_TARGET:B]
[IE_IMMEDIATE]
*** Error(s) finalizing the creature HUMAN
Interaction Token not recognized : AARD
so do you want a script that gives you the bind and banish dialog commands since uhh I learn the slab that binds demons just unlocks those dialog options. which means Dfhacking those options to exist lets you bind and banish anyone you're talking to?
Great! But will it be random secret? Some secrets give you ability to raise lieutenants with only power to cause blisters, when better undeads can have more useful and numerous attacks, also calling upon the night and experimenting (the last one only in worldgen).
local slab = df.item_slabst.find(4)
local pos = copyall(df.global.cursor)
dfhack.items.moveToGround(slab,{x=pos.x,y=pos.y,z=pos.z})
secrets -material_id INORGANIC:SILVER -booktitle_name "The Necronomicon"--Author: UristVanHelsing
--Heavily based on the amazing work done by Atomic Chicken, Meph, and Burrito25man
--Version: 0.44.XX
local utils = require 'utils'
validArgs = validArgs or utils.invert({
'material_id',
'booktitle_name',
'copy',
'help'})
local args = utils.processArgs({...}, validArgs)
local artifact = true
if args.help then
print([[ secrets.lua
This script is designed to work with a reaction to spawn the secrets of life and death.
arguments:
-material_id
Material book will be made of.
-booktitle_name
Title of the book to be made. String must be contained within ' ' .
-copy
If this optional argument is included, the script will make the book be treated as a copy
To use:
Place the cursor where you want the book and run the below command
secrets -material_id INORGANIC:SILVER -booktitle_name "The Necronomicon"
]])
return
end
local material_id = args.material_id
local booktitle_name = args.booktitle_name
local secret_id = 'the secrets of life and death'
if not args.material_id then error 'ERROR: material_id not specified.' end
if not args.booktitle_name then error 'ERROR: booktitle_name not specified.' end
if not args.secret_id then error 'ERROR: secret_id not specified.' end
if args.copy then artifact = false end
function getSecretId(secret_id)
for _,i in ipairs(df.global.world.raws.interactions) do
for _,is in ipairs (i.sources) do
if getmetatable(is) == 'interaction_source_secretst' then
if is.name == secret_id then
return i.id
end
end
end
end
end
local pages = math.random(169,666)
local style = math.random(0,18)
function createWriting(booktitle_name,secret_id)
local w = df.written_content:new()
w.id = df.global.written_content_next_id
w.title = booktitle_name
w.page_start = 1
w.page_end = pages --number of pages
w.styles:insert('#',style) --writing style
w.style_strength:insert('#',0) --'the writing drives forward relentlessly'
w.poetic_form = 50 --'the prose is masterful'
local ref = df.general_ref_interactionst:new()
ref.interaction_id = getSecretId(secret_id)
ref.source_id = 0
ref.unk_08 = -1
ref.unk_0c = -1
w.refs:insert('#',ref)
w.ref_aux:insert('#',0)
df.global.written_content_next_id = df.global.written_content_next_id+1
df.global.world.written_contents.all:insert('#',w)
return w.id
end
local m = dfhack.matinfo.find(material_id)
if not m then
error('Invalid material.')
end
local book = df.item_bookst:new()
book.id = df.global.item_next_id
df.global.world.items.all:insert('#',book)
df.global.item_next_id = df.global.item_next_id+1
book:setMaterial(m['type'])
book:setMaterialIndex(m['index'])
book:categorize(true)
book.flags.removed = true
book:setSharpness(0,0)
book:setQuality(0)
book.title = booktitle_name
local imp = df.itemimprovement_pagesst:new()
imp.mat_type = m['type']
imp.mat_index = m['index']
imp.count = pages --number of pages
imp.contents:insert('#',createWriting(booktitle_name,secret_id))
book.improvements:insert('#',imp)
if artifact == true then
local a = df.artifact_record:new()
a.id = df.global.artifact_next_id
df.global.artifact_next_id = df.global.artifact_next_id+1
a.item = book
a.name.first_name = booktitle_name
a.name.has_name = true
a.flags:assign(df.global.world.artifacts.all[0].flags)
a.anon_1 = -1000000
a.anon_2 = -1000000
a.anon_3 = -1000000
df.global.world.artifacts.all:insert('#',a)
local ref = df.general_ref_is_artifactst:new()
ref.artifact_id = a.id
book.general_refs:insert('#',ref)
df.global.world.items.other.ANY_ARTIFACT:insert('#',book)
local e = df.history_event_artifact_createdst:new()
e.year = df.global.cur_year
e.seconds = df.global.cur_year_tick
e.id = df.global.hist_event_next_id
e.artifact_id = a.id
df.global.world.history.events:insert('#',e)
df.global.hist_event_next_id = df.global.hist_event_next_id+1
end
local pos = copyall(df.global.cursor)
dfhack.items.moveToGround(book,{x=pos.x,y=pos.y,z=pos.z})
print('A magical book as been created!')
@UristVanHelsing: What's the max pop site you will accept? Because I know advmode sites with 10k population are not really visitable, and that's what will happen if you leave dark fortress to stand for two centuries. Would be kinda sucky to have all the artifacts just out of reach.I have a i7-8750H CPU @ 2.20GHz. What's the highest pop I can have an still have decent frames? I suspect something like 2k? I have no idea.