Dwarf Fortress

Dwarf Fortress

Exiled's Modded Fortress - 50.13
Canadian Goose-1  [developer] 14 Jan, 2024 @ 7:12am
Adding Workshops to New Races
There are two methods to add the works to new races.
You can use Method 1, provided by SirFell on the Experimental Collection. This uses a couple lines of code in NotePad++ or another similar tool to automate the patching. However, please follow their advice on replacing each file instead of replace all. This may be a tad slower, however, it can prevent adding bloat/ unnecessary code.

Avoid adding code to Creation Forge or Armok's Bucket, unless you want all races to have access to both of these workshops and all possible items - this will cause the game to take a couple minutes longer to load.

Method 1 - SirFell Method)
1) Find and open
entity_patch_*
files in your
.\data\installed_mods\
folder or use that as filter for folder search in NP++/EmEdit/etc.

2) in Search field use
(\[SELECT_ENTITY:\w+\]([\s\S]*))
, Make sure Regex is enabled.

3) in Replace field use
\1\n\n\n[SELECT_ENTITY:DWARVES_OF_THE_DEEP]\2\n\n\n[SELECT_ENTITY:SM_CV_MOON_ELF]\2\n\n\n[SELECT_ENTITY:THE_MIDNIGHT_ARISTOCRACY]\2\n\n\n[SELECT_ENTITY:SM_CV_STELLA]\2\n\n\n[SELECT_ENTITY:THE_GOBLIN_KINGDOM]\2\n\n\n[SELECT_ENTITY:SM_CV_SUN_ELF]\2\n\n\n[SELECT_ENTITY:HOBGOBLIN]\2\n\n\n[SELECT_ENTITY:HIGH_ELVEN_EMPIRE]\2\n\n\n[SELECT_ENTITY:SM_CV_ORC]\2\n\n\n[SELECT_ENTITY:TO_CV_LIZARDMAN]\2\n\n\n[SELECT_ENTITY:SUCCUBUS]\2\n\n\n[SELECT_ENTITY:SM_CV_GNOLL]\2\n\n\n[SELECT_ENTITY:SM_CV_IXTHID]\2\n\n\n[SELECT_ENTITY:SM_CV_NAGA]\2\n\n\n[SELECT_ENTITY:SM_CV_RATFOLK]\2\n\n\n[SELECT_ENTITY:SM_CV_VALKYRIE]\2\n\n\n[SELECT_ENTITY:SM_CV_DROW]\2\n\n\n[SELECT_ENTITY:SM_CV_MOUNTAIN_ORC]\2\n\n\n[SELECT_ENTITY:SM_CV_WILD_ELF]\2\n\n\n[SELECT_ENTITY:SM_CV_WOOD_ELF]\2\n\n\n[SELECT_ENTITY:FOREST_ANIMAL_PEOPLES]\2\n\n\n[SELECT_ENTITY:AZULA]\2\n\n\n[SELECT_ENTITY:ILLITHID]\2\n\n\n[SELECT_ENTITY:ROBOTIC]\2\n\n\n[SELECT_ENTITY:DARKLING]\2\n\n\n[SELECT_ENTITY:CRUNDLEKIN]\2\n\n\n[SELECT_ENTITY:HALFLING]\2\n\n\n[SELECT_ENTITY:SQUIRRELMEN]\2\n\n\n[SELECT_ENTITY:RATMEN]\2\n\n\n[SELECT_ENTITY:OTTERMEN]\2\n\n\n[SELECT_ENTITY:MOUSEMEN]\2\n\n\n[SELECT_ENTITY:MOLEMEN]\2\n\n\n[SELECT_ENTITY:HAREMEN]\2\n\n\n[SELECT_ENTITY:FOXMEN]\2\n\n\n[SELECT_ENTITY:BADGERMEN]\2

4) Hit Replace.
Doing this one file at the time would make sure you have no false-positives, but ofc will take some time, doing folder replace/all open files is fastest but may have false-positives
Do note that this uses VERY loose regex, so clicking multiple times will cause duplicates, there isnt any good delimiter to use, so had to do
([\s\S]*)
which matches everything including newline


Method 2)
To add workshops to a race you wish to play
1) go to your Dwarf Fortress\data\installed_mods folder
2) go into the race folder and look for the [ENTITY:<name of race>], copy this line
3) paste the [ENTITY:<name of race>] into a note and change it to [SELECT_ENTITY:<name of race>]
4) go to the workbench mods and look for entity_patch files.
5) each entity_patch file requires you to paste that [SELECT_ENTITY]
6) copy a [PERMITTED_REACTION] list related to your race
7) paste the [PERMITTED_REACTION] under the [SELECT_ENTITY]
Last edited by Canadian Goose-1; 24 May, 2024 @ 8:07am