Special Invulnerable State Script [RMXP] [RGSS]

Let me clear this first. Death/Knockout states in RPG Maker XP is making the character invulnerable to attacks. Well, technically there’s no point to attacking someone who’s been Death/Knockout at the first place, thus granting them the invulnerable statuses for the sake of it. However, there’s no such way to make a character invulnerable by default on RPG Maker XP.

This script grants the “invulnerable to attack” statuses, done by enlisting them inside the script.

The set up is simple. First, put this script on your game. After that, enlist the states into their appropriate place, and you’re done. πŸ˜‰

Here’s the script: Special Invulnerable States Script

Note :
Since the script is tampering with the targeting system and stuff that is related, this script might incompatible with another script that alters the same stuff. Leave a comment below in case some incompatibility occurred, and I’ll fix it when I have time. :p

Terms of Use:
1. This script can be used for commercial or non-commercial games, only if you credit me (Black Mage) properly.

2. Put a link back to my site (burningwizard.worpress.com).
3. Tell me about the game you made. I’ll be happy to play and review your game, assumed I have some times to spare :)

Just in case you’re still wondering, the script is licensed under Attribution 3.0 Unported.

Log Change :
Version 1.3 (19 November 2015) – Bug Fix, Special Tone Feature.
Version 1.2 (10 November 2015) – Bug Fix.
Version 1.1 (10 November 2015) – Bug Fix.
Version 1.0 (9 November 2015) – Initial design.


15 thoughts on “Special Invulnerable State Script [RMXP] [RGSS]

  1. You are an angel! Thanks for making this for my friend, I’m going to test it out myself to see if it works.

    Well reading it at first makes it seem like “character are immune to attacks” so enemies will continue to attack them regardless, but I need a quick check. I’ll see how it works and if there’s any problems with it!

  2. OK looking at the script… wow, I’m a little confused on to how to set this up but I figured it out. Basically set up the State in the States Tab in the Database and depending on the ID for the State you have it match up with the one in the script (the second variable).

    Encountered the first error with this script. If you have 3 of your members who are “petrified” or “invulnerable” and the last member is KO’d the battle continues and nothing happens. You need to fix it where you can trigger a Game Over if all members are either KO’d and/or Petrified unless stating the game doesn’t end when all members are incapacitated (like normally in Battle Events for scripted battles where the game continues even if all members are KO’d).

    I tested it out with items, only items that specifically remove the “Petrified” state will only work and a Revive Item doesn’t work on it unless it’s made to do that. So far the items are fine and eliminates the problem with items my friend had.

    So far the the combination of KO’d and Petrified States does not result in a Game Over or end the battle and that needs to be fixed. Once you fix this then this script is perfect that it works with the “Continue even if Loser” option is added to the Battle Event.

    This one is optional though, but is there a way to make the Actor’s Battle Actor “grayed” out to look like they’re turned into Stone? Probably could do it in Animations, but I’m asking just in case. This is optional though, not necessary.

    Anyway I hope this helps to improve this script!

    • Put the petrified state into $special_states1 brackets. It should result in game over when the party statuses is a combination of K.O.ed or petrified, unless there’s something I forgot to look at. πŸ™‚

  3. I’m not sure what you mean “put the petrified state” into the brackets.

    I think I’m missing something. In this line:

    $special_states1 = [1, 17]

    Isn’t the 17 there the State ID # to be used to associate with the state (which I made the new State #17 in the slots)? Or am I missing thing here? I’m not used to editing in Ruby Scripting that much so I got a little lost.

    If I did it right then there’s something you might’ve over looked. I tested this out and the enemies ignore the party members with the “Petrified” state I had setup and have my surviving member left die to test out if a Game Over would occur… it did not and the battle went on forever with neither side doing anything.

  4. The script works like a charm for me in term of utility (thanks for pre-setting it on Watching ahead of time unless that’s a pure coincidence, haha).

    Personally I have no issue since I use the state for duels and thus even though it doesn’t give a Game Over if the main character is KO and the others Watching, an event that gives Game Over or ends the fight if the character is at 0% HP fixes that without any problem. (Unless the “issue” is related to adding other things in the script on “Determine Everyone is Dead” or other portions of the script.)

    While it’s not a problem on my side, I thought I’d mention just in case it helps that AoEs seems to affect all party members as well even when under such a state.

    Thanks again for making another script and I really appreciate that you took time to do this in such a short period of time. As usual, I’ll make sure to properly credit you.

    • Ah “While it’s not a problem on my side” I meant that in case other people would have a problem with using it for a “Petrify” status or such. My bad, haha.

    • Well, it’s true that I made this with “Watching” state in my mind. The state is kinda cool, I think. Thus I begun to make the whole stuff. πŸ™‚

      The AoE fix will have to wait until I finish my other works.

      • Whoops, I tried the fix and while it indeed takes care of the KO + Status = Game Over effect, it seems to cause something funny with how damage is being detected.

        Basically, a character has 1600 HP and the boss hits them for 900 HP and the party member drops dead even though the attack has no KO effect associated to it. Amusingly, it still happens even after the script is removed (I had a back up so it’s not a problem).

      • Version 1.2 is up, fixing the damage and AoE won’t target the one with 2nd special state.

  5. Yup, it works perfectly fine now. Again, thanks a ton. I never thought that the whole revive thing could become such an issue, haha. I wouldn’t be able to proceed with the game as intended without your help.

  6. Tested out version 1.2 and it works perfectly now! Such a simple and elegant script! ^_^

    Thank you very much for helping my friend out, Jeremie is really grateful for this script and I wanted to help him keep his vision of the game intact.

    In case I use this for any XP projects this will be very helpful. Though this is an optional request, but I’m curious if there’s a way to have the script cause the graphics of the Battlers be grayed out or something? To make it look like they’re petrified?

    Optional of course, but a visual change would be very helpful. Regardless this script is perfect, thank you once again!

    • Version 1.3 is out. Now the states can be applied to enemy too, and there’s the customizable grayed out feature. πŸ™‚

      • Oh wow cool! πŸ˜€

        Though I wasn’t ware Enemies couldn’t be affected by it before but good to know now and I’m surprised (and happy) that you added in the customized grayed out tone as well.

        Thanks! Now this script is perfect.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s