Adding Animal Companion

Is there any way to either add the Animal Companion feat to a base character, or to continue the Animal Companion feat in a prestige class? I want to allow a prestige class to count as levels for the Animal Companion to continue to advance.

Example: Kaedrin’s Forest Master prestige class requires you have an Animal Companion or the Plant Domain. However, it does not have Forest Master levels add to Druid levels so the Animal Companion continues to advance as the character advances.

Any thoughts?

1 Like

I have added a feat or two to the PC character or other NPCs. Actually, I am doing that in the beginning of the module I’m working on now.

Not sure if that’s exactly what you’re after but you could try to use the FeatAdd function in a script:

	object oPC = GetFirstPC();


Use it on some trigger (like the OnEnter of an area or other generic trigger) or as a script in a conversation.

I’m actually looking for it to be a part of character creation, as in the Druid. In Kaedrin’s pack, he has the Lion of Talisid prestige class, that simply continues the Animal Companion’s advancement. That is what I am trying to do with another prestige class or 2. Hoping it doesn’t involve any scripting. Hoping.

If it’s to be part of character creation then I can’t help you. That’s beyond my knowledge. That would (I’m only guessing here) involve altering a bunch of 2das and perhaps even xml coding. I guess you will have to wait for kevL_s, travus, Lance Botelle, Shallina or someone like that to help you.

for the Lion of Talisid class, Kaedrin uses a special function

int GetAnimalCompanionLevel(object oPC);

that adds Lion levels

add ForestMaster (etc) to that function and recompile dependent scripts …

1 Like

Is that in an existing script, or is it something new that would have to be worked on? Still going to work on the other project first, possibly over the weekend. Getting a lot of appointments taken care of before upcoming vacation.

I have not looked into/used Kaedrin’s stuff, but if I’m interpreting @kevL_s post right, you need to edit some of the scripts that are included in Kaedrin’s Pack. I could try and take a look at it if you want, but I guess you could maybe just do it yourself just as well?

EDIT: Tried to download and take a look, but it’s a total mess. There’s A LOT of scripts in Kaedrin’s Pack and I don’t know where to start looking for the function kevL_s mentioned. Better wait and let him help you instead, I think.

the function is in either




So, if I wanted the Marksman’s Animal Companion to continue gaining levels, would I add the following line right after the lines for Druid and Lion?

nCompLevel += GetLevelByClass(CLASS_MARKSMAN , oPC);

Or any other class that I wanted like say the Forest Master? Just add that line with the class I want in the location I want?

Once I add lines to an NSS file, what makes it become an NCS file that the game will execute? Just really befuddled by this. I think I’m on the right path, only to end up walking into a wall.

Compile [F7 in the toolset’s Script Editor]

But note that some .Nss files are merely libraries – they have neither a void main() nor an int StartingConditional() function. They do not compile into bytecode, at least not directly. Only when a script that uses stuff in a library-file is compiled, the compiler pulls that extra stuff in and compiles all of it at once into the .NCS file.

That means that changes to anything in a library-file has no effect until the parent script is recompiled. And there can be more than one so-called parent …

ps. will look into the other question in a minute

1 Like

Yes but there appears to be a slight problem, in that CLASS_MARKSMAN is undefined. Kaedrin defines his constants in cmi_includes (nss). That’s why

const int CLASS_LION_TALISID = 123; // row # in Classes.2da

So you need to define this somewhere (unless it’s already defined somewhere … i haven’t looked for it much)

const int CLASS_MARKSMAN = 155; // row # in Classes.2da

either in cmi_includes or cmi_animcom or … uh, anywhere that’s in scope.

Then you can do, as you say

nCompLevel += GetLevelByClass(CLASS_MARKSMAN, oPC);

Same holds for the other classes that you may wish to add … or you can get fancy and add a class-level for AniComp per 2 class-levels:

nCompLevel += GetLevelByClass(CLASS_MARKSMAN, oPC) / 2;


now, that’s the libraries … you need to find the script that uses that stuff that changed (and recompile that script). That script is

nw_s2_animalcom (nss)

Open Kaedrin’s version of that script and it should recompile ok if the changes you made are technically correct.

I finally got it!!!
Added the “const int” line in the cmi_includes, then the “nCompLevel” into the cmi_animcom, then opened and recompiled the “nw_s0_animalcom” And now the Marksman’s Animal Companion continues to gain levels. Groovy.
Now I can do that for other classes.

Would adding a new line in a “cls_feat_***.2da” that would show “Line#, TurnUndead, 294, 3, 1, 1” allow that classes’ levels to count with any other class that allows Turn Undead to be added? Is it just that simple?


no i don’t think so. I’m not super-proficient with the cls* 2das. But I believe they are only used for determining feats (etc) that are automatically granted (and offered) during levelups. They are part of socalled Packages … for lazy leveling …

Enhanced results when actually using those feats (etc) would require more scripting – like you just did there … but you have to learn more about all the different hook points that the engine allows us to script for, then decide like “ok, I can add such-and-such an enhancement in the module’s OnItemEquipped event” (eg)

Is there a way to have the game show the actual die rolls during combat, including spell damage, broken down, as well as special ability damage?

not so much spell damage, but for melee this is pretty good:

debugmode 1
enablecombatdebugging 1
debugmode 0

for spells/feats it’s kinda possible to break things down with debugging in the spellscripts (plus a bit in the OnDamaged handler) but a fair bit of stuff is hardcoded and just goes through without us being able to intercept it