Divinity: Original Sin 2

Divinity: Original Sin 2

55 ratings
Class Creation by Helaene (Part 2) - Class Basics
By helaene
This series will explain from start to finish how to create a class mod (similar to mine) for D:OS2.
Part 2 covers the class preset file, class equipment, default skillset and preset via your debug object.
   
Award
Favorite
Favorited
Unfavorite
Creating a Class File
First, download the sample class file from this page on the wiki: https://docs.larian.game/My_first:_Character_creation_class

Open the sample file in your text editor of choice (I use SublimeText[www.sublimetext.com]).

Update the ClassDescription and ClassLongDescription now (or later if you're not ready). Change all of the instances of the class name throughout the file to your new class name (in my case: Venomancer).

Change starting attribute totals by setting their value attributes to a different number (note: most folks like if you leave these as they are by default).



Change all of the values for each PreviewEquipmentSet line to start with Class_YourClassName_[] (in my case: "Class_Venomancer_Humans" for example) and all StartingEquipmentSet values to Class_YourClassName_Start or Class_YourClassName_Start_Undead for the undead lines.



Update the ability section as appropriate for your class. Ability names can be found here: https://docs.larian.game/Scripting_ability_types

To set 2 points rather than 1, simply update the value attribute for that ability. Note that if you add more than the total number that appears earlier in the file, the game won't like it.

Finally, choose a starting talent for your class. You can find a list of talent names here:
https://docs.larian.game/Talent_list



Now save your file to this location with a name like "Class_Venomancer":
[]\SteamLibrary\SteamApps\common\Divinity Original Sin 2\Data\Mods\[Your Mod Folder]\CharacterCreation\ClassPresets

Note: You'll need to add those CharacterCreation and ClassPresets folders - they won't exist there already by default.

Defining Equipment


In the Stats Editor, open Shared > Equipment > Equipment (in the left column Stats Browser).

Sort by name (by clicking the heading for the Name column) and scroll down to the items beginning with Class_ (or use the Filter panel on the right side to filter results for the word Class in the Name column).

Find a class equipment set that makes sense to start from and copy (CTRL+C) all related entries. (Note: Any entries that end in _Act2 are not needed.) In this case, I will copy the Wizard entries for use on my Venomancer class.



In the left sidebar browser, go to your mod's section and click the plus sign icon next to Equipment to add your own Equipment stats. In the new Equipment stats section that is created, paste (CTRL + V) in all of the rows you previously copied.

Now update all of your rows in the Name column with your class name (in my case, changing the word 'Wizard' to 'Venomancer' as shown.



File > Save from the top menu to save your work.

Advanced Equipment Settings
So far, we've just copied existing equipment sets for the Character Creation screen and starting Beach outfit from a base-game class. You can swap individual equipment items per set as desired, for instance, using the Enchanter upper body with the Wizard lower body clothing. To do this, click on an individual entry and search or scroll for another equipment item. In my case, I'll change the two wands in each row for one poison staff instead.

We can also use different colors for our equipment to help set it apart in Character Creation. To do this, we will copy related Armor stats from Shared > Stats > Armor into a new Armor stats file in our own project (click the plus sign icon next to Stats in your own class area in the sidebar).

Change each of the Name columns to use your class name instead of the base-game class (in my case, 'Venomancer' instead of 'Wizard'. Also scroll far to the right to see the ItemColor column, and change each of those entries to your class name as well.



Now we'll actually set up something for that new class ItemColor to pull from. Click the plus sign icon next to ItemColor in the left sidebar within your mod. Copy a line from Shared > ItemColor > ItemColor into your new ItemColor stat file. Now update the Name column to use your class's name and click on each color value to update it.



Now update the appropriate entries in your Equipment file to point to your recolored Armor pieces.

File > Save from the top menu to save all of your changes.
Creating a Skillset
Now you'll set the three starter skills that appear in Character Creation for your class. These can obviously be changed later after you create skills of your own.

To begin, create a new SkillSet file under your mod (plus sign next to SkillData > SkillSet). Copy an existing SkillSet row from the Shared project, or just start your own. In the Name column, use Class_[your class name] (in my case: Class_Venomancer).



In the Skills column, pick one of your three skills. To add another row within the same skill set (if you didn't copy an existing set), right-click the first row and choose 'Add Sub Stat'. Do this twice for a total of three rows, and populate each with a skill of your choosing.

Note that if you select skills that are not set to be Starter skills, they will not actually work. For testing purposes, it may be easier to choose skills that have 'Enemy' in them, as they usually don't have the same memorization or ability requirements.



Save with CTRL + S, or through the top menu File > Save.
Debug Preset
We're now ready to modify our story script to point to our new class name. Open the Story Script Editor and double-click the story script file you wrote in Part 1 from the sidebar.



In your KB section on the right, ensure the class name is set to your new class name (in my case Venomancer), as we previously tested with an existing base-game class.



Don't forget to Save AND Generate Definitions from the File menu.



If your test level isn't already loaded up in the game preview 'Eyes of a Child' tab, open it from the File menu. Also from the File menu, select 'Reload Level and Story' to ensure your Story Scripts are ready to use.

Now switch to live mode via the video-game controller icon in the upper left.

In the game preview tab, click your debug object. With any luck, you should see your character acquire your class's skills and preset equipment!



At this point, you can also save and close the Editor, and open the real game for testing.
Don't forget to enable your new mod from the Mods options screen in order to see it in-game.

--------------------------------------------------------

Next, on to Part 3: https://steamproxy.net/sharedfiles/filedetails/?id=1448216552
34 Comments
ネクロマンサー 21 Dec, 2022 @ 8:30am 
Engine also crashes after using debug object. Before crash I got this error message
Steam Games/steamapps/common/Divinity Original Sin 2/DefEd/Data/Public/Shared/Voice/SpeakerGroups.lsb has version 3.6.7.0, which is too new for serializer with version 3.6.6.0
Tried to update Divinity Engine, it doesn`t help
Abandonedwolfe 10 Oct, 2022 @ 6:32am 
I followed this step by step from using sublime, to template, and it crashed every time I try to use the item. I can pick it up, and move it around, but using the item crashed the program. I'll double check everything later after I get some sleep, but any possible solutions to this problem or something I might have missed.
Brad 14 Sep, 2022 @ 11:23am 
This comment is awaiting analysis by our automated content check system. It will be temporarily hidden until we verify that it does not contain harmful content (e.g. links to websites that attempt to steal information).
raw.recruit 11 Jun, 2021 @ 2:07pm 
Debug Crash : The importance of following instructions.

Some like me are used to using Notepad or similar to mess with game files like with Skyrim for various things. If you do that here not only will your class not appear in any form within the game you will also get a crash when using the object you have created in the Divinity Engine.

Actually following the instruction and downloading Sublime text and using that = No more crashes. Just save the finished doc as .File>Save As>Save as type = All Files(*."). The file should have the extension LSX when you view it in your folder.
zulOkin 10 May, 2021 @ 10:29am 
debug crashes :steambored:
Abandonedwolfe 20 Feb, 2021 @ 4:23pm 
Would you plan on doing a video guide anytime soon. For the life of me I can't figure this out.
MARCUS 13 Jun, 2020 @ 12:27am 
I had a problem with the debug Obj. I followed the instruction but somehow my character acquire the skill without using the debug obj. Plus, when I click on the debug object, the engine crashed.
Wildcard Hendricks 24 May, 2020 @ 8:25am 
For those people who has the editor crashing when clicking the thingy, IF you are using Definitive edition the path is "DefEd/Data/Mods/Class_Something/CharacterCreation/ClassPresets/something.lsx" Thanks for the guide btw!
Thehail 27 Nov, 2019 @ 11:27am 
@LUL make sure you've followed the entire tutorial. I was having the same problem, until I was reading all the photos text and found out that my "ClassType" wasn't change.
Pingu 29 Jul, 2019 @ 12:45am 
Hey Helaene, every time I click on my debug object the engine crashes, I restarted the engine to see if it was the class config file but no, is there any difference for DE ? Thank you in advance.