My first: Character creation origin

From Divinity Engine Wiki
Revision as of 13:09, 13 September 2017 by Apostol (talk | contribs)
Jump to: navigation, search

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.

Origin Description

The description of the Origin which will be shown to the user in the UI.
There's also a Long description, but that one is not currently used anywhere in the game.
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.

Character UUID

This one deserves a bit of explanation. In character creation the system uses the so called dummy characters during the customization stage.
After the user has picked their character, the customization is transferred to the character which he's actually going to be playing as.
The flow is designed this way to accommodate for the scripting needs of the game.

The Character UUID field specifies the template UUID which the customization will be transferred to -
the actual character that the user will start controlling once they are done with character creation.
You can create a new template or reuse an already existing one (you can do that in the Editor).
The only important thing is that the chosen template is Global. This means its isGlobal flag must be checked when inspecting it in the editor.