Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Actor Customization V.6.0.2

i found a problemo when i change class change system to true, what should i do now !

Did you get a line error? If so please post the line. Or are you confused on how to set-up stat growth? If use_class_id is set to true, then the script will add points based upon the Actor's class_id instead of their ID. So the format would be:
{Class_id => The amount to increase}
Actor_HP = {1 => 3}
In the example above, if the Actor's class_id is equal to 1, then increase that actor's HP by 3. Then you can separate the hash with a comma like so:
Actor_HP = {1 => 3, 2 => 4}
In the above, if Actor Class_id is equal to 1 then increase HP by 3, but if the class_id is equal to 2 then increase HP by 4. Then you can add as many values as you want into the hash.
Actor_HP.default = 1 means that if the actors ID or class_id is not in the hash, then use 1 by default.

Thanks! I'll give it a shot!

Alright, good luck.
 
So I'm having a problem.  It will only let me customize the 1st character, when I try to upgrade stats for the second character it just plays the "unable" sound!

EDIT: So it seems to work the first time I optimize the second characters stats but then after that it doesn't work.

EDIT 2:  Ok, so this is kinda weird.  Basiclly if I lvl up once and add points it works, likewise if i give points via event it works.  But once I lvl up once, level my stats, then level up again I can no longer increase stats.

Maybe it has something to do with my addition.  I made it so dex would raise health as oppossed to str.  Though it is weird that it only does this to the second character.  I also took out the raising of hp and sp by they're own points.

EDIT 3: Yowsa, this is a lot of edits.  WELL I figured out why I can't upgrade the characters.  Once they breach 1000 hp you can no longer upgrade their stats!  Now why does it do that?  Shouldn't it be 9999?

EDIT 4: SUCCESS!  You have an error in your scripting!  You have all the increases set up to cap when the actors maxhp reaches the max limit set for that skill when you should have the stat(@actor.str).  So lets look at the script;

Code:
    when 2
      if @actor.upgrade_points >= ActorCustomization::Points_needed[2] && @actor.maxhp <= ActorCustomization::Max_str
        $game_system.se_play($data_system.decision_se)
        @actor.upgrade_points -= ActorCustomization::Points_needed[2]
        @actor.str += @str
        @actor.hp += (@actor.str * ActorCustomization::Amount_to_raise) if ActorCustomization::Raise_hp_with_strength == true
        @str_spent += 1
        @actor.used_str_points += 1
        call_refresh(0)
      else
        call_sound
      end

This line is wrong;
Code:
      if @actor.upgrade_points >= ActorCustomization::Points_needed[2] && @actor.maxhp <= ActorCustomization::Max_str

It should be;
Code:
      if @actor.upgrade_points >= ActorCustomization::Points_needed[2] && @actor.str <= ActorCustomization::Max_str

And so on for each choice.  Hope this helps!
 
Well I was expecting something a little more complicated but it turned out to be some unforgotten aspect change.  Very nice script though once the bugs are out!
 

alcest

Member

Hey I just want to say I love your script here. But I have only 1 problem.  This below is what I am suppose to use to edit how many points you get in a stat per level up right?

Code:
 #-----------------------------------------------------------------------------
  # Statistical Growth Rate
  # This section allows you to customize how many numerical stats an attribute
  # rises based on the Actor.id or the Class_id.
  #-----------------------------------------------------------------------------
  # Format = {Actor.id (or class_id) => Amount to raise}
  Actor_HP = {1 => 95}
  # The default value. If a value is not specified, use the below.
  Actor_HP.default = 1
  # Format = {Actor.id (or class_id) => amount to raise)
  Actor_SP = {1 => 45}
  Actor_SP.default = 1
  # Format = {Actor.id (or class_id) => amount to raise)
  Actor_STR = {1 => 3}
  Actor_STR.default = 1
  # Format = {Actor.id (or class_id) => amount to raise)  
  Actor_DEX = {1 => 2}
  Actor_DEX.default = 1
  # Format = {Actor.id (or class_id) => amount to raise)  
  Actor_AGI = {1 => 2}
  Actor_AGI.default = 1  
  # Format = {Actor.id (or class_id) => amount to raise)
  Actor_INT = {1 => 1}
  Actor_INT.default = 1


That looks good..but when I go to the actual menu in game to level up, instead of seeing like raise STR by 3, like I have there, it says raise STR by 9. Where are those extra 6 points coming from? Or instead of 1 INT like I have there, I see 10 raised on level up! Where are those 9 extra points coming from?  What part of the script? I don't have the equipment boost on or anything.

I am also using this script, which may be the problem, but mind pointing out what I need to edit to get rid of those extra points?

Code:
#==============================================================================
#  Unlimit Levels v1                                            by: cybersam
#                                                               date: 14.09.06
#------------------------------------------------------------------------------
#  here is a full working scripts for you to this... (i think there is 
#  already one like this somewhere in the in the community...
#  i did one back then when i started in RPG Maker XP
#  some other guys did a few other script like this
#==============================================================================
# Must go ABOVE leveling with points to work
#----------------------------------------------------------------------------
# here you can set the max hp,sp,,str,dex,agi and int
#----------------------------------------------------------------------------
  $FINAL_LVL  = 255
  $MAX_HP     = 99999
  $MAX_SP     = 50000
  $MAX_STR    = 999
  $MAX_DEX    = 999
  $MAX_AGI    = 999
  $MAX_INT    = 999

class Game_Actor

  #--------------------------------------------------------------------------
  # setting the levels...
  #--------------------------------------------------------------------------
  def final_level
    
    # here you can set the max level for your characters based on their ID's...
    # i set it so that 3 characters have different levels and the rest
    # have max lvl of 9999
    #
    # this settings is only to show you how to change the max setting for your
    # characters... same thing is for the parameters -> hp,sp,str,dex.agi,int
    
    case self.id
    when 1
      level = $FINAL_LVL
    else
      level = $FINAL_LVL
    end
    return level
  end
  
  
  #--------------------------------------------------------------------------
  # setting max hp...
  #--------------------------------------------------------------------------
  def max_hp

    case self.id
    when 1
      hp = $MAX_HP
    else
      hp = $MAX_HP
    end
    return hp
  end
  #--------------------------------------------------------------------------
  # setting max sp...
  #--------------------------------------------------------------------------
  def max_sp

    case self.id
    when 1
      sp = $MAX_SP
    else
      sp = $MAX_SP
    end
    return sp
  end
  #--------------------------------------------------------------------------
  # setting max str...
  #--------------------------------------------------------------------------
  def max_str
    case self.id
    when 1
      str = $MAX_STR
    else
      str = $MAX_STR
    end
    return str
  end
  #--------------------------------------------------------------------------
  # setting max dex...
  #--------------------------------------------------------------------------
  def max_dex
    case self.id
    when 1
      dex = $MAX_DEX
    else
      dex = $MAX_DEX
    end
    return dex
  end  
  #--------------------------------------------------------------------------
  # setting max agi...
  #--------------------------------------------------------------------------
  def max_agi
    case self.id
    when 1
      agi = $MAX_AGI
    else
      agi = $MAX_AGI
    end
    return agi
  end    
  #--------------------------------------------------------------------------
  # setting max int...
  #--------------------------------------------------------------------------
  def max_int
    case self.id
    when 1
      int = $MAX_INT
    else
      int = $MAX_INT
    end
    return int
  end  
  
  #--------------------------------------------------------------------------
  # Creating the new EXP list
  # dont change anything from here on... (only if you know what you're doing)
  #--------------------------------------------------------------------------
  def make_exp_list
    actor = $data_actors[@actor_id]
    @exp_list = Array.new(final_level + 2)
    @exp_list[1] = 0
    pow_i = 2.4 + actor.exp_inflation / 1000.0
    for i in 2..final_level + 1
      if i > final_level
        @exp_list[i] = 0
      else
        n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
        @exp_list[i] = @exp_list[i-1] + Integer(n)
      end
    end
  end

  #--------------------------------------------------------------------------
  # setting parameters like hp, sp, str, dex, agi and int
  #--------------------------------------------------------------------------
  def maxhp
    n = [[base_maxhp + @maxhp_plus, 1].max, $MAX_HP].min
    for i in @states
      n *= $data_states[i].maxhp_rate / 100.0
    end
    n = [[Integer(n), 1].max, $MAX_HP].min
    return n
  end
  
  def base_maxhp
    maxhp = $data_actors[@actor_id].parameters[0, 1]
    return maxhp
  end

  def base_maxsp
    maxsp = $data_actors[@actor_id].parameters[1, 1]
    return maxsp
  end

  def base_str
    n = $data_actors[@actor_id].parameters[2, 1]
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.str_plus : 0
    n += armor1 != nil ? armor1.str_plus : 0
    n += armor2 != nil ? armor2.str_plus : 0
    n += armor3 != nil ? armor3.str_plus : 0
    n += armor4 != nil ? armor4.str_plus : 0
    return [[n, 1].max, $MAX_STR].min
  end

  def base_dex
    n = $data_actors[@actor_id].parameters[3, 1]
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.dex_plus : 0
    n += armor1 != nil ? armor1.dex_plus : 0
    n += armor2 != nil ? armor2.dex_plus : 0
    n += armor3 != nil ? armor3.dex_plus : 0
    n += armor4 != nil ? armor4.dex_plus : 0
    return [[n, 1].max, $MAX_DEX].min
  end

  def base_agi
    n = $data_actors[@actor_id].parameters[4, 1]
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.agi_plus : 0
    n += armor1 != nil ? armor1.agi_plus : 0
    n += armor2 != nil ? armor2.agi_plus : 0
    n += armor3 != nil ? armor3.agi_plus : 0
    n += armor4 != nil ? armor4.agi_plus : 0
    return [[n, 1].max, $MAX_AGI].min
  end

  def base_int
    n = $data_actors[@actor_id].parameters[5, 1]
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.int_plus : 0
    n += armor1 != nil ? armor1.int_plus : 0
    n += armor2 != nil ? armor2.int_plus : 0
    n += armor3 != nil ? armor3.int_plus : 0
    n += armor4 != nil ? armor4.int_plus : 0
    return [[n, 1].max, $MAX_INT].min
  end
    def level=(level)
    level = [[level, final_level].min, 1].max
    self.exp = @exp_list[level]
  end
end



#==============================================================================
# ** Game_Battler
#==============================================================================

class Game_Battler

  def maxhp
    n = [[base_maxhp + @maxhp_plus, 1].max, $MAX_HP].min
    for i in @states
      n *= $data_states[i].maxhp_rate / 100.0
    end
    n = [[Integer(n), 1].max, $MAX_HP].min
    return n
  end

  def maxsp
    n = [[base_maxsp + @maxsp_plus, 0].max, $MAX_SP].min
    for i in @states
      n *= $data_states[i].maxsp_rate / 100.0
    end
    n = [[Integer(n), 0].max, $MAX_SP].min
    return n
  end

  def str
    n = [[base_str + @str_plus, 1].max, $MAX_STR].min
    for i in @states
      n *= $data_states[i].str_rate / 100.0
    end
    n = [[Integer(n), 1].max, $MAX_STR].min
    return n
  end

  def dex
    n = [[base_dex + @dex_plus, 1].max, $MAX_DEX].min
    for i in @states
      n *= $data_states[i].dex_rate / 100.0
    end
    n = [[Integer(n), 1].max, $MAX_DEX].min
    return n
  end

  def agi
    n = [[base_agi + @agi_plus, 1].max, $MAX_AGI].min
    for i in @states
      n *= $data_states[i].agi_rate / 100.0
    end
    n = [[Integer(n), 1].max, $MAX_AGI].min
    return n
  end

  def int
    n = [[base_int + @int_plus, 1].max, $MAX_INT].min
    for i in @states
      n *= $data_states[i].int_rate / 100.0
    end
    n = [[Integer(n), 1].max, $MAX_INT].min
    return n
  end

  def maxhp=(maxhp)
    @maxhp_plus += maxhp - self.maxhp
    @maxhp_plus = [[@maxhp_plus, -$MAX_HP].max, $MAX_HP].min
    @hp = [@hp, self.maxhp].min
  end

  def maxsp=(maxsp)
    @maxsp_plus += maxsp - self.maxsp
    @maxsp_plus = [[@maxsp_plus, -$MAX_SP].max, $MAX_SP].min
    @sp = [@sp, self.maxsp].min
  end

  def str=(str)
    @str_plus += str - self.str
    @str_plus = [[@str_plus, -$MAX_STR].max, $MAX_STR].min
  end

  def dex=(dex)
    @dex_plus += dex - self.dex
    @dex_plus = [[@dex_plus, -$MAX_DEX].max, $MAX_DEX].min
  end

  def agi=(agi)
    @agi_plus += agi - self.agi
    @agi_plus = [[@agi_plus, -$MAX_AGI].max, $MAX_AGI].min
  end

  def int=(int)
    @int_plus += int - self.int
    @int_plus = [[@int_plus, -$MAX_INT].max, $MAX_INT].min
  end
end
 
I am having some problems with this script I have searched this topic for one of you guys to post the same problem I keep getting but since no one seems to have the same problem that I do, Here it goes  :dead:

I am using version 6.0 (from the first post) and I keep getting an error whenever I level up this is the message-
==================================================
=                      Oh Noes an error!                                        =
==================================================
Script 'Actor Customization-6.00' line 657: NoMethodError occurred.

undefined method `+' for nil:NilClass
                                                                          [__OK__]
==================================================

This is line 657

657:   @upgrade_points += ActorCustomization::Points_gained_at_levelup


I use battle report v1.6

Please help me I really have struggled looking for a fix but this appears to be the only option. I appologize for any time wasted trying to help me  :cry:
 

alcest

Member

I had that same problem with that Battle Report, but I just found another one that works fine with it. It doesn't look as flashy but I like it.  It's customizable alot to make it better,  It's called Battle Result by A3D Ver. 1.02, I don't remember where I found it, don't remember if it was here, creation asylum, RMRK, or what..but searching for that name should help you. If you want your battle report that bad though you may have to put the script or just the link to Battle Report for syn to check out.
 
Hello... I have this script in my game...thx man...but i have some problem....

when i want to add some point in the party (i call script and all) i recive an error message...

Undefined method ´Upgrade_Points´For Nil::NilClass

any help.....
 
Morty_Porky":2ibemc2e said:
Hello... I have this script in my game...thx man...but i have some problem....

when i want to add some point in the party (i call script and all) i recive an error message...

Undefined method ´Upgrade_Points´For Nil::NilClass

any help.....

Make sure you are using Version 6.0.2. I think I already fixed this problem with the global variable not be reassigned.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top