Difference between revisions of "My first: Character creation race"
(→Getting started) |
m (Protected "My first: Character creation race" ([Edit=⧼protect-level-larianeditonly⧽] (indefinite) [Move=⧼protect-level-larianeditonly⧽] (indefinite))) |
(No difference)
|
Revision as of 11:10, 2 October 2017
Contents
Getting started
The Divinity Engine uses XML style file presets in order to load in the available races 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 race is the location of the preset files.
You can find those located inside : Data/Mods/{YourModName}/CharacterCreation/RacePresets (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:RaceTemplate.zip
Once you put the provided template file in the folder, load up character creation now and cycle through the races.
Preset attribute breakdown
Now that we've loaded our race preset let's take a look at the most important attributes.
Open up the template file in any text editor. If you're not familiar with XML we suggest to read up on that first.
Race 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.
Race Name
This is the string which is used by code in order to identify the race 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 Race Display Name, but it is nice to be similar for readability's sake.
Race Description
The description of the Race which will be shown 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.
Skill Set
This is the skill set which is given specifically to this race. It is loaded from data and needs to be defined there.
You can leave this empty, if your race does not have any special super powers.
Default Hair/Skin Color
In the child nodes, you can define multiple available hair/skin colors.
Set the value of this attribute to the ID of the defined color you want to see as default when opening character creation.
Default Hair/Skin Color
Set to '1' if you want to allow your race to proudly parade around the world without a single piece of hair on its head.
Preset node breakdown
Now that we've loaded our race preset and defined the main attributes, let's take a look at the extra data defined for this race in the <children><node> elements.
Open up the template file in any text editor. Again, if you're not familiar with XML we suggest to read up on that first.
Talents Added
Defines the list of talents this race gets for free from the start.
Female/Male Default Player Names
List of default names of which one will automatically be assigned when choosing this race in character creation.
The user can then keep that name, or change it to a custom one.
Female/Male Icons
A fallback value.
Set a list of one or more existing portraits to choose from.
In a normal game, this is not used because character creation makes a real-time portrait based on the character.
Female/Male Root Template IDs
Defines the character model used for this race.
Set it to the character root template ID you want the race to look like.
F.e. '99419eeb-e574-4b5f-8e71-d642364ebf4b' for zombies.
Henchman Female/Male Icons
A fallback value.
Set a list of one or more existing portraits to choose from.
In a normal game, this is not used because henchman creation makes a real-time portrait based on the character.
Female/Male Root Template IDs
Defines the character model used for this race's henchmen.
Set it to the character root template ID you want the race's henchmen to look like.
F.e. '99419eeb-e574-4b5f-8e71-d642364ebf4b' for zombies.
Custom cameras
All races have their own cameras defined in the character creation level.
To have correct portrait generation and to have a camera that decently shows your race, you need to mod the character creation level.
Cameras use the RaceName in their name to know which race uses which camera. Copy over an existing camera and fill your race name in the camera's name according to the existing camera naming convention.