Dragon Age: Origins
0 of 0

File information

Last updated

Original upload

Created by

Hermaen2000

Uploaded by

Hermaen2000

Virus scan

Safe to use

Tags for this mod

About this mod

Fixes a bug with the DA Toolset utility_h-include preventing hired followers in new Modules from gaining XP without a workaround

Permissions and credits
Quoting the DA Toolset Wiki:

Note that with Toolset v1.0.982.0, calling UT_HireFollower() will result in a follower who's unable to gain xp. This happens due to the call of

  WR_SetFollowerState(oFollower, FOLLOWER_STATE_ACTIVE, TRUE, 0, '''TRUE''');

to the function

  void WR_SetFollowerState(object oCreature, int nState, int nSendEvent = TRUE, int nMinLevel = 0, '''int bPreventLevelup''' = FALSE)
This is due to a bug in the utility_h.nss include, which the Toolset, under normal circumstances, would read from the Database. Tutorials on the matter of adding new Followers to a module will invariably detail one of several fixes on how to circumvent this issue.

In my testing, I found that if an #include-able nss is present in the Override folder, it will use this when compiling a script with the appropriate #include, instead, thereby, by fixing a single line in an exported local copy of the utility_h.nss, I eliminated the need for aforementioned workarounds.

How to use:
By itself, this script does nothing and is intended as a resource for modders who add followers to their modules.
Just extract the "zz_fix_xp_gain" folder in the attached file to your %Userprofile%\Documents\BioWare\Dragon Age\packages\core\override folder. If you are already running the Dragon Age Toolset at this time, press F5 within it or restart the program for the changes to take effect.
Thereafter, if you already had scripts that included the command "UT_HireFollower", recompile them. Your followers should then be able to gain XP like intended.

How was it accomplished:
I opened the core Include file utility_h.nss as a local copy. There, I altered the single line 851 from  WR_SetFollowerState(oFollower, FOLLOWER_STATE_ACTIVE, TRUE, 0, TRUE);
to
 WR_SetFollowerState(oFollower, FOLLOWER_STATE_ACTIVE, TRUE, 0, FALSE);

This, I then exported, and deleted the local copy, keeping only the database copy and my own. I took it out of the toolsetexport and into a folder of its own, starting with "z" to keep it the sovereign of its load order. Then, I refreshed the toolset and recompiled my scripts. My follower, now not needing any adjustments to the module script whatsoever, gained XP as intended.

Recommendation:
Whenever you compile a script, a lot of stuff floats into your toolsetexport folder. Some of these things may override other script-mods. For these, I recommend my trusty Flotsam Cleaner.