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

From Divinity Engine Wiki
Jump to: navigation, search
Line 15: Line 15:
  
 
==== Origin Display Name ====
 
==== Origin Display Name ====
The name which will be displayed to the user in the UI.
+
The name which will be displayed to the user in the UI.<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.
 +
 
 +
==== Origin Name ====
 +
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 '''Origin Display Name''', but it is nice to be similar for readability's sake.

Revision as of 13:52, 13 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 origin is the location of the preset files.
You can find those located inside : YourMod/CharacterCreation/OriginPresets (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:

Once you put the provided template file in the folder, load up character creation now and cycle through the origins,
you should be able to see something like the following:

CustomOrigin.png

Preset breakdown

Now that we've loaded our origin 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.

Origin Display Name

The name which will be displayed to the user in the UI.
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.

Origin Name

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 Origin Display Name, but it is nice to be similar for readability's sake.