• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Pack Lord - Revamp

Sphynx

Well-known member
Rather than just divide the druid level amongst the animal companions, which we all know from experience is a terrible thing to do... I'm wanting to implement an equally simple system that won't destroy the archetype...

I'm wanting to set all the companion levels to be equal to:

Code:
var totalComps as number
var compLevel as number
var myLevel as number

totalComps = hero.childcount[Hero.MultComp]
myLevel = field[xTotalLev].value
compLevel = myLevel

if (totalComps > 1) then 
    compLevel =  myLevel - totalComps
endif

if (compLevel < 1) then
    compLevel = 1
endif
Or something to that effect... I however can't find anywhere where the pack lord's animal-companion-levels are set. It's not on the archetype, it's not in the companion, it's not in the Pack Bond, and I can't even find Nature Bond...

So, is this hard-coded stuff that can't be changed? It's not a huge problem since all it does is make some text red if you ignore the current rules (so char-gen is still possible), but was hoping to get my player out of the red if possible. :P
 
As opposed trying to put what you want into code to explain, can you just explain what you want without the code?

It seems like you're trying to make your companion level equal to your druid level minus the number of companions.

If you have Rite Publishing's The Secret of Adventuring the Ranger's Pack Hunter archetype deals with having multiple companions and different levels than normally calculated for multiples.
 
I think your main issue here is you're trying to get the number of animal companions on the hero by counting the Hero.MultiComp tags. There will only ever be one of those.

Instead, you'll likely have to foreach through all cAnimMult picks on the hero, count them, and then use that to calculate how many total levels should be spread among all the companions as well as what you want each companion level to be. Override the cAnimClass pick's CompClLev field with your total levels value, and add a second eval rule which foreaches through all cAnimMults on the hero and complains if their UserLevel field is set to an incorrect value.

Hope that helps!
 
Thanks to both of you for your responses. Unfortunately, I do not have that package from Rite's Publishing, which is why I tried to get my answers from the Pack Lord archetype.

Aaron, the scripting suggestions have been written in, but I seem to be doing it in the wrong place. I put it in a new Archetype (Pack Lady), but it generates the following error:
attempt to access field 'xTotalLev' that does not exist for thing 'arPackLady'

I changed the Pack Lady to use a new PackBond2 and placed the eval script there instead, which stopped the error, but had no visible effect. :/

Code:
var myLevel as number
var compLevel as number
var totalComps as number

totalComps = 0
compLevel = myLevel
myLevel = field[xTotalLev].value

foreach pick in hero from MultCompan
	totalComps += 1
nexteach


if (totalComps > 1) then 
    compLevel =  myLevel - totalComps
endif

if (compLevel < 1) then
    compLevel = 1
endif

hero.childfound[cAnimClass].field[CompClLev].value = compLevel

I assume that the problem is in that last line, which should undoubtedly be a foreach loop, but trying it on the MultiComp again didnt' work out either. :/

Again, thanks for your help so far, though if you could assist further, it would be greatly appreciated.
 
xTotalLev doesn't exist on an archetype. What you'll want to use is

Code:
linkage[varies].field[cTotalLev].value
 
As AndrewD2 says, you'd need to transition from the archetype, to the class to detect the level. Here is how I would do it.

Eval Script at First 490 (might need to shift this later)
Code:
doneif (islinkage[varies] = 0)

var numcomp as number

foreach pick in hero from MultCompan
 numcomp += 1
 nexteach

~ This variable stores the number of levels each companion should have.
var eachcomplv as number

~ The calculation is Class Level - (#companions - 1)
~ For example, a 10th level druid with 1 animal companion has each companion at 10th level. 2 animal companions lowers each by 1 level (so they are 9th level), 3 = 8th level and so on.
eachcomplv = linkage[varies].field[cTotalLev].value - maximum(numcomp - 1, 0)

~ Our total number of levels to be divided (evenly) among the animal companions is each companion's level times the number of companions.
hero.childfound[cAnimClass].field[CompClLev].value = (eachcomplv * numcomp)

Then an eval rule at Validation 10000
Code:
doneif (islinkage[varies] = 0)

var numcomp as number

foreach pick in hero from MultCompan
 numcomp += 1
 nexteach

~ This variable stores the number of levels each companion should have.
var eachcomplv as number

~ The calculation is Class Level - (#companions - 1)
~ For example, a 10th level druid with 1 animal companion has each companion at 10th level. 2 animal companions lowers each by 1 level (so they are 9th level), 3 = 8th level and so on.
eachcomplv = linkage[varies].field[cTotalLev].value - maximum(numcomp - 1, 0)

~ This variable tracks whether we have one or more companion not at the appropriate level.
var mismatch as number

foreach pick in hero from MultCompan
  if (eachpick.field[UserLevel].value <> eachcomplv) then
    mismatch = 1
    endif
  nexteach

validif (mismatch = 0)

Not tested, tweak as necessary.
 
Again, thank you to both of you, and so terribly sorry that you guys are practically writing this for me. :(

The only current problem is the validif, which gives the following syntax error upon compiling:

-> Script does not support the '@valid' special symbol so use of 'validif' is illegal

I commented it out, and the rest of the script compiled without error, so I guess I just need the validate. :/
 
Pay close attention to what Aaron says just before each script - does he say to make that one an Eval Script or an Eval Rule?
 
Thanks Mathias, that got rid of the error, but no effect on the red.

I'm starting to think that the validation almost has to happen in the Animal Companion, not in the Archetype (after all, the Archetype is valid...). I'll try that next and see how that goes.
 
Animal Companion is not added to the Druid Class.

The "Custom Ability" for "Nature Bond" is added

Nature Bond is not a Class Special nor a Custom Ability (so can't find it to copy it to add my version of Animal Companion).

Animal Companion is under Companion Type, but no way to tell the Archetype (or the Nature Bond) to pick a different/copied Animal Companion.

Not that I'm giving up, but I understand if too much time is being spent on this silly quest. I don't have a perceived notion that this is something needing to be fixed. :) I'll keep trying to work on it, but don't feel any obligation to make this work. (though if I'm right, and it is impossible with the app as-is, letting me know so I spend less time on it would be cool :P)
 
I don't think it's impossible, although your latest post has confused me greatly about what you're attempting. Maybe you could send me a copy of the user file? Forum name at wolflair dot com.
 
Alright, turns out the issue was timing. As I mentioned in the previous post, First 490 was slightly too early. It was overwriting the default value of the companion levels, and then the normal processes were adding on top of that. Pushing that back to 500 seems to have things working in my tests.

Other things I noted:

The Evalrule you made needs to have the Message set, right now it just says ????, which is not helpful.

You have another eval script on Pack Bond (cDrPacBon2) which is doing almost the same thing. I'd delete it to avoid confusion.
 
You're absolutely right... now I'll spend time trying to figure out why this works. :P

PS. the cDrPacBon2 was me trying to get it working via the ability instead of the archetype. It is of course deleted now. :)

Thank you so much for the help.
 
Not sure if this is related to my script or not, but when adjusting the levels of the companions, I sometimes get this error:

Attempt to access non-existent child pick "fMultiAtt" from script
Location: 'eval' script for Thing 'cAnimMulti' (Eval Script 'Count Companion Natural Attacks') near line 23

Should I report this as a bug? Or is this a Sphynx-error?
 
Back
Top