Difference between revisions of "My first: Character creation class"

From Divinity Engine Wiki
Jump to: navigation, search
(Getting started)
Line 5: Line 5:
 
You can find those located inside : ''YourMod/CharacterCreation/ClassPresets'' (If the directory doesn't exist, you can just create it yourself). <br />
 
You can find those located inside : ''YourMod/CharacterCreation/ClassPresets'' (If the directory doesn't exist, you can just create it yourself). <br />
 
Once you find or create the directory inside of your mod. <br />
 
Once you find or create the directory inside of your mod. <br />
Here's an already made template file so you can try it out for yourself: [[:File:ClassTemplate.zip|Class Template]]<br />
+
Here's an already made template file so you can try it out for yourself: [[File:ClassTemplate.zip|Class Template]]<br />
 
Once you put the provided template file in the folder, load up character creation now and cycle through the presets, <br />
 
Once you put the provided template file in the folder, load up character creation now and cycle through the presets, <br />
 
you should be able to see something like the following:
 
you should be able to see something like the following:

Revision as of 17:30, 15 September 2017

Getting started

The Divinity Engine uses XML style file presets in order to load in the available classes during character creation.
This data driven approach allows us to define custom presets in character creation in the blink of an eye.
The first thing you need to know when creating your first character creation class is the location of the preset files.
You can find those located inside : YourMod/CharacterCreation/ClassPresets (If the directory doesn't exist, you can just create it yourself).
Once you find or create the directory inside of your mod.
Here's an already made template file so you can try it out for yourself: File:ClassTemplate.zip
Once you put the provided template file in the folder, load up character creation now and cycle through the presets,
you should be able to see something like the following:

CustomClass.png

Preset breakdown

Now that we've loaded our class preset let's take a look at the most important properties.
Open up the template file in any text editor. If you're not familiar with XML I suggest you read up on that first.

Class Name

The name of the class which is displayed to the user.
The handle property is set to ls::TranslatedStringRepository::s_HandleUnknown by default in order to signal that this string has not been localized for other languages yet.

Class Type

This is the string which is used by code in order to identify the class with its unique type.
Make sure this name is unique,otherwise things might not behave as they should.
It doesn't need to be the same as the Class Name, but it is nice to be similar for readability's sake.

Skill Set

This is the skill set name which this preset is assigned by default (the skill set must be defined in the data).

Starting Points

There are four properties under this category : Talents, Attributes, Combat and Civil ability points.
Tweaking these will make your class start with a different amount of points available to spend.
Important: Make sure you don't add less available points than the amount of talents/abilities/attributes.

Equipment Properties

As you can see the equipment properties are a bit different. They are a list, which specifies the equipment set that each race will wear during the preview in character creation.
There are two equipment sets. We use one for the preview and the other when starting the game.
Depending on your use case, you can fill in the same equipment set for both.
Important: If you add a custom race, you'll need to fill it in this list as well

Ability, Talent and Attribute Changes

Remember the starting points we defined earlier? We need to tell the game how to distribute those points by default.
That's exactly what these properties define.
Important: Make sure you don't add more abilities/talents/attributes than you have to spend or the game won't like it and won't allocate them.