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

From Divinity Engine Wiki
Jump to: navigation, search
(Getting started)
(Getting started)
 
(10 intermediate revisions by the same user 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 races during character creation. <br />
 
The Divinity Engine uses XML style file presets in order to load in the available races 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 race is the location of the preset files. <br />
 
The first thing you need to know when creating your first character creation race is the location of the preset files. <br />
You can find those located inside : ''YourMod/CharacterCreation/RacePresets'' (If the directory doesn't exist, you can just create it yourself). <br />
+
 
 +
You can find those located inside : ''Data/Mods/{YourModName}/CharacterCreation/RacePresets'' (If the directory doesn't exist, you can just create it yourself). <br />
 +
Be sure to create your mod first. You can find the exact path of your mod data (and the correct mod name) in the [[Working_with_projects|Project Browser]], when opening the Divinity Engine. <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:RaceTemplate.zip|none]]<br />
 
Here's an already made template file so you can try it out for yourself: [[File:RaceTemplate.zip|none]]<br />
Once you put the provided template file in the folder, load up character creation now and cycle through the races, <br />
+
Once you put the provided template file in the folder, load up character creation now and cycle through the races. <br />
you should be able to see something like the following:
+
[[File:CustomRace.png|none|800px]]
[[File:CustomRace.png|none|600px]] [[File:CustomRace2.png|none|600px]]
 
  
=== Preset attribute breakdown ===
+
== Preset attribute breakdown ==
 
Now that we've loaded our race preset let's take a look at the most important attributes. <br />
 
Now that we've loaded our race preset let's take a look at the most important attributes. <br />
 
Open up the template file in any text editor. If you're not familiar with XML we suggest to read up on that first.
 
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 ====
+
=== Race Display Name ===
 
The name which will be displayed to the user in the UI.<br />
 
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.
 
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 ====
+
=== Race Name ===
 
This is the string which is used by code in order to identify the race with its unique type.<br />  
 
This is the string which is used by code in order to identify the race with its unique type.<br />  
 
Make sure this name is unique,otherwise things might not behave as they should. <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 '''Race Display Name''', but it is nice to be similar for readability's sake.
 
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 ====
+
=== Race Description ===
 
The description of the Race which will be shown to the user in the UI. <br />
 
The description of the Race which will be shown 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.
 
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 ====
+
=== 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.<br />  
 
This is the skill set which is given specifically to this race. It is loaded from data and needs to be defined there.<br />  
 
You can leave this empty, if your race does not have any special super powers.
 
You can leave this empty, if your race does not have any special super powers.
  
==== Default Hair/Skin Color ====
+
=== Default Hair/Skin Color ===
 
In the child nodes, you can define multiple available hair/skin colors.<br />
 
In the child nodes, you can define multiple available hair/skin colors.<br />
 
Set the value of this attribute to the ID of the defined color you want to see as default when opening character creation.
 
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 ====
+
=== 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.
 
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 ===
+
== 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. <br />
 
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. <br />
 
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.
 
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 ====
+
=== Talents Added ===
 
Defines the list of talents this race gets for free from the start.
 
Defines the list of talents this race gets for free from the start.
  
==== Female/Male Default Player Names ====
+
=== Female/Male Default Player Names ===
 
List of default names of which one will automatically be assigned when choosing this race in character creation.<br />
 
List of default names of which one will automatically be assigned when choosing this race in character creation.<br />
 
The user can then keep that name, or change it to a custom one.
 
The user can then keep that name, or change it to a custom one.
  
==== Female/Male Icons ====
+
=== Female/Male Icons ===
 
A fallback value.<br />
 
A fallback value.<br />
 
Set a list of one or more existing portraits to choose from.<br />
 
Set a list of one or more existing portraits to choose from.<br />
 
In a normal game, this is not used because character creation makes a real-time portrait based on the character.<br />
 
In a normal game, this is not used because character creation makes a real-time portrait based on the character.<br />
  
==== Female/Male Root Template IDs ====
+
=== Female/Male Root Template IDs ===
 
Defines the character model used for this race.<br />
 
Defines the character model used for this race.<br />
 
Set it to the character root template ID you want the race to look like.<br />
 
Set it to the character root template ID you want the race to look like.<br />
 
F.e. '99419eeb-e574-4b5f-8e71-d642364ebf4b' for zombies.
 
F.e. '99419eeb-e574-4b5f-8e71-d642364ebf4b' for zombies.
  
==== HenchMan Female/Male Icons ====
+
=== Henchman Female/Male Icons ===
 
A fallback value.<br />
 
A fallback value.<br />
 
Set a list of one or more existing portraits to choose from.<br />
 
Set a list of one or more existing portraits to choose from.<br />
 
In a normal game, this is not used because henchman creation makes a real-time portrait based on the character.<br />
 
In a normal game, this is not used because henchman creation makes a real-time portrait based on the character.<br />
  
==== Female/Male Root Template IDs ====
+
=== Female/Male Henchman Root Template IDs ===
 
Defines the character model used for this race's henchmen.<br />
 
Defines the character model used for this race's henchmen.<br />
 
Set it to the character root template ID you want the race's henchmen to look like.<br />
 
Set it to the character root template ID you want the race's henchmen to look like.<br />
 
F.e. '99419eeb-e574-4b5f-8e71-d642364ebf4b' for zombies.
 
F.e. '99419eeb-e574-4b5f-8e71-d642364ebf4b' for zombies.
 +
 +
= Custom cameras =
 +
All races have their own cameras defined in the character creation level.<br />
 +
To have correct portrait generation and to have a camera that decently shows your race, you need to mod the character creation level.<br />
 +
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.

Latest revision as of 09:39, 21 June 2018

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).
Be sure to create your mod first. You can find the exact path of your mod data (and the correct mod name) in the Project Browser, when opening the Divinity Engine.

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.

CustomRace.png

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 Henchman 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.