Difference between revisions of "Part 4: adding the skillbook to a vendor"

From Divinity Engine Wiki
Jump to: navigation, search
m
Line 28: Line 28:
 
[[File:CreateVendor_Step1_CreateTreasureTable.png|none]]
 
[[File:CreateVendor_Step1_CreateTreasureTable.png|none]]
 
<sub>Creating the treasure table stats entry</sub>
 
<sub>Creating the treasure table stats entry</sub>
 +
 +
First, we will create a new treasure table to assign to our vendor. Treasure tables are item tables used to define random loot.
 +
 +
 +
To create our treasure table, we:
 +
# Open the TreasureTable stats document in the [[File:StatsEditor_Icon.png|32px]] [[Stats editor]] (Create the document if it does not yet exist).
 +
# Create a new treasure table, I named mine "ST_SkillbookWaterBolt"
 +
#: I set the following fields:
 +
#* DropCount (1,1): this defines the minumum and maximum amount of items generated from the treasure table
 +
#* ObjectCategory (I_SKILLBOOK_Air_WaterBolt): this is the name of our skillbook's stat object with "I_" prefixed to it
 +
#* Frequency (1): the likelyhood of SKILLBOOK_Air_WaterBolt being generated from the treasure table
 +
# Save
  
 
<br />
 
<br />

Revision as of 17:41, 18 September 2017

This article is part of a 4-part series on how to create, edit and use a new skill.

Part 1: creating a new skill
Part 2: creating a skill from existing
Part 3: creating and using a skillbook
Part 4: adding the skillbook to a vendor

The data used in this article was created in parts 1 & 2 of the series.


Description

Vendors are NPC characters that buy or sell items. In order to assign our skillbook to a vendor npc, we will need to do a couple of things:

  1. Create a treasure table
  2. Create a vendor
  3. Add the treasure table to the vendor



Setting up a vendor

Step 1: Creating a treasure table

CreateVendor Step1 CreateTreasureTable.png

Creating the treasure table stats entry

First, we will create a new treasure table to assign to our vendor. Treasure tables are item tables used to define random loot.


To create our treasure table, we:

  1. Open the TreasureTable stats document in the StatsEditor Icon.png Stats editor (Create the document if it does not yet exist).
  2. Create a new treasure table, I named mine "ST_SkillbookWaterBolt"
    I set the following fields:
    • DropCount (1,1): this defines the minumum and maximum amount of items generated from the treasure table
    • ObjectCategory (I_SKILLBOOK_Air_WaterBolt): this is the name of our skillbook's stat object with "I_" prefixed to it
    • Frequency (1): the likelyhood of SKILLBOOK_Air_WaterBolt being generated from the treasure table
  3. Save


Step 2: Creating a vendor


Step 3: Adding the treasure table to the vendor


Troubleshooting

Several things can cause a skillbook to not show up on a vendor's sell list:

  • The item was not generated out of that treasure table
    Items in treasure tables are randomly generated, if an item does not show up it might just be bad RNG!
  • The "Story Item" flag is checked in the skillbook properties