It's been an interesting night. I have extremely limited knowledge of lua and how everything is structured, but I recently found out where the raws live in memory after world-generation, among several other exciting things, and have found the generated interactions. While I'm grateful to finally be able to mod the procedural interactions after worldgen, for now I'm trying to figure out how to apply it to my adventurer. I could have sworn that while digging around in unit.status or something that I found a place for active interactions, but I don't see it now.
Things are getting very fun. It also appears that I may be able, with some effort, to print out a map of curious structure locations for the whole world. I need to gain a few levels in lua scripting first though.
EDIT:
So, I've identified a syndrome that causes vampirism. It is in df.global.world.raws.syndromes.all as syndrome 479, with the value <syndrome: 0x1b0490a8>. (I know the exact values are meaningless to anyone without the save file, just using them for reference)
I'm trying to make unit.syndromes.active[0] equal the vampire syndrome. This is a brand new adventurer, so his syndromes table started empty. I was able to figure out how to add a null entry with unit.syndromes.active:changesize(1), but have been unable to set the first syndrome in the table to the vampire syndrome. I've tried the following commands, posted with the errors they brought up:
[lua]# unit.syndromes.active[0]=df.global.world.raws.syndromes.all[479]
(interactive):1: Cannot write field vector<unit_syndrome*>.0: incompatible point
er type.
stack traceback:
[C]: in function '__newindex'
(interactive):1: in main chunk
[C]: in function 'safecall'
....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:267: in func
tion <....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:193>
[lua]# unit.syndromes.active[0]=syndrome: 0x1b0490a8
(interactive):1: <name> expected near '0x1b0490a8'
[lua]# unit.syndromes.active[0]=0x1b0490a8
(interactive):1: Cannot write field vector<unit_syndrome*>.0: incompatible point
er type.
stack traceback:
[C]: in function '__newindex'
(interactive):1: in main chunk
[C]: in function 'safecall'
....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:267: in func
tion <....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:193>
[lua]# unit.syndromes.active[0]=unit_syndrome: 0x1b0490a8
(interactive):1: <name> expected near '0x1b0490a8'
[lua]# unit.syndromes.active[0]=<syndrome: 0x1b0490a8>
(interactive):1: unexpected symbol near '<'
[lua]# unit.syndromes.active[0]=479
(interactive):1: Cannot write field vector<unit_syndrome*>.0: incompatible point
er type.
stack traceback:
[C]: in function '__newindex'
(interactive):1: in main chunk
[C]: in function 'safecall'
....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:267: in func
tion <....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:193>
[lua]# unit.syndromes.active[0]=df.global.world.raws.syndromes.all[479]
(interactive):1: Cannot write field vector<unit_syndrome*>.0: incompatible point
er type.
stack traceback:
[C]: in function '__newindex'
(interactive):1: in main chunk
[C]: in function 'safecall'
....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:267: in func
tion <....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:193>
[lua]# unit.syndromes.active[0]=df.global.world.raws.syndromes.all[479].type
(interactive):1: Cannot read field syndrome.type: not found.
stack traceback:
[C]: in function '__index'
(interactive):1: in main chunk
[C]: in function 'safecall'
....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:267: in func
tion <....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:193>
[lua]# unit.syndromes.active[0]=<syndrome: 0x1b0490a8>
(interactive):1: unexpected symbol near '<'
[lua]# unit.syndromes.active[0]=syndrome: 0x1b0490a8
(interactive):1: <name> expected near '0x1b0490a8'
[lua]# nit.syndromes.active[0]=df.global.world.raws.syndromes.all[479].syn_name
(interactive):1: Cannot write field vector<unit_syndrome*>.0: incompatible point
er type.
stack traceback:
[C]: in function '__newindex'
(interactive):1: in main chunk
[C]: in function 'safecall'
....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:267: in func
tion <....34.11] [V13]\Dwarf Fortress 0.34.11\hack\lua\dfhack.lua:193>
[lua]# unit.syndromes.active[0]=syndrome: df.global.world.raws.syndromes.all[479
(interactive):1: function arguments expected near '.'
I must be missing something about the basic syntax of adding an element to a table in lua. Can anyone point me in the right direction?