Part 3: creating and using a skillbook

From Divinity Engine Wiki
Revision as of 18:34, 11 September 2017 by Jbotteram (talk | contribs)
Jump to: navigation, search

This article describes how to create a skillbook, from which skills can be learned. To learn how to create a new skill first, see My first: Skill.


Step 4: Creating a Skillbook

Step6 EditObject.png

Copying a skillbook stats entry, like we did for the skill


Our skill has now been created, and is ready to be used in the game. However, we do not have a way for characters to learn the skill yet. Next, we will be creating a skillbook.

First, we need to create a new skillbook stats entry. We do this the same way we did it for the skill:

  • Open the Object stats document in your project
  • Open the Object stats document in the Shared project
  • Find and copy the SKILLBOOK_Air_LightningBolt entry


I modified the following fields:

  • Name (required)
  • RootTemplate (see further down for creating a new skillbook template, we assign this the same way we did the projectile template)
  • Requirements, from 1 Aerotheurge to none


Step7 CopyTemplate1.png

Copying a root template


To create our new skillbook template we:

  • Open the Root template panel
  • Filter the root templates by item templates
  • Filter the item templates by "lightningbolt"
  • Select and right-click the "BOOK_Skill_Air_LightningBolt" template, which is the skillbook for the LightningBolt skill
  • Click "Create new from selected..."


Step7 CopyTemplate2.png

The Create Object Wizard


To create our new skillbook template, we perform the following steps in the create object wizard:

  • Select our project (1)
  • Assign skillbook stats entry in the "Stats" property (2)
  • Rename the template (3)
  • Create the template (4)


Note that the "OnUseAction" property also needs to be changed to be able to learn our skill, but I did this later.


Step8 CreateFolder.png

Creating a new folder


Our root template also has to be in a folder to be assignable in the stats editor. If you already have a folder of your own, you can skip this step.

To create a new folder:

  • Right click the "Root Templates" folder (at the top) in the root template panel
  • Click "Add Folder"
  • Name your folder


Step9 MoveTemplate.png

Moving our skillbook template to the new folder


Don't forget to move our new template to our newly created folder (1) and save the root templates (2)!


Step10 AssignRootTemplate.png

Assigning a root template to our object stats entry


There is one last thing we need to do in the Stats Editor: assign our root template to the object's stats entry. To do this:

  • Open your Object document in the Stats Editor
  • Navigate to the "RootTemplate" field on your stats entry and double click it
  • Find your root template in the root template selector (the popup box)
  • Double click it


Then you can save and close the Stats Editor.


Step11 SetOnUseAction.png

Setting the On Use action on our skillbook template


We also need perform one final (very important) step on our skillbook root template; choosing what to do when the item is used.

To change the "On Use" actions:

  • Find your root template in the root template panel (1)
  • Find the "OnUseActions" property and open the custom editor (select the property and click the [..] button) (2)
  • Select our skill in the "SkillBookID" dropdown on the "Skill book" action (3) [1]
  • Apply the changes (3)


[1] You may need to reload your project in order for the SkillBookID dropdown to refresh.


Step 5: Using our Skill

Step12 PlaceTemplate.png

Place an instance of our skillbook template in the level


And that's it, our skill is ready to use!

To learn our skill, we need to place our skillbook in a level:

  • Select the template in the root template panel (1)
  • Select the Creation Interaction Mode (2)
  • Place the item anywhere in your level (preferably near your player character) (3)


Step13 UseSkill.png

Using our skill


Last but not least, start the game (Ctrl+Enter), pick up the skillbook, learn your skill and destroy your enemies!