Save-Point
ArmorKlass XP - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+---- Forum: RPGMaker XP (RGSS) Engine (https://www.save-point.org/forum-116.html)
+---- Thread: ArmorKlass XP (/thread-8622.html)



ArmorKlass XP - kyonides - 01-02-2023

ArmorKlass XP

by Kyonides


Introduction

Change your Hero's class by changing his Body Armor! Shocked

Setup Process
  • You will need to define a Default Class for the Hero.
  • All body armors should be available for everybody.
  • Set the Range of Valid Element IDs that represent all of the available Classes!

XP Script

Code:
# * ArmorKlass XP * #
#   Scripter : Kyonides Arkanthes
#   2023-01-02

# Change a Hero's Class by changing his Body Armor!
# You will need to define a Default Class for the Hero.
# All body armors should be available for everybody.
# Create as many Extra Elements as the existing Classes.
# In the ELEMENT_IDS Constant set the Range of Element IDs.

module ArmorKlass
  ELEMENT_IDS = 17..25
  DEFAULT_CLASS_ID = 1
end

class Game_Actor
  alias :kyon_armor_klass_gm_actor_equip :equip
  def set_equip_class(equip_type, eid)
    return if equip_type != 3
    element_ids = ArmorKlass::ELEMENT_IDS
    if eid > 0
      element_set = $data_armors[@armor3_id].guard_element_set
      ary = element_ids.to_a & element_set
      klass_id = ary[0] - element_ids.first + 1
    else
      klass_id = ArmorKlass::DEFAULT_CLASS_ID
    end
    self.class_id = klass_id if @class_id != klass_id
  end

  def equip(equip_type, eid)
    kyon_armor_klass_gm_actor_equip(equip_type, eid)
    set_equip_class(equip_type, eid)
  end
end


Terms & Conditions

Free for use anywhere.
Just mention me in your game credits.
I really hope this won't be the only script of mine that you will include in your game project.


RE: ArmorKlass - kyonides - 01-03-2023

Some Light Armored Update! 

Well guys, I had to come back to this very same thread to make sure that all of the Ruby RGSS based Makers had their own version of my ArmorKlass script available here. And just before people would start complaining about not understanding such a simple Editor script, I have uploaded 3 demos to Mediafire already. Winking

Happy New Year!