• 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

Overriding skExtRanks

frumple

Well-known member
I am trying to override the automatic addition of master's ranks to a multifamiliar with a new calculation. I cannot seem to get the timing right, even so trying to overwrite skExtRanks doesn't seem to be working.

Here is the code:

Code:
~ compare skill ranks from master and minion
~ use 1/3 master's ranks and assign them to skExtRanks

~ go through each familiar
foreach pick in hero from MultCompan where "Hero.MultiFamil"

~ go through skills in familiar 
foreach pick in eachpick.minion from BaseSkill
  var famRanks as number
  var mstRanks as number
  ~ get ranks in familiar minus already added ext ranks
  famRanks = eachpick.field[skRanks].value - eachpick.field[skExtRanks].value
  ~ get the master's ranks/3 to be applied to the skill in the comparison
  mstRanks = round(eachpick.field[skExtRanks].value/3,0,-1)

  ~ now compare
  if (mstRanks > famRanks) then
     perform eachpick.assign[Helper.MasterRank]
     ~ let skill know it now has ranks
     if (eachpick.tagis[Helper.HasRanks] = 0) then
        perform eachpick.assign[Helper.HasRanks]
     endif
     ~ let skill know it is usable
     perform eachpick.delete[Helper.NotUsable]
      ~ now replace the skill rank value
     eachpick.field[skExtRanks].value = maximum(mstRanks,famRanks)
  endif
  
    
  
nexteach
nexteach
 
It doesn't look like this is currently possible - your window is after Post-Levels 8999 and before Post-Levels/9000 (aka no window).

I've changed it so that as of the next update, your window will be between Post-Levels/8995 and Post-Levels/9000.
 
Awesome!

Also, is there a way to get rid of the level selector in the multi-familiar, or reset the max levels to be something other than the hero's character level? I was playing with the tag Helper.SplitSkill which does remove the selector, but that seems to bring along with it other requirements that do not apply for the case I am coding.
 
What fields are available on the classes that look right? Those values ought to be stored in fields, which would then be available for the user to alter.
 
I sorry Mathias. I don't see what you are talking about. I am looking for a field that sets the maximum number of levels in total allowed for multifamiliars (which is usually equal to the class level).
 
Right. Setting the familiar's final level is not the issue. That I can do easily enough using CompLevAdj.

What I want to do is set the total number of levels that can be allocated to a multiple of the character's level. So if the character is level X and I have 2 familiars I want to be able to allocate X levels to each familiar without getting an error, or in other words allow 2X total levels.

I can possibly do this via scripts internally if there is a way to hide the level selector and not worry about the UserLevel field at all.
 
You'll need to use an eval rule for this. You can't use scripts to force the numbers to be correct in this case.
 
Ok.... so how do I get the eval rule onto cArcFMult? I assume that is where the current eval rule is that determines if the user has levels left or used to many levels, correct?
 
Ok, but how do I override the validation rules in cArcFMult so they never trigger? I need to do that and replace them with my new validation rules.
 
All the validation rules on cArcFMulti when I have Helper.SplitStat enabled. So all the validation rules that start with "Arcane Familiar: Multiple Companions have incorrect..." or "Arcane Familiar: Multiple Companions have to many..." are the ones I need.

I am using the tag to hide the level counter on each familiar since I am going to auto determine them (since in my case they are fixed). (This is much easier than making sure levels are distributed evenly and dealing with factions of levels :/)

Looking at the wiki I see eval rules are in pick context with the type evalrule. I figured if I can use a foreach statement to cycle through the eval rules on cArcfMuli then change issilent to yes it would do the trick.
 
There is no such thing as externally shutting down a script or eval rule. You need to figure out what each one is testing for, and how you can manipulate the field values it's looking at in order to make it give the results you want.
 
Ugh. I was afraid of that.

There is another way I think I can achieve what I need, but I need to hide the level incrementer and write new text for the info button. Are there tags or scripts that would allow me to do this? (Basically I want what the Helper.SplitStat tag does, but without the specifics related to the broodmaster, i.e. just the effects to the gui).
 
Back
Top