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

From Divinity Engine Wiki
Jump to: navigation, search
m
Line 33: Line 33:
  
 
To create our treasure table, we:
 
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).
+
* Open the TreasureTable stats document in the [[File:StatsEditor_Icon.png|32px]] [[Stats editor]] (Create the document if it does not yet exist) <span style="color:#FCFF27">(1)</span>.
# Create a new treasure table, I named mine "ST_SkillbookWaterBolt"
+
* Create a new treasure table, I named mine "ST_SkillbookWaterBolt", and then set the following fields <span style="color:#FCFF27">(2)</span>:
#: I set the following fields:
+
** DropCount (1,1): this defines the minumum and maximum amount of items generated from the treasure table.
#* 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.
#* 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.
#* Frequency (1): the likelyhood of SKILLBOOK_Air_WaterBolt being generated from the treasure table
+
* Save <span style="color:#FCFF27">(3)</span>.
# Save
 
  
 
<br />
 
<br />

Revision as of 17:43, 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:

  • Open the TreasureTable stats document in the StatsEditor Icon.png Stats editor (Create the document if it does not yet exist) (1).
  • Create a new treasure table, I named mine "ST_SkillbookWaterBolt", and then set the following fields (2):
    • 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 (3).


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