breaking the params limit

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
Hi guys I was tempted to create my own breaking params but I was not sure where to touch this part...

I think this from Game_BattlerBase no ? 

I was suspect this method :

def param_max(param_id) return 999999 if param_id == 0 # MHP return 9999 if param_id == 1 # MMP return 999 endto be the basic control setting for the params but I am not sure 

I suspect if I change the values here to hit a error if I change the setting here

so people can provide me some point of how I can create my own limit breaker :) ?

thanks for further answer!
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
Nope, that is pretty much the basic place to do it. Be aware that those limits will still be present in the editor itself, so you'll have to find another way to set your params higher than their limits (there are several scripts that can do this, but if you want to do it yourself you'll need to do a bit more scripting)
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
that's the point other breaking limits scripts don't offert the customization I want for scripts so I decide to make my own 

but I noticed in the game actor if change the method from the param max this will throw me a error but I guess I can find a way to tweak this little code for work with my code haha

(I hate notetag so I don't use them)
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
Changing the values there works for me.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
nana i mean if you want to call a method or to use "param_id" in a other method 

the system will not recognize it
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
What do you mean?
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
def param_max(param_id) # if param_id == 0 # MHP param_actor #(actor_id) return super end#~ def param_actor #(actor_id) if param_id == 0 case @actor_id when 1 return 100 when 2 return 1 else return 9999 end endendalso I can't find a way to break the limit of the levels :/ it's always throw me a error
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
Are you directly modifying the base scripts? There are multiple errors in this snippet, even more depending on the class which you are modifying (for example, @actor_id exists in Game_Actor, but not in Game_BattlerBase or Game_Enemy).

On first glance:

- param_id doesn't exist in param_actor.

- @actor_id may or may not exist, depending on the class.

- if it would work, you are discarding the result of param_actor.

- "super" may or may not exist, depending on the class, but if it exist, it needs a parameter.
 
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
no no I don't directly modify game_battlerbase

but Game_Actor

I don't wanted to show directly due how messy I was for the moment but here

Code:
class Game_BattlerBase      def param_max(param_id)    return 999999 if param_id == 0  # MHP    return 9999   if param_id == 1  # MMP    return 999  end     def max_tp    return 130  end  endclass Game_Actor < Game_Battler    def max_level  return 100 # actor.max_level  end      def param_max(param_id)    if param_id == 0  # MHP      return 99999999    end          #param_actor  #(actor_id)    return super  end#~      def param_actor #(actor_id)   if param == 0    case @actor_id    when 1      return 100    when 2      return 1    else      return 9999    end  endend  endclass Game_Party < Game_Unit      def max_item_number(item)    return 999  end      def max_gold    return 99999999  endend
 
Last edited by a moderator:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
2,604
Reaction score
1,960
First Language
English
Primarily Uses
RMMV
What error are you getting?
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
the first one is simply they not recognize by saying "undefined method" "param_id" when I use it in a other method of param_max

the second is for the level

http://i.imgur.com/RVrXtRQ.png
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
param_id only exists in a local scope, so if you want it available in another method, you have to pass it as a parameter.

Your screenshot indicates that param_base isn't returning anything. Game_Actor defines it like this:

def param_base(param_id)    self.class.params[param_id, @level]endI can't find the definition for params, but i guess that it defines the base params for each level and since your level most likely is outside of the predefined range, you have to provide values for levels that are higher than intented.

/edit: The class i was looking for is RPG::Class. From the API:

The parameter development curve. A 2-dimensional array containing ordinary parameters according to level
The default implementation of RPG::Class:

Code:
class RPG::Class < RPG::BaseItem  def initialize    super    @exp_params = [30,20,30,30]    @params = Table.new(8,100)    (1..99).each do |i|      @params[0,i] = 400+i*50      @params[1,i] = 80+i*10      (2..5).each {|j| @params[j,i] = 15+i*5/4 }      (6..7).each {|j| @params[j,i] = 30+i*5/2 }    end    @learnings = []    @features.push(RPG::BaseItem::Feature.new(23, 0, 1))    @features.push(RPG::BaseItem::Feature.new(22, 0, 0.95))    @features.push(RPG::BaseItem::Feature.new(22, 1, 0.05))    @features.push(RPG::BaseItem::Feature.new(22, 2, 0.04))    @features.push(RPG::BaseItem::Feature.new(41, 1))    @features.push(RPG::BaseItem::Feature.new(51, 1))    @features.push(RPG::BaseItem::Feature.new(52, 1))  end  def exp_for_level(level)    lv = level.to_f    basis = @exp_params[0].to_f    extra = @exp_params[1].to_f    acc_a = @exp_params[2].to_f    acc_b = @exp_params[3].to_f    return (basis*((lv-1)**(0.9+acc_a/250))*lv*(lv+1)/      (6+lv**2/50/acc_+(lv-1)*extra).round.to_i  end  attr_accessor :exp_params  attr_accessor :params  attr_accessor :learningsend
 
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
so in simple I have to modify the rpg::class ? 

for make it enable to break the level params?
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
Yeah, you would need to have it return values for levels > 99. You can either directly expand the @params table or create a method for higher levels and modify param_base to call it.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
I am not really sure how to make this actually D:
 

Iavra

Veteran
Veteran
Joined
Apr 9, 2015
Messages
1,797
Reaction score
863
First Language
German
Primarily Uses
Last edited by a moderator:

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
of what I see he take the calculation via the level 98 for other levels..but I am not sure :/
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
of what I see he take the calculation via the level 98 for other levels..but I am not sure :/
It interpolates each parameter for levels over 99 using its differences between level 98 and level 99:

#-------------------------------------------------------------------------- # new method: above_lv99_params #-------------------------------------------------------------------------- def above_lv99_params(param_id, level) return @params[param_id, level] if level <= 99 n = @params[param_id, 99] multiplier = [level - 99, 1].max change = (@params[param_id, 99] - @params[param_id, 98]) + 1 n += change * multiplier return n end
So when a parameter at level 98 is x, and that at level 99 is y, then that at level z will be y + (y - x + 1) * (z - 99)

On a side note,  you might be interested in this script as well:

http://forums.rpgmakerweb.com/index.php?/topic/21775-doublex-rmvxa-constants-edit/
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
thanks man! 

do you allow me to use your method (for break the levels)  as a dummy coding the time I found my own ways for break the level limits?
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
thanks man! 

do you allow me to use your method (for break the levels)  as a dummy coding the time I found my own ways for break the level limits?
Yup, as long as you're not plagiarizing my entire script lol(of course you won't :) )
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,078
Members
137,580
Latest member
Snavi
Top