Bay 12 Games Forum

Dwarf Fortress => DF Gameplay Questions => Topic started by: Pvt. Pirate on February 21, 2018, 12:14:18 pm

Title: Getting information on Deities from within Fort mode?
Post by: Pvt. Pirate on February 21, 2018, 12:14:18 pm
I usually only play Fortress mode and do not use legends viewer etc. so when building temples, i do not know how to find out about the domains of the deities so i can build temples designed to represent their domains in imagery of statues etc.
so is there a way to read out this game data without making a backup and going into the save with legends viewer?
Title: Re: Getting information on Deities from within Fort mode?
Post by: PatrikLundell on February 21, 2018, 12:37:40 pm
With DFHack you can invoke Legends Mode from the DFHack console with 'open-legends'. From there you can browse legends or export it with 'exportlegends info' for use with e.g. Legends Viewer.
This means you can skip the backup step (you just escape out of legends mode back to the fortress once done). I understand this is not what you want, but it's the best I know of.

I think you can get some info on deities from within DF by following the links on units' relations screens.
Yes. Deity line, 'v' -> "Vankab the Salute of Evil is a deity of The Red Fence. Vankab most often takes the form of a female dwarf and is associated with jealousy."
Title: Re: Getting information on Deities from within Fort mode?
Post by: Pvt. Pirate on February 21, 2018, 03:33:15 pm
oh, okay, thanks. so i'll see if i can export it and open it in legends viewer. at least i dont need to do all the backup stuff etc.
would still be a nice feature to have these infos available on civ screen in fort mode.
Title: Re: Getting information on Deities from within Fort mode?
Post by: anewaname on February 22, 2018, 12:38:39 am
Within vanilla DF, when you are in the creation menu for a temple location, scroll down the list of deities and you can see all of the deities and each one's domains. The list includes all deities from your civ's pantheon, including those that none of your dwarfs worship. It is quick to write them down on paper and then you have the list.

I do not know if other deities are added to that list after non-dwarf worshippers are accepted as citizens.
Title: Re: Getting information on Deities from within Fort mode?
Post by: Shonai_Dweller on February 22, 2018, 04:05:08 am
Within vanilla DF, when you are in the creation menu for a temple location, scroll down the list of deities and you can see all of the deities and each one's domains. The list includes all deities from your civ's pantheon, including those that none of your dwarfs worship. It is quick to write them down on paper and then you have the list.

I do not know if other deities are added to that list after non-dwarf worshippers are accepted as citizens.
It adds gods to the list as soon as worshippers of those gods turn up.
Title: Re: Getting information on Deities from within Fort mode?
Post by: PatrikLundell on February 23, 2018, 04:50:46 am
This DFHack script might be useful:
Spoiler (click to show/hide)

It lists the deities and their associated spheres, with the civ deities first. It's color coded to indicate whether a temple dedicated to the deity (light green) exists, or not (yellow).
The deities without spheres are probably all monsters.
Title: Re: Getting information on Deities from within Fort mode?
Post by: Pvt. Pirate on February 23, 2018, 06:35:44 am
sounds good, but what do it do with a dfhackscript? how do is apply it to use in the game? :D
Title: Re: Getting information on Deities from within Fort mode?
Post by: PatrikLundell on February 23, 2018, 07:14:08 am
To use it you need DFHack. Once you have that you can invoke it from the dfhack console where it prints a list of the info collected.
The script is saved in a "text" file called e.g. "show_deities.lua" that's saved into the <DF>/hack/scripts directory.

It's completely useless to vanilla DF, however.
Title: Re: Getting information on Deities from within Fort mode?
Post by: Pvt. Pirate on February 23, 2018, 08:31:37 am
so it already is within DFHack? then what do i have to write to the console to start it?
Title: Re: Getting information on Deities from within Fort mode?
Post by: PatrikLundell on February 23, 2018, 10:40:42 am
No, it's not within DFHack, which is why I posted it and said it has to be saved as a text file.
If you save the script as "show_deities.lua" then you type "show_deities" in the DFHack console window (DFHack uses the file name, not the name of the function inside the file). Note that you shouldn't type ".lua" as the file extension is picked up implicititly.
Title: Re: Getting information on Deities from within Fort mode?
Post by: Pvt. Pirate on February 23, 2018, 05:34:51 pm
thanks, that was all i wanted to know. i never meddled with dfhack's files before.
Title: Re: Getting information on Deities from within Fort mode?
Post by: Pvt. Pirate on March 08, 2018, 02:20:50 pm
getting a DFHack error when doing so:
Code: [Select]
Invoking: show_deities
...2.3 - 44.05\Dwarf Fortress/hack/scripts/show_deities.lua:6: Cannot read field vector<world_site*>.entity_links: not found.
stack traceback:
[C]: in metamethod '__index'
...2.3 - 44.05\Dwarf Fortress/hack/scripts/show_deities.lua:6: in global 'show_deities'
...2.3 - 44.05\Dwarf Fortress/hack/scripts/show_deities.lua:111: in local 'script_code'
... Launcher 2.3 - 44.05\Dwarf Fortress\hack\lua\dfhack.lua:562: in function 'dfhack.run_script_with_env'
(...tail calls...)
any ideas?
Title: Re: Getting information on Deities from within Fort mode?
Post by: PatrikLundell on March 08, 2018, 02:59:40 pm
Yes. The error is mine in that for some reason the forum gobbles up parts of the code and interprets it as a list unless you say it's REALLY code...

This is what it should have looked like (I think this is a slightly updated version). You shouldn't copy the second code tag: that's what tells the forum it really IS code.

Spoiler (click to show/hide)
Title: Re: Getting information on Deities from within Fort mode?
Post by: Pvt. Pirate on March 09, 2018, 01:48:52 pm
thanks, copying and trying later :)
Title: Re: Getting information on Deities from within Fort mode?
Post by: Dunamisdeos on March 09, 2018, 02:26:57 pm
In my experience the ones without spheres are either monsters or random farm animals.