Divinity: Original Sin 2

Divinity: Original Sin 2

33 ratings
Class Creation by Helaene (Part 3) - Skills
By helaene
This series will explain from start to finish how to create a class mod (similar to mine) for D:OS2.
Part 3 covers creating your first skill, as well as basic information about Statuses and Stats.
   
Award
Favorite
Favorited
Unfavorite
Skill Basics
The best thing you can do before creating your own skill is thoroughly reading through the list of existing skills. That will give you a solid idea of what is possible based on existing configuration options and references.

View existing skills in the SkillData area of the Stats Editor.



You'll notice that there are many sub-items for each type of skill. Browse through each one to see how Rain skills differ from Storm skills and Jump skills, etc. The most common skill types are Shout (AoE) and Target skills.

Creating a Skill
For our first skill, we will modify the existing Water Rain skill to create an Acid Rain skill for our Venomancer.

To begin, copy the full line item for the Water skill from the Rain skill stat file.



Next, click the plus sign next to SkillData within your own mod's stats, and add a Rain stat file. Open your new Rain file and paste in the Water Rain skill information, then Save your changes.



We can then start editing the individual fields for our new skill to make it distinct from the existing skill. I will change the name to Venomancer_AcidRain (always a good idea to include your mod name or your initials to avoid clashing with other mods). I'll also increase the AP required to cast the spell, update the Ability column to Earth instead of Water, set the Surface Type and Damage Type to Poison, and set the Damage Multiplier to something less than 100% since it will affect multiple targets.



Next, we will update the Skill Properties to set POISONED status instead of Wet. We can leave the 100 (percent chance) and 1 (duration) or tweak them as you like. I'll also set the TargetProperties to NonSelf;Enemy to make the rain only set Poisoned on enemy targets. I can also modify the AreaRadius to affect a smaller area. I'll change the MemorizationRequirements to EarthSpecialist 1 instead of WaterSpecialist 1 as well.



Update the DisplayName, Description and StatsDescription as you like. Note that the StatsDescription includes references to dynamic values, listed in the StatsDescriptionParams column. We'll skip updating the icon for now.



Finally, we'll update the RainEffect to use an existing poison rain effect (copied from the Enemy_WaterBlessed skill).







Add to Skill Set
Now we can quickly add our new skill to our class's starting skill set. Open the SkillSet stat file from under the SkillData section within your mod. We already created a placeholder skill set for our class, we can now simply select our new skill from the dropdown instead of one of the existing skills.

Debug Test Skill
This first skill will automatically be added because we've set it as one of the class preset starter skills, but once you have more than 3 skills to test, you'll need another mechanism.

One way to do this is by leveraging our debug object that we placed in our test level.

In the Story Script editor, we can add some lines to give our player character all of our skills.



CharacterAddSkill(_Char, "Rain_Venomancer_AcidRain");

IMPORTANT: All skill references start with the Type of skill. So in our Rain file it was called 'Venomancer_AcidRain' but in scripting and elsewhere, we must refer to it as 'Rain_Venomancer_AcidRain'.



Don't forget to Save and Rebuild after adding the new line!



Now reload your test level in the main application window and turn on 'game mode'.
Your player character should acquire your new skill when they interact with your debug object!

Intro to Statuses
We used the existing POISONED status in our skill, but how did I know that existed, and how do we know what it does?

You can look through all existing statuses under the StatusData section of the Shared project in the Stats editor.



As with skills, you can see there are many different types of statuses, each with their own settings. The most common statuses are CONSUME and DAMAGE. Examine each type and study the differences between them. Look back at the Skills to see which statuses are referenced, and how. Status names are generally written in all-caps.

Sometimes you'll see a DisplayName or Description with |around it|. This means it is looking elsewhere for a localizable (translatable) piece of text. You can see examples of these pieces of text in the Translated String Key editor.



We're going to create a new Acid Rain status based on the existing Poisoned status. Copy the entry for POISONED and paste it into a new Status_Damage stat file under your mod, StatusData (just as we did with Skills).



Now we'll modify the cells, just like we did with our skill. First, I'll rename the status to VENOMANCER_ACIDRAIN. I'll also change the DisplayName to Acid Rain. We will leave the existing effects and material settings for now.



We can modify the SavingThrow to Physical Armor. I'll also update the Stats column to Venomancer_Stats_AcidRain which we'll create momentarily. I'll leave the Stack_Poisoned so that it is treated as another type of Poisoned status.

We'll also want to add custom damage stats, so I'll modify the DamageStats column as well.



Finally, you'll want to updating your Skill to actually *use* this new status. Go back to your Acid Rain skill, and update the SkillProperties column as shown below, and SAVE.

VENOMANCER_ACIDRAIN,100,3;



Stats for Statuses
Now that we've created our new status and set it to look for custom Stats and DamageStats, we'll need to set those up.

We can start by looking for the existing Stats_Poisoned entry in Shared/Stats/Potion and copy/paste that into a new file under your own mod (click the plus sign next to Stats/Potions within your mod to create it). Rename that entry to Venomancer_Stats_AcidRain (just as you referenced it in your Status). You could change the icon here if you like.



Now do the same for the existing Damage_Poisoned entry in Shared/Stats/Weapon. Rename your new Damage entry to Venomancer_Damage_AcidRain (again, as you did in your status). Tweak the DamageFromBase number to be higher or lower than the original Poisoned one, however you like.



Don't forget to save all of your changes in each file.

Now if you reload your level and test your skill, you should see your new status applied!

Skill Icons
This tutorial assumes you are comfortable with a graphics editor, and have already created some .png icons at 64px by 64px for use.

Before we start adding icons, we need a place to store them.
You'll need to open the Resource Manager.



In the Resource Manager, select your mod and click the 'Add Package' button.



Name it Venomancer_Assets and press 'Ok'.



To add skill icons to your mod, you'll need to use the Texture Atlas Editor. A 'texture atlas' is simply a grid of named images which can each be referenced from your stats.



Go to File --> New in the Texture Atlas Editor to create a new atlas.

You'll likely need to create the GUI and Assets/Textures folders below.

Browse to the same place for your mod for the .lsx path:
(note that your drive location and mod name will be different)
D:\SteamLibrary\SteamApps\common\Divinity Original Sin 2\DefEd\Data\Public\Helaene_Venomancer_66379af4-da0b-befb-44c6-ada379b2521a\GUI



Then for the .dds file, do the same:
D:\SteamLibrary\SteamApps\common\Divinity Original Sin 2\DefEd\Data\Public\Helaene_Venomancer_66379af4-da0b-befb-44c6-ada379b2521a\Assets\Textures

I named each Venomancer_Icons (and used the existing file types/extensions).

Make sure that your new package is selected at the bottom right (it should be by default).

The default sizes (64 and 512) are fine to use. Press Save when ready.



Now you should see a grid appear in the window.
Add your first icon by using the plus button at the top of the window.



Select your saved icon image from your computer. Note that it will automatically use the file name to name the image in your atlas (so name your files well!)

Save your atlas. Then right-click the image you want to reference from your atlas in the sidebar, and copy its name.



Now, open your skill file, and paste the image name into the icon field.



Save your changes, and check that your new icon shows up in your test level.



12 Comments
Void 24 Mar, 2022 @ 3:48pm 
Where is the list of all parameters for the the areas "Skill Properties" and other condition areas?
foxminoso38 17 Oct, 2020 @ 1:26pm 
heya there o/
ya do awesome woek on your mods , i wondered , looking your succubus class mod , if it would be possible to add spell from "last evil" game :3
Ciopanni94 17 Feb, 2020 @ 9:15am 
Hi Helaene,
I wanted to ask you if it is possible to create a spell that imitates other spells (like this one https://www.d20pfsrd.com/magic/all-spells/s/shadow-evocation/) . If not, how could I reinvent it so that it is pleasant and suitable for divinity? Thanks,
best regards
Chippendale 30 Sep, 2019 @ 8:50am 
Is it possible to create skill required 1h weapon AND free offhand?
Jarmuz 24 Sep, 2018 @ 12:00pm 
All right. Thanks for the help and keep up the cool mods :steamhappy:
helaene  [author] 24 Sep, 2018 @ 11:58am 
strange - yes, just the general-modding channel
Jarmuz 24 Sep, 2018 @ 11:45am 
The link doesn't lead to any channel for some reason. Is it a link to the Divinity OS modding channel?
helaene  [author] 24 Sep, 2018 @ 11:34am 
Hi Smokamrok - I think your best bet is to post the error message here: https://discordapp.com/channels/98922182746329088/358337334619406336

Cheers!
Jarmuz 24 Sep, 2018 @ 11:15am 
@Helaene
Hi
I am having problems with the Stats Editor. Could you perhaps accept my friend request so we can discuss this further please? I have the GOG version of Divinity OS 2

here is the error message:

https://pastebin.com/2K7bdvJT
Akashar 23 Sep, 2018 @ 10:15am 
Wow. How did I miss this? :D