Modifying elemental boosts, state % rates, etc. in skill creation?

Hi this is kind of 2 questions in one.  First off I was wondering how to make element effects and % rates of states in skill creation customizable?


For example:

  • a skill called "prepare" that temporarily boosts your fire damage/skills(physical or elemental) by 150%.
  • a skill called "shield" that temporarily boosts your fire resistance by 50%. 
  • a debuff spell that do the opposite such as lowering elemental damage/defense
  • a state that increases status infliction rate by a specific %
  •  

Rather than being restricted to the default settings which are either a green check mark or blank.  The software has only the ability to check off or leave blank on the ability of causing status too.(attached image to show restricted check mark settings for elements and states)



What if specific equipment gives +70% protection against poison, and an enemy uses a skill with a 75% chance to poison? Is there a 5% of getting poisoned? This is stuff I can't test with the


current default system.


After some research I found a script that goes as the following:


# Sensitivity Processing (JTC Custom)      if ((self.state?(55) and skill.element_set.include?(1)) or          (self.state?(56) and skill.element_set.include?(2)) or          (self.state?(57) and skill.element_set.include?(3)) or          (self.state?(58) and skill.element_set.include?(4)) or          (self.state?(59) and skill.element_set.include?(5)))        self.damage = (self.damage * 15 / 10)      end


^--this is an elemental debuff spell(solving one of the things I was looking for), however it keeps giving me an error not letting my game run. 


See images attached.  I have virtually no skills in scripting, so I probably made a typo somewhere...


My major question aside from trying to get my game to work again is basically, how do I modify the game to allow me to adjust specific % for elemental vulnerability, damage boost, or state chance boosts, or do I have to rely on adding scripts like the one I tried to add?(also if you happen to know how to script one of the skills I'm trying to make I'd appreciate it =)  )

script error1.jpg

script error1 issue.jpg

restricted....jpg
I'm the one who wrote that code, and I can assure you that it worked in my own project.  Unfortunately I can't open RMXP now due to software issues so I can't check everything, but the error message means that the class "Game_Battler" doesn't include the method "state?" which is really surprising.  Have you made any other modifications in the Script Editor?  If you do a search for "def state?", can you find it anywhere?


As far as the 75%/70% thing, I believe it operates multiplicatively (again, I can't check for sure now) - so that if the state is applied at 75%, and you have 70% protection, the modified chance of the state being applied is 75% * (100 - 70%) = 22.5%.
I'm the one who wrote that code, and I can assure you that it worked in my own project.  Unfortunately I can't open RMXP now due to software issues so I can't check everything, but the error message means that the class "Game_Battler" doesn't include the method "state?" which is really surprising.  Have you made any other modifications in the Script Editor?  If you do a search for "def state?", can you find it anywhere?


As far as the 75%/70% thing, I believe it operates multiplicatively (again, I can't check for sure now) - so that if the state is applied at 75%, and you have 70% protection, the modified chance of the state being applied is 75% * (100 - 70%) = 22.5%.

not on this game, it's like a test game, I've only added this script you created.  Perhaps I added it at the wrong place? I've added a skill before that had a "damage string" and it was added somewhere before the end of game battler 3 and worked(separate game).  On this one, I added it right at the end of the "skills" section, not sure if it has to be a little higher.  The only def I found was def skill_effect(user, skill).


I searched the skill section in the game battler 3.


And yea, I did create the states and skills in the corresponding numbers, inflicting the state, etc. so that can't be the issue either.


I could add the script from game battler 3 on my next post if it would help.  I just didn't want to make such a huge/long post.

Original thread: https://forums.rpgmakerweb.com/threads/modifying-elemental-boosts-state-rates-etc-in-skill-creation.66479/