Custom Items

Unique items are some of the best rewards you can give a player. With a few exceptions, items you make for one scenario can be carried over to other scenarios. Let's have the pesky goblin drop a weak but memorable item: a stick that gives +1 Assassination. Much like custom creatures, most custom items start by importing a item already defined in the base game. You can find the definitions for all objects in the corescendata.txt and corescendata2.txt files in the Blades of Avernum\Data folder. Here's the definition of the stick item, found in corescendata2.txt:

begindefineitem 79;
	it_name = "Stick";
	it_full_name = "Stick";
	it_variety = 1;
	it_damage_per_level = 3;
	it_weapon_skill_used = 4;
	it_floor_which_sheet = 1005;
	it_floor_which_icon = 5;
	it_inventory_icon = 6;
	it_value = 1;
	it_weight = 10;
	it_identified = 1;
	it_junk_item = 1;

Most definitions start with import. This one starts with clear: instead of importing and modifying an existing item, this item is defined from scratch. Curious what each attribute is? Page 61 of the documentation lists every possible attribute. To make our own item, add the following to peskydata.txt:

begindefineitem 445;
  import = 79; // Stick
  it_full_name = "Poking Stick";
  it_value = 100;
  it_junk_item = 0;
  it_ability_1 = 11; // Assassination
  it_ability_str_1 = 1;

Item number 445 is now a copy of item 79, except:

In the Editor, select the goblin, then click "Drop Item 1". Select "Poking Stick" from the list of items, then set "What Chance?" to 100. If "Poking Stick" isn't listed, make sure you've saved your changes to peskydata.txt, then click Scenario > Reload Scenario Script.


Note that it's possible to set item drop chances in the creature definition. This is useful if you have many different instances of the same creature that all need to drop (or have a chance to drop) the same item.

We're done with this town now. All we need to do is a few finishing touches to the first town, and then we'll be done the scenario.