Getting weird undefined method's in this script

##Power Level Scaling Script#v1.0###module BloodPLSS   Scale_Settings = {   😛leveltxt => "Power Level", #Shows this instead of "Level"   #Please keep this above 5, for easier use. However if you decide to make it  #lower then 5 you will have to do a lot of testing. Also never use "1" it  #will do absolutely nothing for you and will pretty much break this script  :expscale => 10, #higher this is the higher the exp will scale faster   :mhp => 20, #calculate maxhp default is  :mmp => 15, #calculates max mp default is  :atk => 15, #calculates attack default is  :def => 15, #calculates defense default is  :matk => 15, #calculates magic atk default is  :mdef => 15, #calculates mdef default is  :agil => 15, #calculates agil default is  :luk => 15, #calculates luck default is  } endclass Game_Actor  def exp_for_level(level)    exp * 10  end  def param(param_id)    case param_id    when 0 then value = super(param_id) * (exp / 20)    when 1 then value = super(param_id) * (exp / 15)    when 2 then value = super(param_id) * (exp / 15)    when 3 then value = super(param_id) * (exp / 15)    when 4 then value = super(param_id) * (exp / 15)    when 5 then value = super(param_id) * (exp / 15)    when 6 then value = super(param_id) * (exp / 15)    when 7 then value = super(param_id) * (exp / 15)    else ; value = super(param_id) * (exp / 10)    end    [[value, param_max(param_id)].min, param_min(param_id)].max.to_i  endend
SwXVHui.png


It also does it with /'s in (exp / 10) etc etc
ahh, its cause of the way the exp method is setup. Each different exp method (like exp_next_level and whatever) are all intertwined. 🙂

A much safer thing to do (that would also achieve what you want) is to restrict the max level to 1 and then the actor is never able to level up (and will remain the same level as which they joined the party)

  def max_level    return 1  end
I probably should have realized that in the last thread ^_^
Hmmm okay that should fix one problem, but would the (exp / 20) etc etc. calculate right now? As it needs to be current exp.

EDIT: Nevermind it worked and boy di it make everything 1, lol!
lol yea, I quickly tested it before I suggested it. Probably wise to have each actor given a small dose of exp when they join the party - otherwise its a whole lot of crap stats for every new actor 😀

Edit:

Also, you could make an improvement to your customization settings and change the :atk, :def etc to the param id numbers.. Then you could use this...

  def param(param_id)    value = super(param_id) * (exp / BloodPLSS::Scale_Settings[param_id])    [[value, param_max(param_id)].min, param_min(param_id)].max.to_i  endrather than having a large case statement in your method. 🙂
lol yea, I quickly tested it before I suggested it. Probably wise to have each actor given a small dose of exp when they join the party - otherwise its a whole lot of crap stats for every new actor 😀
Yeah I saw that. I just did this: 

def exp    @exp[@class_id] + 50  endBut thats seems to almost max EVERYTHING lol. Does it really scale that quickly? Or does that keep adding 50 over and over again? Because if it's not only doing it once I don't know how to do that. I'd rather it do it without the developer having to add events or stuff to add a little bit of experience to get it to work. Although they will probably have to do that anyways. But still I'd like to have it have a small base.

EDIT: Oh I see what it is doing. Gah I forgot about equipment
best thing for adding a 'base' value would be to add it directly in the param method.

Continuing on my previous suggestion of having the param id's in your module hash rather than symbol identifiers, you could end up with a script looking somewhat like this...

##Power Level Scaling Script#v1.0#module BloodPLSS   Scale_Settings = {     😛leveltxt => "Power Level", #Shows this instead of "Level"     #Please keep this above 5, for easier use. However if you decide to make it    #lower then 5 you will have to do a lot of testing. Also never use "1" it    #will do absolutely nothing for you and will pretty much break this script    :expscale => 10, #higher this is the higher the exp will scale faster     0 => {m: 20, b: 100}, #calculate maxhp default is    1 => {m: 15, b: 100}, #calculate maxmp default is    2 => {m: 15, b: 10}, #calculate attack default is    3 => {m: 15, b: 10}, #calculate defense default is    4 => {m: 15, b: 10}, #calculate magic atk default is    5 => {m: 15, b: 10}, #calculate mdef default is    6 => {m: 15, b: 10}, #calculate agil default is    7 => {m: 15, b: 10}, #calculate luck default is  } endclass Game_Actor  def max_level    return 1  end  def param(param_id)    mod   = BloodPLSS::Scale_Settings[param_id]    value = super(param_id) * (exp / mod[:m]) + mod[:b]    [[value, param_max(param_id)].min, param_min(param_id)].max.to_i  endend
which accommodates a base value for each stat and a modifier value for the calculation. ^_^
Hm thats cool. I should slap myself cause thats a bit obvious lol. Although I didn't know you could do that... being a noob sucks! Lol.

However this does present a problem... it makes equipment obsolete, it is not adding it, it would need to add it in the end though not while the calculation is going.
dunno why its not adding the equipment value as its still going to be calling the 'param_plus' method due to calling 'super'. And for actors, the param_plus method adds on the values obtained from the equipment. As seen here.

  #--------------------------------------------------------------------------  # * Get Added Value of Parameter  #--------------------------------------------------------------------------  def param_plus(param_id)    equips.compact.inject(super) {|r, item| r += item.params[param_id] }  endEdit:

Just realized why its not counting them lol.

So obvious, its cause its multiplying the value after equips with the exp / value. ..

Try something like this...

  def param(param_id)    min = param_min(param_id)    max = param_max(param_id)    bas = param_base(param_id)    pls = param_plus(param_id)    rat = param_rate(param_id)    brt = param_buff_rate(param_id)    mod = BloodPLSS::Scale_Settings[param_id]    val = bas * rat * brt * (exp / mod[:m]) + mod[:b] + pls    [[val, max].min, min].max.to_i  end
this is obviously a full overwrite from the superclass, which may cause some kinda problem with some scripts 😛
I'm not sure then, but I have tested it by equipping other things, unequppuing etc etc

okay for some reason it does nothing when you no experience. I just fought something and got experience, and it fixes itself.
just updated my last post 😛
Okay that works woohoo! Now I have some other concerns, well not concerns, later I will want to it do by class bbbuuuttttt that can wait lol... wait for awhile actually.

However what I am wanting now is changing the UI a little bit:

idNscYU.png


Now I want the power level to be on its own line and the 200 to be on its own line (it will be an equation eventually but 2000 just for show) Here is the script

##Power Level Scaling Script#v1.0#module BloodPLSS  Scale_Settings = {    😛leveltxt => "Power Level", #Shows this instead of "Level"  }endclass Window_Base  def draw_actor_level(actor, x, y)    change_color(system_color)    draw_text(x, y, 32, line_height, BloodPLSS::Scale_Settings[😛leveltxt])    change_color(normal_color)    draw_text(x + 32, y, 24, line_height, 2000, 2)  endend
I removed all the param settings to shrink it down some. As I'm having no errors theres no need to see the whole thing.
Thats easy, i sure with a little messing about you will figure that one out 😛

Personally, I like LOVE stats, and will almost always be willing to help with those - but I have enough GUI problems of my own to worry about 😛
Thats easy, i sure with a little messing about you will figure that one out 😛

Personally, I like LOVE stats, and will almost always be willing to help with those - but I have enough GUI problems of my own to worry about 😛
Your right I got it, was fun as hell trying to figure it out too. Learned the hard way when use def you have to define everything, even if you don't want to overwrite it.

Now we go to the equation I want this thing to use. I want it to add ALL the normal params together and divide by a set number (which will have customization of course). But the way I'm thinking is like just listing them out like:

param(0)+param(1) etc etc. Unfortunately I do not know how I would get that inside the Window_Base class either.

EDIT:

I got it but it's really, well ugly

draw_text(x, y, 150, line_height, (actor.mhp + actor.mmp + actor.atk + actor.def + actor.mat + actor.mdf + actor.agi + actor.luk / 2))
is there really nothing I can do to clean that up?
perhaps this?

Code:
r = 08.times{ |i| r += actor.param(i) }draw_text(x, y, 150, line_height, r / 2)
Bah I forgot about the .times thingy. Thanks! Script is all done now! Well at least this version anywho
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.


at OP's request

Original thread: https://forums.rpgmakerweb.com/threads/getting-weird-undefined-methods-in-this-script.34774/