Larian Banner
Previous Thread
Next Thread
Print Thread
Joined: Dec 2013
old hand
OP Offline
old hand
Joined: Dec 2013
So we have a tutorial on adding custom races races to the game, but does anyone have a handle on how we can remove certain races from character creation in a standalone adventure?

I'm pretty sure that the race presets get packed into shared.pak with the path "..\Mods\Shared\CharacterCreation\RacePresets". Would I need to unpack the whole thing, delete the unwanted races from the RacePresets directory and then re-distribute this shared.pak with my mod? Any suggestions or leads would be appreciated.


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Joined: Mar 2016
Location: Belgium
T
addict
Offline
addict
T
Joined: Mar 2016
Location: Belgium
Files with the same name in your mod should override the ones in the Shared. So one thing you could try is to add empty files to your mod with the same name as the ones you want to get rid of. Or you could maybe add copies of one for a race you do want to keep with the same name as the ones you want to hide (no idea if that will add this race multiple times though).

Joined: Dec 2013
old hand
OP Offline
old hand
Joined: Dec 2013
Originally Posted by Tinkerer
Files with the same name in your mod should override the ones in the Shared. So one thing you could try is to add empty files to your mod with the same name as the ones you want to get rid of. Or you could maybe add copies of one for a race you do want to keep with the same name as the ones you want to hide (no idea if that will add this race multiple times though).


Yeah, I did try that trick of making copies and renaming the fields but as you theorized, it made additional copies of the race. I have not tried empty files though, so I'll see what that does.

Ironically, the challenge ended up changing how I want to do character creation anyway so I think I have a workaround, but I do want to know if this works so I will give it a shot. Thanks for the feedback!


DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Joined: Dec 2013
old hand
OP Offline
old hand
Joined: Dec 2013
After further investigation, I think the actual files of interest are the OriginPresets because it's in there that the available races are enumerated. For instance, Generic.lsx:


<?xml version="1.0" encoding="UTF-8" ?>
<save>
<header version="2" time="1387205254" />
<version major="1" minor="3" revision="0" build="0" />
<region id="CharacterCreationManager">
<node id="root">
<children>
<node id="OriginDesc">
<attribute id="OriginDisplayName" value="Custom" handle="he058b2afgcdf2g4c7ag939dga65bcfc0fad6" type="28" />
<attribute id="OriginName" value="Generic1" type="22" />
<attribute id="OriginDescription" value="Your past is history. All that matters is your present in Fort Joy. A Sourcerer in a land ravaged by Source, you await the cure promised by the Divine Order." handle="h5a614f15gea57g42d5gb7b0g29cff46fdf7c" type="28" />
<attribute id="OriginLongDescription" value="Very long descritpion goes here." handle="h032adcc1gd80cg4b81g8658g689437b36e4d" type="28" />
<attribute id="CharacterUUID" value="7b6c1f26-fe4e-40bd-a5d0-e6ff58cef4fe" type="22" />
<attribute id="UserCanAlterTags" value="1" type="19" />
<attribute id="SkillSet" value="Avatar_Generic" type="22" />

<children>
<node id="SupportedGenders">
<children>
<node id="Gender">
<attribute id="Gender" value="Female" type="23" />
</node>
<node id="Gender">
<attribute id="Gender" value="Male" type="23" />
</node>
</children>
</node>

<node id="SupportedRaces">
<children>
<node id="SupportedRaces">
<attribute id="Object" value="Human" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Dwarf" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Lizard" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Elf" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Undead_Human" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Undead_Dwarf" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Undead_Lizard" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Undead_Elf" type="22" />
</node>
</children>
</node>
</children>
</node>
</children>
</node>
</region>
</save>


Unfortunately, I either don't know enough about how XML works or the game merges the shared and local mod versions in such a way that simply deleting the "SupportedRaces" nodes for undesired races does not remove them from character creation.



DOS2 Mods: Happily Emmie After and The Noisy Crypt

Steam Workshop
Nexus Mods
Joined: Mar 2020
stranger
Offline
stranger
Joined: Mar 2020
Originally Posted by Windemere
After further investigation, I think the actual files of interest are the OriginPresets because it's in there that the available races are enumerated. For instance, Generic.lsx:


<?xml version="1.0" encoding="UTF-8" ?>
<save>
<header version="2" time="1387205254" />
<version major="1" minor="3" revision="0" build="0" />
<region id="CharacterCreationManager">
<node id="root">
<children>
<node id="OriginDesc">
<attribute id="OriginDisplayName" value="Custom" handle="he058b2afgcdf2g4c7ag939dga65bcfc0fad6" type="28" />
<attribute id="OriginName" value="Generic1" type="22" />
<attribute id="OriginDescription" value="Your past is history. All that matters is your present in Fort Joy. A Sourcerer in a land ravaged by Source, you await the cure promised by the Divine Order." handle="h5a614f15gea57g42d5gb7b0g29cff46fdf7c" type="28" />
<attribute id="OriginLongDescription" value="Very long descritpion goes here." handle="h032adcc1gd80cg4b81g8658g689437b36e4d" type="28" />
<attribute id="CharacterUUID" value="7b6c1f26-fe4e-40bd-a5d0-e6ff58cef4fe" type="22" />
<attribute id="UserCanAlterTags" value="1" type="19" />
<attribute id="SkillSet" value="Avatar_Generic" type="22" />

<children>
<node id="SupportedGenders">
<children>
<node id="Gender">
<attribute id="Gender" value="Female" type="23" />
</node>
<node id="Gender">
<attribute id="Gender" value="Male" type="23" />
</node>
</children>
</node>

<node id="SupportedRaces">
<children>
<node id="SupportedRaces">
<attribute id="Object" value="Human" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Dwarf" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Lizard" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Elf" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Undead_Human" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Undead_Dwarf" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Undead_Lizard" type="22" />
</node>
<node id="SupportedRaces">
<attribute id="Object" value="Undead_Elf" type="22" />
</node>
</children>
</node>
</children>
</node>
</children>
</node>
</region>
</save>


Unfortunately, I either don't know enough about how XML works or the game merges the shared and local mod versions in such a way that simply deleting the "SupportedRaces" nodes for undesired races does not remove them from character creation.


I am curious to know if you found out how? As I am attempting it myself and haven't the feintest idea yet.

Joined: Mar 2021
N
stranger
Offline
stranger
N
Joined: Mar 2021
I try to delete some races for the Game Master Mode (probably not at the same place that the Main Campaign of DOS2), did you succeed ?

Last edited by Nemesis666first; 14/03/21 03:22 PM.

Kickstarterer on Divinity Original Sin
Joined: Mar 2021
N
stranger
Offline
stranger
N
Joined: Mar 2021
It seems it's exactly at the same place, because when I modify something, like the SkillSet of races, it modifies for every modes (Campaign & GM), but I cant disallow a race, I tried by putting "//" symbols before some lines, and it just loads the file from the Shared.pak file......... WTF Larian !? Are you facking serious ?

Same thing for Origins : I'm at 75% sure that Generic.lsx files are the ones used for creating Custom character(s), if I delete :

<node id="SupportedRaces">
<attribute id="Object" value="Human" type="22" />
</node>

=> Then the game just reload this part from the Shared.pak...............................

I want to scream at the face of the devs "WHYYYYYYYYYYYYYYYYY !!!???"... (I could, I live not far from you Larian :p )

I also tried to rename "SupportedRaces" by "UnSupportedRaces", because... Well... Why not, I'm desperate...
And, of course, didnt work...


Kickstarterer on Divinity Original Sin
Joined: Mar 2021
N
stranger
Offline
stranger
N
Joined: Mar 2021
Just for fun, I tried to add :

<node id="SupportedRaces">
<children>
<node id="SupportedRaces">
<attribute id="Object" value="Human" type="22" />
</node>
</children>

Just after :

<region id="CharacterCreationClass">
<node id="root">

of a base class, of course it didnt work...

Okay, I still have 2 possibilities :
- Create my own Character Creation module (I think I saw something like that on the Larian's Wiki ; EDIT : https://docs.larian.game/Tutorial_-_Implementing_a_Basic_Quest#Character_Creation ).
- Create my own Shared.pak file...

I took a look to the load order ( https://docs.larian.game/Modding_internals ) and nothing about "reloading the previous file if... We want..."...

Last edited by Nemesis666first; 15/03/21 03:24 PM.

Kickstarterer on Divinity Original Sin
Joined: Mar 2021
N
stranger
Offline
stranger
N
Joined: Mar 2021
Hmmmm no, it's for Story mode only, since GM Mode already have a CC...

Weeeellllll...


Kickstarterer on Divinity Original Sin

Moderated by  Larian_Koala, Larian_KVN 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5