Creating custom classes with minimal impact on the game

From Dragon Age Toolset Wiki
Revision as of 06:57, 6 December 2013 by Ladyofpayne (Talk | contribs) (Items)

Jump to: navigation, search

This tutorial will be useful to anyone that wants to create a new class for Dragon Age: Origins or a stand-aone module using the Dragon Age game engine; I will assume that you have installed the toolset successfully and have read through the tutorial Creating modules for Dragon Age. This will contain much of the existing custom class tutorial, but expanded on to include details on creating new abilities and skills, as well as making sure these function properly in Bioware's official Expansion and stand-alone DLC. It may include guidance for creating content specific to the class that will transfer from the base game to official expansion\DLC content as well.

Designing the new class

There are a number of things that need to be considered when creating a new class for Dragon Age; how does it fit into the existing game lore, what abilities will it have, what races and origins will be able to use it, and are those abilities Stamina-based or Mana-based. New Specializations, which are created in the same manner as classes have to take these factors into consideration as well.

Lore considerations

When designing a class that will be used in Origins, Awakening, Golems of Amgarrak and Witch Hunt, you need to consider how the class fits into the lore of Thedas; when I created the Tevinter Warden Class (using a previous class creation tutorial) I initially intended for the Warden class (the original name) to be a fusion of the Ranger and Druid from Dungeons and Dragons. After careful consideration, i felt that since the game lore did not provide a way to justify "earth spirits" granting spell-like abilities, I would make them into a group of highly trained Warriors with arcane spellcasting abilities. I also felt that the origins of the class should tie into the setting in such a way as to give it the feel of something that Bioware would have created if they had desired to.

Designing classes for stand-alone modules may or may not be similar, depending on the setting used; an module set in Thedas obviously should follow the above guidelines, but modules set in other places (like the BAldur's Gate 2 Redux mod) should be made more loosely tied to lore.

Class Abilities

Race and Origin Restrictions

This is an interesting thing; while there may be no lore-based reason to deny a given custom class to any race or origin, there may well br other reasons to do so. For example, there may be certain things that you want to give to your new class that don't fit well with your vision of certain of the races in the game; this is where restricting by race or origin comes in. The easiest way to implement these restrictions in the Origins Campaign is to limit the class to specific origins. There is one caveat I need to mention though; due to how Bioware implemented the Noble Origins, you cannot easily restrict a class to either the Human Noble or Dwarf Noble, nor can you properly implement restricting a Magic-using class in the Origins Campaign. That is one current bug in my Tevinter Warden class that I do plan on fixing eventually.

Other Ability decisions

One of the most important decisions you have to make is whether your class will be Stamina-based or Mana-based; this impacts several things and creates some interesting dilemas if you are adding this class to the Origins and/or Awakening Campaigns. Most notable is that if you create it as a Mana-based class, you gain access to all Mage spell schools and if Stamina-based, you gain Dual-wield and Archery for free. If you don't want those abilties there is some extra work involved in separating them out, which I will explain how to do when the time comes.

What Bioware Modules to support

This decision is up to you, but I have designed my class to support Origins, Awakening, Golems of Amgarrak and Witch Hunt. I will explain how to do it so that the individual modules can be safely installed at the same time and not interfere with each other. It is possible to create a single installation for all related modules; I will attempt to explain this as well. Also, if you are adding a class that you would like to be considered for inclusion in the Extended Community Canon Project, send me a PM on BSN (username ladydesire) and I will assist you with the lore tie-ins and compatibility with my class; you may also wish to contact Questorion or daywalker03 to have them add information about your class project to the Extended Community Canon project page on Wikipedia.

Should you support Community modules

This is a difficult question to answer; if you're doing this for a custom campaign you are making, and the class doesn't make much sense outside of it, then you don't need to. On the other hand, if you're going to support the official Bioware modules like I did, it might be a good idea to contact module authors to see if you can work with them to make your class work in their stand-alone module; I have contacted one and have attempted to make a mod for his module and I may contact others to do the same thing.

Equipment

Your new class (and specializations as well) will need items that they can use; you can just equip them with basic armor and weapons, but they should also have specific items that are only usable by that class. As an example, in my Tevinter Warden class mod, I added starter versions of custom armor and weapons that had specific properties that would benefit the class. One thing you need to do, especially if you intend for your class to be usable in Origins, Awakening, Golems of Amgarrak and Witch Hunt, is make sure those items are set as Core Game Resources owned by your Origins class module; this will enable them to transfer into the expansion and DLCs without your character ending up naked. This is what Bioware did with the items from the Return to Ostagar DLC, but was not used for Stone Prisoner or Warden's Keep.

Armor

Your new class needs to provide something to protect it, be it armor or robes (no naked berserkers allowed). What they will look like depends on your ability to create new models yourself or acquire them from someone who can do the work for you; you can also use the models provided by Bioware if you wish.

Weapons

As with Armor, your new class needs weapons (unarmed combat is strongly discouraged by the in-game load screens). As with Armor, you can make or acquire models, or use the ones Bioware provided.

Class foundation data

Now that you have a vision for your class and some idea of the equipment they will need, we can move on to actually creating the class; this part can be very frustrating, but I've pulled my hair out figuring these things out so hopefully you won't have to.

Please note that there are some steps that may seem senseless in the following sections, and they may not all be needed, depending on what kind of module you are using the class in; I will point out the things that are likely not going to be needed for stand-alone modules when I go through the actual assembly process for the module.

2da files needed

The following is a list of files that are needed when creating new base classes for DAO's Origins campaign; I will also show the files needed to add the class to Awakening, Golems of Amgarrak, and Witch Hunt:

Origins 2DA Files

ABI_Base.xls\ABI_base

CLA_base.xls\CLA_data

2da_base.xls\M2DA_base

background.xls\Backgrounds

background.xls\background_defaults

background.xls\chargen_preload

ALWizard_default.xls\ALWizard_default

Achievements.xls\Achievements

guitypes.xls\guitypes

CLA_base is where the classes are defined for the game engine to find. You will need to make two copies of the CLA_base worksheet; I will explain why later on. M2DA-base is where you will add references to any new 2DA files you create; this will allow the game engine to know what to do with them. Backgrounds, background_default, and chargen_preload are where you define the specifics of your new class so that you can create new characters in the character generation screen. ALWizard is the class's AutoLevel package (this is mainly useful if you plan to create companions with the class in your mod; it's not strictly neccesary otherwise) Achievements is used in two ways; one is to add new class-specific achievement messages (like when unlocking specializations) and the other is related to the reason you need two copies of the CLA_base worksheet.

Awakening 2DA Files

CLA_base.xls\CLA_data_gxa

2da_base.xls\M2DA_base_gxa

background.xls\Backgrounds_gxa

background.xls\background_defaults_gxa

background.xls\chargen_preload_gxa

ALWizard_default.xls\ALWizard_default_gxa

Achievements.xls\Achievements_gxa

classes_filter_gxa

Most of these files serve the same purpose as their Origins counterparts; the classes_filter_gxa file is new for Awakening and the stand-alone DLCs Golems of Amgarrak and Witch Hunt. It handles restricting classes by race, since there is only one Origin that is used for new character creation in these modules, if you have Awakening installed; I believe (I have not yet tested it, though) that if you do not have Awakening installed, or it is installed but not enabled, Golems of Amgarrak and Which Hunt will allow you to use the Origins gda files to create characters.

Scripts needed

You will need copies of many of the default scripts; I will include a builder to builder file with these premade, so you won't need to do it yourself.

You will need a module script; I will include a basic one in the builder to builder file.

One thing that is critical to note; you do not need to put any files in the users packages/core/override folder for your class mod to work.

The module script

The module script for a custom class mod needs to do several things; it needs to do event handling and it needs to hand certain events to a customized sys_chargen script for further handling.

Event handling

Your custom class abilities may need to work in a manner that is consistent with how similar abilities included in the game work; for this to happen, you need to listen for certain events to occur and provide a way for the abilities to respond to them. For example, a modal ability that is supposed to end at the end of combat needs to do that; the way to do this is to capture the end of combat event and turn off the modal ability in your module script, then allow the game to continue processing the event to disable other modal abilities that also need to be handled. Another example is an ability that immobilizes a foe; When the foe enters the field of effect, the on_enter event needs to be handled to apply the immobilization effect, if the foe would be captured, and apply some other effect (like slowing movement rate) if they are not immobilized completely.

Creature templates

You will need to make duplicates of the default_player character template in the toolset; one each for the races/origins you wish the class to be available to. I may include these in the builder to builder file for you to rename as needed. While you can use one template for all Races and Origins, having multiple templates allows you to provide different equipment sets for each, to help blend the class into the existing Origins; I have done this with the Tevinter Warden class so each starting character has weapons that fit the introductory cutscene as seamlessly as possible. This is not needed if you are building a custom class for a stand alone module that doesn't have a fancy Origin story to set the stage for later events.

Putting it all together

To quote Han Solo in Star Wars "Here's where the fun begins". Now we need to put all these things together to make a working class.

Creating the work modules

If you have not already done so, you need to create at least one module to work in; I explain how to do this in the Creating a Module tutorial, so I won't repeat it here. Once you have done so, you will want to import the scripts into your working module and check them in; this simply allows you to make a backup of the entire database so you can recover from a serious problem without losing what you have built. You should make weekly backups at minimum; daily would be better, but it all depends on how much work you do on the mod each day. You will need one module for each Bioware module you choose to support; you will also need one dummy module for the modules that are not currently included in the database (a total of 7 modules if you choose to support all 4 modules like I do).


The dummy module names

To support Awakening, Golems of Amgarrak and Witch Hunt, you will need to create the following dummy modules; be sure to enter the information exactly as shown:

Awakening: dao_prc_ep1

Golems of Amgarrak: dao_prc_gib

Witch Hunt: dao_prc_str

Creating the gda files

There are two ways to procceed at this point; you can simply make copies of the original Excel Spreadsheets included with the toolset (these are found in the game installation directory under tools/source/2da/) and duplicate pages (which is how I do it) or you can create a new spreadsheet and copy the above named pages into it. Either way will work, though the second method simplifies the process quite a bit. In either case, I recommend creating a directory elsewhere on your hard drive to store the files you will be editing.

Now, remember when I said you would need two copies of the CLA_base worksheet? I'm going to explain why this is needed; due to how the game interpretes a formula in the default sys_chargen script, you have to renumber the rows for the Bioware default specializations to have a working row id for your new base class. I have moved them up to start at row id 30 in mine and will provide a set of files set up that way as a starter kit to make things easy for you. The first cla_base file will replace the original one; this is also why you need to include the Achievements.gda, as you will need to edit the rows related to the specializations to match the cla_base file. The second cla_base will hold information related to your custom class and any specializations you decide to make for it.

Your new ABI_base file will tell the game how to handle the new spells/talents your class will have; I will go into more detail in the section on scripts.

Editing the scripts

Creating the items

Editing the creature template

The default_player templates provided for the three officially supported classes have several things that need changed to enable a custom class to used; the following method is one way to create new creature templates for your class:

  • Duplicate one of the existing creature templates for your chosen race and give it a name similar to what the game shows for them.
  • Change the class of the new template to your custom class; if the gda files are properly installed, it will show up in the drop down menu.
  • Open the creature inventory and change the equipment as needed.
  • Save the template, check it into the database, then export without dependent resources.

Exporting the files

Testing your work

Specializations

GDA files needed

You don't need as many gda files for Specializations as you do for the full class. The following list is what you need for Origins, followed by the ones needed for Awakening. Class has 8 Specializations any additional ones will not show up on the Specialization Selection Screen unless the total number is a multiple of 4. So 8 will show up and 12 will shown up, but if you had 9 Specializations the ninth one would not show up. Icon for specialisation has the same size as the default pictures: 56x56.

Origins Specializations GDA files

ABI_Base.xls\ABI_base (ABI 2da) - The Specialization's abilities have to be added here. These can be either unique abilities or copy/pasted defaults. The ability lines will reference the new Spec's guitypes row.

CLA_Base.xls\CLA_data (CLA 2da)- The main Specialization entry. It will reference the Spec's Hidden and starting ABI_Base abilities.

guitypes.xls\guitypes (Guitypes.xls) - The box/heading/section the Spec's abilities will appear in on the character sheet in-game.

Awakening Specialization GDA files

ABI_Base.xls\ABI_base_gxa

CLA_Base.xls\CLA_data_gxa

guitypes.xls\guitypes_gxa

Scripts needed

Items

Useful links

Adding a new spell tutorial