View Single Post
SeeleyOne
Senior Member
 
Join Date: Nov 2009
Posts: 891

Old February 3rd, 2014, 05:30 PM
There is a way to change the XP table. The example here changes it to 25 XP per Rank.

Make a new Mechanic in the Editor, just add it to your user file. You can also link it to a particular source if you only want to use it in certain campaigns or settings.

Phase: Final
Priority: 5010

Eval Script:
Code:
 
    var xp as number
    var xpperrank as number
    xpperrank = 25
    xp = hero.child[resXP].field[resMax].value
 
    if (xp < xpperrank * 4) then
      herofield[acRank].value = round(xp / xpperrank,0,-1)
    else
      herofield[acRank].value = 4
      endif
The first part only changes the XP table. It does not change the Advancements after 80 XP (which slows down to one per 10 XP instead of per 5 XP). So just add a second Eval script to the mechanic so that it will be nice and do it for us. This will not calculate when making an NPC and it telling us how much XP it has. Who uses that anyway? :P

Phase: Setup
Priority: 2010
Code:
     var xp as number
    xp = hero.child[resXP].field[resMax].value
    if (xp >= 85) then
      #resmax[resAdvance] +=1
      endif
     if (xp >= 95) then
      #resmax[resAdvance] +=1
    endif
I have found that the above code gets angry when you import a creature or stock character. The reason is that they do not have the resAdvance value. I have changed the code to the following:

Code:
if (herofield[acCharType].value = -1) then
    var xp as number
    xp = hero.child[resXP].field[resMax].value
    if (xp >= 85) then
      #resmax[resAdvance] +=1
      endif

    if (xp >= 95) then
      #resmax[resAdvance] +=1
    endif
endif

Evil wins because good rolls poorly .... or the players are not paying enough attention to the game.

Last edited by SeeleyOne; April 3rd, 2014 at 07:18 PM. Reason: Modified code to make imported stocks happy.
SeeleyOne is offline   #7 Reply With Quote