RPG Maker Forums

When using N.A.S.T.Y. Extra Stats https://forums.rpgmakerweb.com/index.php?threads/n-a-s-t-y-extra-stats.998/ and Theo Custom Parameter Formula https://www.rpgmakercentral.com/topic/20334-theo-custom-parameter-formula/, I am trying to create a custom parameter that determines how much HP is gained by an actor's Constitution xstat. I'll preclude this by saying that I have little to no understanding of how ruby scripting works, and I am struggling through the dark to try and get this to work. Forgive me for my lack of understanding if I make simple scripting errors.

I'll give a run down of what is supposed to happen: Let's say a character starts with 20 HP at level 1, and starts with 10 CON. Any amount of CON above 10 increases Max HP by 8, per point in CON. That's governed by this formula: 20 + (8 * (CON - 10)) For instance, if a character has 12 CON, he has 20 + (8 * (12-10)). This becomes 20 + 16 = 36.

The formula I made in the Theo Custom Parameter script looks like this (the relevant part between "def" and the second "end"):

Code:
  def custom_mhp(ori_param)
    if $game_actors[actor.id].xstat.con > 10
      20 + (8 * ($game_actor[actor.id].xstat.con - 10))
    else
      20
    end
  end
With this, I get an "Stack Level Too Deep" error. I have tried other variations like:

Code:
  def custom_mhp(ori_param)
    if $game_actors.xstat.con > 10
      20 + (8 * ($game_actors.xstat.con - 10))
    else
      20
    end
  end
This don't work either. I feel like the only way to move forward is blocked because I lack the knowledge to understand how this works.

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top