Save-Point
ATOA CBS Equipment Set Variables Patch - 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: ATOA CBS Equipment Set Variables Patch (/thread-10272.html)



ATOA CBS Equipment Set Variables Patch - kyonides - 10-14-2024

ATOA CBS: Equipment Set Variables Patch

by Kyonides

Introduction

Long story short, a guy who would definitely love to bomb all chickens around the world had a problem. One add-on made the whole ATOA CBS demo crash mercilessly. It was asking for instance variables that had not been initialized when it should have! Shocked

Then comes a long discussing without the forumer getting involved until the very end that lead me to the following discovery: the script was expecting you to know beforehand that you had to implement the ATOA New Status script in your game before running it. The author forgot to set the variables, but let them get called by some Game_Actor's fundamental methods.  And when I say fundamental, I seriously Serious mean it.

Don't Worried worry, pals! Here's the solution to that cumbersome issue! Grinning

The Patch

This scriptlet simply overwrites the reset_set_status method and removes that useless condition for good. Winking

Code:
# * ATOA CBS - Equipment Set Variables Patch * #
#  Scripter : Kyonides Arkanthes
#  2024-10-13

class Game_Actor
  def reset_set_status
    status = ['maxhp','maxsp','atk','pdef','mdef','str','dex','int','agi','eva','hit']
    status += ['crt','dmg','rcrt','rdmg']
    for st in status
      eval("@set_#{st} = 0")
    end
    @set_equipment_skills = []
    @set_auto_states = []
    @set_elemental_resist = []
    @set_state_resist = []
    forget_set_skills
  end
end

Terms & Conditions

Free for any RMXP game! Gamer
Due credit is optional but appreciated.
Mention this forum if you use the patch.
That's it! Tongue sticking out