Bay 12 Games Forum

Dwarf Fortress => DF Modding => Topic started by: BeardedShrimp on September 09, 2021, 03:28:06 pm

Title: modtools/moddable-gods fix
Post by: BeardedShrimp on September 09, 2021, 03:28:06 pm
Almost year ago I posted a question about this DFHack script on this forum http://www.bay12forums.com/smf/index.php?topic=177655.msg8221773 (http://www.bay12forums.com/smf/index.php?topic=177655.msg8221773)

Almost a year later, I came back to this problem, inspected the script in VS Code and messed around with LUA and gui/gm-editor, and found that if you replace the line:
Code: [Select]
godFig.info.spheres:insert('#',df.sphere_type[sphere])with
Code: [Select]
godFig.info.spheres.anon_1:insert('#',df.sphere_type[sphere])
It seems to work as intended.
Code: [Select]
modtools/moddable-gods -name testGod2 -spheres [ DREAMS ART ] -depictedAs HUMAN -gender male(https://i.imgur.com/2lTPbWs.png)
You would also need to change
Code: [Select]
godFig.caste = 0 to the argument given at the command line or else Legends Viewer may display the wrong value:
(https://i.imgur.com/bik018t.png)
Title: Re: modtools/moddable-gods fix
Post by: Putnam on September 14, 2021, 02:13:19 pm
Hmm, alright. That's super hackish, anon entries shouldn't be used... I'll open a PR to change it to an "unk", I guess.