Adding a new weapon type tutorial

From Dragon Age Toolset Wiki
Jump to: navigation, search

This tutorial will demonstrate how to add a custom weapon type to the toolset for use in-game. (Theoretically the concept could be used to make a new item type in general, but it seems unlikely to me that you'll need it much more than for weapons.)

Please note that currently the toolset does not allow for the making of custom model animations. This may be added in the future in the form of a 3rd-party extension, but Bioware does not believe they will be able to release any kind of animation maker built into the toolset. This means that making a weapon that would require customized animations to use is not practicable. Fortunately, however, most any normal kind of weapon imaginable will be able to use the default animations, however much of a stretch it may be.

In this example, I will be demonstrating how to create a spear-type weapon. (Models are not included; this is just to teach you how to do it with your own stuff. This tutorial assumes you're changing things to fit your own needs.)

It's been a little annoying trying to figure this out for the last few days, so once I succeeded I thought it would only be proper to spare everyone else the trouble. Hope this helps you guys.

Author: Gammastar

First Things First

I strongly recommend creating a new module for this. Actually no, I demand it. DO NOT DO THIS IN THE SINGLE PLAYER MODULE.

For more information on creating a module, check out Creating a module.

Materials

This is pretty GDA intensive, so ready your version of Excel for battle. (Or if you don't have Excel, use GDApp. But it's up to you to find the original GDAs.)

Here's what you'll need (all paths relative to "[installdirectory]\tools\Source\2DA\"):

1. BITM_base.xls (found in "\rules")

2. ItemVariations.xls (also found in "\rules")

3. 2DA_base.xls (found in root directory. hard to miss as it's the first one in the folder.)

Getting to Work

Copy all of the aforementioned files over to your own directory of choice and open them up. We'll start with 2DA_base.xls, because it requires the least amount of modification.

Linking the Variations Sheet

So, open up 2DA_base.xls and make sure you're looking at the sheet called "M2DA_base" (or, obviously, if you're using GDApp, just open M2DA_base.GDA)

Add in a new row anywhere you please. I've chosen to keep mine right in with all the weapons variations:

2dabase.PNG

The ID number on the left should be something unused by the other entries, obviously, so I chose 11000. The next two columns contain the name of the variation worksheet we'll be making in the next step, "spear_variation," and just star out the last one like all the other rows are done.

Save that file, run it through the Excel processor (if you're not sure what this is, refer to Compiling 2DAs), and place it in your module's override directory. (Or, if you're using GDApp, just save it and put it in the directory.)

Creating the Variations Sheet

It clearly won't do us any good to specify a variations sheet if we don't actually have one, so open up ItemVariations.xls. If you've never worked with it before, that link will do you some good. Anyway, we'll need to create a new spreadsheet for our new spear weapon type, so go down to the bottom where the tabs are and go all the way to the right.

Itemvariations.PNG

Click on that dandy little thingy there and you'll have yourself a fancy new spreadsheet. Double-click on the name and rename it to "spear_variation"

Now then, go to one of the other spreadsheets in that file and copy some of the data, just so you get the general layout right.

Itemvariations2.PNG

If you read the document on this 2DA, you'll understand what this means. If not, go read it. Also, you're probably going to need to know how to add a custom model to the toolset, so check this out:

Adding a custom model to the toolset tutorial

Anyway, now we have our variations sheet. Add to it whatever you need, name it whatever you need, do whatever you have to do in order to get it like you want it for your own purposes. Compile it into 2DAs as per the last step and place your new spear_variation.GDA into your module's override folder. Now we're down to the final and longest step, actually adding the weapon type.

Adding the Weapon Type to the Toolset

This is where BITM_base.xls comes into play. It's going to take a while for you to do this, but just stay patient. The worksheet all the way to the left, called BITM_base, is the big one. Open it up. Make a new row for Weapon - Spear, and edit it accordingly.

Bitmbase.PNG

I recommend copying an existing row and pasting it into your new row, choosing which one to be copied based on the similarity of the existing item to what you need, and editing all of the values according to your purpose. I copied the greatsword row, since those animations are decent enough for wielding a spear. I also added in some of the wielding attributes of a staff, considering the length of the spear is only comparable to that of a staff.

Also, remember to make a unique ID number! If you're not careful, you'll run into some serious problems later.

You'll notice that I have a unique number in the NameStrRef column. To do this, open the toolset, open your module, click on Tools > String Editor, create a new string with type "Base Item Type Names," type in the name of the weapon type, and write down the string ID assigned to it and put that in the NameStrRef column. You'll also need it in another worksheet in BITM_base.xls. Also don't forget to export the talktable from the string editor.

Anyway, here's the most important part of this sheet:

Bitmbase2.PNG

Change the Variation_WorkSheet column's value on your row to whatever you made the ID of the variation sheet in M2DA_base.GDA, in this case, 11000.

Now, you're also going to need to make new rows in the ItemStats worksheet (It's self-explanatory what all this means) and _SourceData worksheet (Alright, I'm not 100% sure what this does, but you'll figure out how to edit it easily enough. Just make sure you're consistent with ID numbers and such.)

Again, compile the 2DAs, and place BITM_base.GDA and ItemStats.GDA into your module's override folder.

Using it in the Toolset

At this point, having edited all of those things and placed the GDAs into the proper override folder, you should be able to select Weapon - Spear from the Base Item Type dropdown when making an item, and the Item Variation dropdown should include Spear 1. If not,

1. Make sure your ID numbers are consistent throughout those 3 files.

2. Also make sure your GDAs are in the right directory: they should be in the override directory of your module, not Single Player.

3. As much as it hurts on the inside, it might not be a bad idea to start over if neither of the above two are helpful.

4. And if starting over doesn't help, I did not do a very good job on this tutorial, and someone else needs to come along and correct it for me. ;)

You may encounter some problems after getting your new weapon type into the toolset, specifically "Could not get the name for the model type..." which probably will not allow you to equip any weapon with your new weapon type on a creature in the editor (yeah, this one happens to me every time). Don't worry about that, just close the toolset and open it again, and this problem should be fixed (to a degree. you will still get this error when creating a new weapon of the new type, but again, if you try to equip it on a creature and it won't let you, close the toolset and try again).


Anyway, here's hoping everything works for you! Good luck!