Tutorial on how to Mod a Spell for DAO
Dragon Age Origins
Topics and Discussions on the popular Dragon Age Origins game produced by Bioware.
Tutorial on how to Mod a Spell for DAO
by Webslug » May 13th, 2010, 5:45 pm
Tutorial Subject
The purpose of this tutuorial is to illustrate how to modify the spell Fireball. Much of the logic that defines spell properties is done in code instead of 2da files, we will be opening up some scripts, and modifying the damage value of fireball. (Not all spell properties are in code, there are still some that are handeled by 2da's)
Tutorial Content
"This will be a brief tutorial on how to alter the damage of Fireball in your Dragon Age OC (Original Campaign).
Setup
Altering the damage of spells and talents in Dragon Age is not done through the 2da files, even though it would have been more convenient to do so. I suspect it was done this way for performance reasons. Moving along, open up the toolset. It's a safe bet you have either the Single Player 'module environment' open, or your own custom made one It shouldn't matter which one we use, but to avoid any potential issues use a custom module you already made, or follow along to make a new one Under File -> Manage Modules, you are going to want to select new. In this example we need to set the [Name] field and the [UID] field. Name is obviously the displayed name of the module. UID represents the name of the folder created by the toolset on your HDD under this location:
For XP: \MyDocs\BioWare\Dragon Age\AddIns\ [UID] \
You should be able to use any module, but I will assume a blank one. On the right, find the Scripts under the Palette Window. We will using [spell_constants_h], which contains the values that correspond to the raw potency of the spells. We will also be using [spell_aoe_instant], as the _h suffix signifies what is called a Header file. While we will do our edit in the constants file, it will not be complied directly.
Before you dive in, you should understand how the toolset manages data. The scripts we are looking at in the palette list are actually the same scripts your game is using when you are playing. Making hasty changes, especially without backups, can trash your game. This is where the data structure comes in. If you open [spell_constants_h], you will see a Read Only Copy at the top in red. This is because this resource is not 'checked out' of the database. Checking out a 'resource', like this script, gives us full edit permissions. This is a core game resource, and editing it would be bad; Instead, we want to right click, and 'Open Local Copy'. This is a copy that you can edit, without your changes reflecting on the original.
Editing
Open a Local Copy of [spell_constants_h]. You will see a yellow bar if done properly. Scroll down to the spells you desire, in our case primal. It's in the middle, and we are looking for:
const float FIREBALL_DAMAGE_FACTOR = 0.3f;
I want a really beefy fireball, so lets ramp it up, 10x the damage. We should have something like this:
const float FIREBALL_DAMAGE_FACTOR = 3.0f;
This is the main method used to alter the damage between spells as they all follow a basic function that allows for easier power scaling. Should one desire to see this, it is found in [spell_aoe_instant] for our spell of choice. Open a local copy of this now since we need it later. This file is more detailed, but you can look for or search for:
case ABILITY_SPELL_FIREBALL:
Since all we are going to do is make our fireball stronger, we will not be changing anything in this file. If you want to make changes to other spells at the same time, the only thing to remember is you have to also open the file with said spell's functions. While Fireball is in the [spell_aoe_instant] file, Cone of Cold is in [spell_cone]. The header file is compiled when a file that 'includes' this file is compiled, thus why we need the files we are not altering. We have made the changes we want, and we have [spell_constants_h] and spell_aoe_instant] open. You did open them locally right? (Yellow Bar)
Compiling
Now, I saved my scripts, unsaved ones have a * by the name, though I am not sure it is needed (the _h file will throw an error when you save it, ignore it). Select the [spell_aoe_instant] file and click 'Compile Script'. If done correctly it should say stuff like Compile Successful.
That is it for the toolset part. Navigate to:
\MyDocs\BioWare\Dragon Age\packages\core\override\toolsetexport\
You will find probably something like 84 files, don't be alarmed. Those are all files that were 'linked' to the ones we compiled. If your tool-
set has not been fiddled with, they will all be the same as the current game ones. Regardless, we only need these two files:
[spell_constants_h.nss]
[spell_aoe_instant.ncs]
You can delete the rest (there was 84 total, 82 I deleted).
Note the extensions, there will likely be two versions of the ones we compiled. Both of these files need to be here, even though we did not alter the aoe one, for reasons outside the scope of this post.
Finale
This is essentially it, you can open your game, and drop a fireball on your party and laugh. The 'module' we just made will show up in the
'Downloadable content' menu. Since our mod was blank this is no issue, but you might want to remove our 'test bed' from that menu. This is as simple as navigating to:
\MyDocs\BioWare\Dragon Age\Addins\
There you can delete the folder that has the name of the [UID] we made earlier. This can remove potential resources like Level files, both raw and exported, so make sure you know what you are doing. This will not, however, remove it from the Toolset. The toolset will re-create that folder if the module is selected/loaded. It will not replace the lost files, but rather it retains 'designer resources' which are 'virtual' assets stored in the database, like placeables. Our spell mod does not require the 'module' to be active to function, if you feel queasy about deleting things, you can just disable it. This is more for modules you are working on that do have real resources, but are still in early testing phases. Our mod is completley independent of the 'module' system since we are directly overriding the spell scripts. This will cause issues with multiple mods trying to achieve the same effect. There appear to be potential workarounds, but they are far beyond the scope covered in this post."
Credits
This tutorial was created by me, it can be used whereever so long as you refer to where you got it, or link to it. Thanks.
Please remember to comment, it helps to encourage modders with their work.



Webslug- 1.0

- Posts: 1054
- Location: England
- Uploads: 18
- Kudos: 16
- Motherboard: Gigabyte EP41
- CPU: Intel Core 2 Duo
- GPU: Nvidia 9800 GTX PCI
- RAM: 2048 RAM DDR 2
- Related topics
- Replies
- Views
- Last post
- Adding a New Spell Tutorial
by Webslug » July 2nd, 2010, 6:35 pm - 1 Replies
- 1040 Views
- Last post by Mase

December 9th, 2010, 4:58 am
- Adding a New Spell Tutorial
- DAO Arcane Warrior Guide
by Webslug » July 13th, 2010, 7:43 pm - 0 Replies
- 3602 Views
- Last post by Webslug

July 13th, 2010, 7:43 pm
- DAO Arcane Warrior Guide
- DAO Blood Mage Guide
by Webslug » July 13th, 2010, 8:27 pm - 0 Replies
- 2221 Views
- Last post by Webslug

July 13th, 2010, 8:27 pm
- DAO Blood Mage Guide
- DAO Spirit Healer Guide
by Webslug » July 14th, 2010, 8:47 am - 0 Replies
- 798 Views
- Last post by Webslug

July 14th, 2010, 8:47 am
- DAO Spirit Healer Guide
- DAO World Editing and Area Creation
by loder » May 24th, 2010, 12:09 pm - 0 Replies
- 351 Views
- Last post by loder

May 24th, 2010, 12:09 pm
- DAO World Editing and Area Creation
- Dragon Age Shapeshifting tutorial
by loder » May 13th, 2010, 6:11 pm - 0 Replies
- 781 Views
- Last post by loder

May 13th, 2010, 6:11 pm
- Dragon Age Shapeshifting tutorial
- Dragon Age Origins Arcane Warrior tutorial
by loder » February 15th, 2011, 1:11 pm - 0 Replies
- 513 Views
- Last post by loder

February 15th, 2011, 1:11 pm
- Dragon Age Origins Arcane Warrior tutorial
- Dragon Age Origins Respawn Mod
by BrunEXx » July 18th, 2011, 12:11 am - 1 Replies
- 349 Views
- Last post by Wotan

January 3rd, 2012, 8:00 pm
- Dragon Age Origins Respawn Mod
