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:
	
	
	
		
				
			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