RPG Maker Forums

Ok i have spent most of today looking for a way to do this but here is my issuse,

My game currently has Actors classes change depending on what weapon they have equiped, that part work fine,

that issue is with HP and because different classes have different base hp it kinda bugs out.

in my game you start with a class called "no class" that has a base hp of 1 but then when you eqiup a weapon which results in a immedate class change your base hp is adjusted but your current hp will remain at 1.

i need a way to preserve the %hp before the change and adjust the actors hp after it.

hopefully someone call at least ponit me in the right direction.

Also i made 2 common events to complete the above task but im not sure how to get them to run during this script.

or maybe there is a better way to do this.

Here is the Script im using to manage the class changes...

=begin
Equipment Changes Class v0.5
by kirinelf
Requested by: TheCastle

Notes:
Simply copy and paste the following in the module:

WEAPON_TYPE_ID[n] = m

where n is the weapon type ID and m is the class ID.
For example, WEAPON_TYPE_ID[1] = 1 will make all axes
turn the wearer into a Soldier.
=end

module EQUIP_CLASS

  WEAPON_TYPE_ID = {}
  WEAPON_TYPE_ID[1] = 1 # WEAPON_TYPE_ID[Weapon Type ID] = Class ID.
   WEAPON_TYPE_ID[2] = 2
#========================================================================
# Do not edit anything under this line unless you know what you're doing!
#========================================================================

end

class Game_Actor < Game_Battler

  alias equip_change_equip change_equip
    
  def change_equip(slot_id, item)
       
    equip_change_equip(slot_id, item)
          case slot_id
          when 0
            
            unless item.nil?
              class_id = EQUIP_CLASS::WEAPON_TYPE_ID[item.wtype_id]
            end
            $game_temp.reserve_common_event(5)
              if class_id != nil
                change_class(class_id, true)
                init_exp
                init_skills
           
                end
              
             
              end
          end
        end

    
 

Latest Threads

Latest Posts

Latest Profile Posts

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.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,456
Members
137,821
Latest member
Capterson
Top