Home > Under the Hood > [Under The Hood] A Closer Look at Items

[Under The Hood] A Closer Look at Items

In this column that I call “Under the Hood”, we’re going to dig deeper into how items work in Dragon Age: Origins.  We’ll take a look at items both in the toolset,but also dig deeper into 2da files, and scripts.

Items in Dragon Age are pretty much anything you can have in your inventory.  They may or may not be equippable, but they can always (as far as I can tell) be put into your inventory and carried around with you.

Base Item Types

Every item in the game extends from a base item type.  There are approximately 70 base item types defined in the core game resources.  You have things like “Armor – Light”, or “Weapon – Sword”, or even “Other – Herbalism Item”.  You even have “Money – Copper”.  Yes, money is still an item.

The important thing to understand about items in Dragon Age is that for most items, there is a generic version of the item, and that generic version is auto-scaled by the game when your character acquires it.  In other words, a longsword doesn’t exist in lots of different versions for different levels.  There is a simple basic Longsword, and that is then scaled to a tier appropriate for your character when you acquire it.  This is not the case with every item in the game, but it does cover many of them including most all weapons and armor. 

The base item type defines the base properties of the item.  This includes things such as appearence, both 2d and 3d, as well as attributes such as how much damage a weapon might do, or how much defense a pieceof armor might give.  These are all defined by the base item type, and any item created will inherit these values.  So we have the basie item type, and the properties given by it, but how does the game scale these to the character?  It all has to do with Material Tiers.

Material Tiers

Items that get scaled by the game all have what is called a Material.  For example, a longsword might be Iron.  These materials define what tier the item is.  Higher tier items are more powerful.  Remember how we said that the item inherits certain base attributes from its base item type?  Well the tier further modifies those attributes by applying a multiplier to them.  So the game scales an item up by assigning a certain material tier to it, and then the item’s base attributes, multiplied by the tier’s modifier gives us a scaled item.

2DA files

We’ll talk about 2da files in more detail later, but understand that 2da files are basically spreadsheets that the game uses to define muchy of the raw data in the game.  Items are all defined in these files.  If you take a look in the Dragon Age/tools/source/2da folder, you can see these raw files.  They are in fact Excel spreadsheets.  If you go one level deeper, into the Rules folder, you will find BITM_Base.xls.  This is the 2da file that defines the properties of those base items we talked about.

7a961a8b3f0e1b1c1d627c0ea854ef68

We can see here, for example, that a longsword has a base damage of 7.  So any item created with the base item type of “Weapon – Longsword” is going to do a base 7 points of damage.  If you then open up “materialtypes.xls” you can see how the material tiers work.

1e38bb9e07275e655e7ef6e9a5e3a3a6

Notice how the higher the tier, the higher the damage modifier.  So an item with a base item type of “Weapon – Longsword” and a Material of “Iron” would do 7 points of damage (7 * 1), but one that is of the Dragonbone material would do 11.2 points of damage (7 * 1.6).  This is how item scaling works.

Miscellaneous Items

Now that sort of stuff is all well and good for things like armor and weapons, but what about other items like potions?  Looking at the table there isn’t any values for “healing” or any such thing.  how the heck do these work?

Well the first thing we can note, by looking at the items in the toolset, is that in this case there are multiple versions of the ptions, one item for each “level” of potion.  So no auto scaling here.  Now how does the healing work?  If you look at the item’s “Item Properties” you can see that it has a [S] type ability on it.  [S] means special and goes with the dropdown at the bottom of the window.  This has an ability “Flag: Is Healing Potion”.  In addition if you open the “_Ability_Scripts”, under Items, you will see “item_singletarget” and in there there is a seperate case handling each level of potion to create its healing effect. But how do the two things tie in?  This is where it gets interesting.  Useable items that have effects, like health and mana potions, appear to bridge between two worlds.  They are items, and they are also “abilities”.  If you open up ABI_base.xls you will find all the various spells, skills, and talents in the game.  You will also, down near the bottom, find item effects.  This 2da ties these things in with the script that handles them. 

So when a healing potion is used, the script “item_singletarget.ncs” is called, and sent the ID of the potion, 200010 for less potion for example.  The way its tied together i’m not sure the “Flag: Is Healing Potion” really does anything, but it might be used for some other purpose as a way to identify it as such.

Well I hope this little look “under the hood” gave you a better idea of how items work in Dragon Age: Origins.  At this point in time we’re all still learning the ins and outs of the toolset and the game, but hopefully this helps get people thining and helps grow the community!

Advertisements
Categories: Under the Hood
  1. Dragonamedrake
    November 17, 2009 at 7:02 pm

    Ok so how can I change the MaterialType without changing the look of the Item. Also how does MaterialProgression figure into the equation. Basicly I want to make a Weapon Longsword with the Saw Sword graphic and Dragonbone Quality… however I dont want it to be that rust looking color its becoming. Any advice would be great.

    BTW your articles are great. Ive never really used toolsets or done my own mods before but with your instructions Ive had zero problems… ive even started testing out my own small verations and so far Im having a blast. Thanks again.

    • John Vanderbeck
      November 17, 2009 at 7:05 pm

      I don’t think anyone has found a way for the material texture to be different from the material yet.

      • Dragonamedrake
        November 17, 2009 at 7:23 pm

        How annoying. After all I want my Character to look good as he splits people. There has to be a way though.

        Considering you can sell Items to the Mercant at Solders Peek and he will upgrade gear to Dragonbone qualitly without changing the graphic.

    • thamsirt
      June 16, 2010 at 9:36 am

      someone has made a Tint mod to replace dragonbone colour, but i think it replaces all tier 7 equipment, still that may not be a bad thing….T7Tintoverride….
      if u want to check it, haven’t tried this yet so can’t offer any pro/con critisism.

  2. gadfly
    November 20, 2009 at 3:48 pm

    Great Tutorial, this has helped me as I begin learning about modding this game. I would like to ask however, how does Ammunition fit in?

    I’ve been looking to modify the Ammunition in the game to be non-consumable (unlimited) and limit the default drop stack to 1 (but stacking for ease of sale if you find more) in order to effectively compensate and differentiate Archery (which doesn’t have Enchantment slots on weapons, but has Enhanced Ammo) from Melee (with Enchantments and Runes).

    I can’t seem to find the consumable flag or drop stack size options, nor even the different ammunition stats table however as it doesn’t seem to be included in the BTIM_base or ABI_base either from what I see.

    Any advice?

  3. Jake
    December 12, 2009 at 3:53 am

    John,

    Are you aware of how to make items capture events (or if it’s even possible). I attached a script to a sword and put some event capturing code/logging in the main() method but I never capture anything.

    Thanks

  4. Ekrem
    January 15, 2010 at 9:17 am

    My guess is that the healing potion identifier helps with the tactics option of “use the highest tier healing potion”

    • nick
      July 7, 2010 at 5:06 pm

      can a saw sword be dragonbone if so where can i find one

  1. January 1, 2010 at 5:50 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: