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

From Divinity Engine Wiki
Jump to: navigation, search
(Skill Set)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== Getting started ===
+
= Getting started =
 
The Divinity Engine uses XML style file presets in order to load in the available classes during character creation. <br />
 
The Divinity Engine uses XML style file presets in order to load in the available classes during character creation. <br />
 
This data driven approach allows us to define custom presets in character creation in the blink of an eye.<br />
 
This data driven approach allows us to define custom presets in character creation in the blink of an eye.<br />
 
The first thing you need to know when creating your first character creation class is the location of the preset files. <br />
 
The first thing you need to know when creating your first character creation class is the location of the preset files. <br />
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 : ''Data/Mods/{YourModName}/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, you can just place the provided template file inside - [[File:ClassTemplate.lsx|none]]. <br />
+
Once you find or create the directory inside of your mod. <br />
If you load up character creation now and cycle through the presets, you should be able to see something like the following:
+
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 />
 +
you should be able to see something like the following:
 
[[File:CustomClass.png|none|600px]]
 
[[File:CustomClass.png|none|600px]]
  
=== Preset breakdown ===
+
= Preset breakdown =
 
Now that we've loaded our class preset let's take a look at the most important properties. <br />
 
Now that we've loaded our class preset let's take a look at the most important properties. <br />
 
Open up the template file in any text editor. If you're not familiar with XML I suggest you read up on that first.
 
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 ====
+
=== Class Name ===
 
The name of the class which is displayed to the user. <br />
 
The name of the class which is displayed to the user. <br />
 
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.
 
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 ====
+
=== Class Type ===
 
This is the string which is used by code in order to identify the class with its unique type. <br />
 
This is the string which is used by code in order to identify the class with its unique type. <br />
 +
Make sure this name is unique,otherwise things might not behave as they should. <br />
 
It doesn't need to be the same as the '''Class Name''', but it is nice to be similar for readability's sake.
 
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 ====
+
=== Skill Set ===
 
This is the skill set name which this preset is assigned by default (the skill set must be defined in the data).
 
This is the skill set name which this preset is assigned by default (the skill set must be defined in the data).
 +
You will have to define your own set in data first before you can use it. You will have to use the stats editor to do that. The principle of creating a skill set is the same as with creating a single custom skill. You can follow this tutorial: [[Skill_creation]], but instead of creating a skill, create a skill set.  Just filling a random name won't do the trick. The following skill sets are already defined in data and can be used as is:<br />
 +
Class_Battlemage<br />
 +
Class_Cleric<br />
 +
Class_Conjurer<br />
 +
Class_Enchanter<br />
 +
Class_Fighter<br />
 +
Class_Inquisitor<br />
 +
Class_Knight<br />
 +
..(+ all the rest of the default classes)
  
==== Starting Points ====
+
=== Starting Points ===
 
There are four properties under this category : Talents, Attributes, Combat and Civil ability points. <br />
 
There are four properties under this category : Talents, Attributes, Combat and Civil ability points. <br />
 
Tweaking these will make your class start with a different amount of points available to spend.<br />
 
Tweaking these will make your class start with a different amount of points available to spend.<br />
Make sure you don't add less available points than the amount of talents/abilities/attributes.
+
'''Important: Make sure you don't add less available points than the amount of talents/abilities/attributes.'''
  
==== Equipment Properties ====
+
=== 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. <br />
+
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. <br />
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.<br />
+
There are two equipment sets. We use one for the preview and the other when starting the game. <br />
'''N.B: If you add a custom race, you'll need to fill it in this list as well'''
+
Depending on your use case, you can fill in the same equipment set for both.<br />
 +
'''Important: If you add a custom race, you'll need to fill it in this list as well'''
  
==== Ability, Talent and Attribute Changes ====
+
=== 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. <br />
 
Remember the starting points we defined earlier? We need to tell the game how to distribute those points by default. <br />
That's exactly what these properties define. 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.
+
That's exactly what these properties define. <br />
 +
'''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.'''

Latest revision as of 09:10, 23 October 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 : Data/Mods/{YourModName}/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: Class Template
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). You will have to define your own set in data first before you can use it. You will have to use the stats editor to do that. The principle of creating a skill set is the same as with creating a single custom skill. You can follow this tutorial: Skill_creation, but instead of creating a skill, create a skill set. Just filling a random name won't do the trick. The following skill sets are already defined in data and can be used as is:
Class_Battlemage
Class_Cleric
Class_Conjurer
Class_Enchanter
Class_Fighter
Class_Inquisitor
Class_Knight
..(+ all the rest of the default classes)

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.