Endless Adventures EAC Tutorials

From Dragon Age Toolset Wiki
Jump to: navigation, search

Endless Adventures Main Page

Before You Begin Your Addin...

If you've already completed this step (either for an EAP or EAC), you don't need to worry about this tutorial.

Before you can begin creating an Endless Adventures Addin, you have to have a "fake" module to attach your addin to so that your module extends the base campaign. This tutorial walks through the basic steps required for this process.

  • Open up the toolset and select File->Manage Modules.
  • Create a new module. In the UID row, enter "endlessadv_da1" (minus the quotes.)
  • Create your module. Aside from making sure your module is compatible, the only value you need to make sure to set is the "Extended Module" value, which should be set to the Endless Adventures base module (created in step 2.)
  • Open your module from the module manager and begin creating your addin.

If you don't set your module to extend the base module, it won't properly attach to the campaign.

Finding Coordinates for the PRCSCR

In order to make sure you place your hook character in the correct place in the hub, you'll need to have a testing area (that isn't exported or packaged in the player file) to find the coordinates.

  • Copy the "cas_100" folder from the "endlessadv_da1" base campaign (in the addins/endlessadv_da1/core/env/ folder) into your addin's core/env folder.
  • If the toolset is open, close it and restart the toolset. When you create the test area, cas_100" should be available as an area layout.

You want to find an unoccupied place (check all of the compatability guides to figure out which places are taken) and place your character or a waypoint on the spot you want to use. Once you are pleased with the coordinates and orientation, copy them down for use in the PRCSCR script.

Script Templates

PRCSCR

PRCSCR: Adding a NPC to an existing area.

The linked tutorial has the basic PRCSCR used for adding new characters to the hub area.

  • The hub area's tag/resref is "ea_hub_main".

Endless Adventures Hire Script

(Based on the Follower_tutorial.)

To create the hiring script, you'll actually need two scripts. One is an include file to hold the basic functions that make the hire script work, and another script to actually run the hiring.

You'll want to first create a script called "ea_companion_h", and make sure it has the following code. (This is mostly the same as the linked tutorial, but some changes were made "under the hood" to add or remove certain features.)

  • Note: If this script doesn't have the same code as the base Endless Adventures module, you may override the functionality of the script and cause companions from other modders to work incorrectly when your mod is installed. Make sure to make any changes to companion scripting in your personal scripts rather than this one.

Link to "ea_companion_h" code. (Moved due to size.)

After you have copied and saved this script (it won't compile properly because it's an include script), you want to create your hire script (whether you will call it as-is or part of a plot flag script.) The standalone script should look like this:

#include "ea_companion_h"
void main()
{
object oFollower = GetObjectByTag("eac_duncan");   //Pass your follower object, mandatory
 
int nClass = CLASS_ROGUE;    //Pass a Class constant here, usually CLASS_ROGUE, CLASS_WARRIOR, CLASS_WIZARD.  Mandatory due to a bug.
 
int nForceSpec = 0;  //This is the ID of the Specialisation you want.  Note they are NOT classes, but abilities.  The full list is:
                             //ABILITY_SPELL_HIDDEN_ARCANE_WARRIOR, ABILITY_SPELL_HIDDEN_BLOODMAGE, ABILITY_SPELL_HIDDEN_SHAPESHIFTER, ABILITY_SPELL_HIDDEN_SPIRIT_HEALER
                             //ABILITY_SPELL_HIDDEN_BARD, ABILITY_TALENT_HIDDEN_ASSASSIN, ABILITY_TALENT_HIDDEN_DUELIST, ABILITY_TALENT_HIDDEN_RANGER
                             //ABILITY_TALENT_HIDDEN_BERSERKER, ABILITY_TALENT_HIDDEN_CHAMPION, ABILITY_TALENT_HIDDEN_REAVER, ABILITY_TALENT_HIDDEN_TEMPLAR
 
int nALTable = 0;    //This is the ID of an ALTable from 2DA_base.GDA or your module's m2DA_base_*.GDA  I recommended the latter, but you can edit that into GetCustomFollowerALTable below rather than passing it.
 
int nAutolevel = 0;     //Sets the Autolevel flag on the character sheet.  0 is off, 1 is on, 2 forces it on and removes it so the player can't turn it off.
 
int bFreeSpecPoint = TRUE;  //This grants a specialisation point to the follower if they do not have a specialisation.
                                //It's important to set this false for classes that do not have specs, such as CLASS_DOG.
 
int nTargetLevel = 0;   //If you want a specific level, set this.  Generally not worthwhile unless you set it higher than the player, since they'll just get XP from the party picker anyway.
 
int nMinLevel = 0;       //Set this if there's a specific level you don't want the follower to go below.  Probably only useful if the PC might be very low level but not necessarily so.
 
// Run the hire script.
EA_HireFollower(oFollower, nClass, nForceSpec, nALTable, nAutolevel, bFreeSpecPoint, nTargetLevel, nMinLevel);
// Set a plot flag (optional)
// The first field is the tag of the plot file.
// The second field is the flag ID.
// The third field is TRUE (1) or FALSE (0).
WR_SetPlotFlag("eac_duncan_plot", 0, 1);
}

Tutorials