KEndure XP

KEndure XP + VX + ACE
Updated

by Kyonides Arkanthes


Introduction
​

I introduce you to...😅 Nope, it's not Aluxes, it's a new script indeed!

It was inspired by a fellow RM user's request by the way... It's just some sort of endurance or sturdy + anti-sturdy set of states! 😕

This means you might let a hero get the ability to resist hits and keep either 1 HP or some specific percent instead!
Sadly, its counterpart also exists...
It should let your hero with 1 HP (or any other value you've picked) meaning not even healing spells and items can cure him.

You can either copy and paste the code in your script editor or use the demo as a base to develop and test your game.

I'm no longer posting the script on this thread. Instead you now can...

Download the DEMO


Terms & Conditions​

Free for use in non commercial projects. Contact me if you need it for commercial games. Don't worry, I know it's a scriptlet.
Include my nickname or real name or both and the URL where you found this scripts.
You're not free to repost it anywhere else!
Give me a free copy of your completed game if you include at least 2 of my scripts! 😛
uhhh how does this script work exactly? and how to use it?
Where it says...
# Type Options: nil - plain HP, true - HP percent, :curse - cannot heal!
# ID => [Integer, Type]
STATE = { 19 => [1, nil], 20 => [25, true], 21 => [1, :curse] }

It is telling you how exactly you're expected to configure it.

STATE is a constant that keeps a hash in memory as long as your game exists.
Its keys are the State ID's themselves.
key => Array
The array should contain 2 items, a number that represents either mere HP or some HP percent. How do you know that? Well, you set the second item or value to nil if you prefer to keep the hero with 1 HP only as in the first example. It might be true if you wanna treat that number as a percent or set it to :curse to treat it as HP but add a nuance like being cursed, thus blocking any attempt to heal that actor.
and does it wore off when it activated about once per battle?
i don't want my ally to constantly endure mulitple attacks for the whole battle.
You configure that in the states database as usual. Just pick a maximum number of turns.
ummmmmmm... problem.
1596113803248.png
OK, is the any other script that alters Game_Actor as well?
For the meanwhile I'll try to reproduce the error in a blank project.

Nah, I just forgot to take into account add_state's second argument.

Where it says in my script...

Code:
def add_state(sid)
    return if (KEndure::STATE_IDS & [sid]).any?
    kyon_endure_gm_battler_as(sid)
  end

...modify it like this:

Code:
def add_state(sid, force=false)
    return if (KEndure::STATE_IDS & [sid]).any?
    kyon_endure_gm_battler_as(sid, force)
  end

That's all!
OK, problem #2
my ally is constantly enduring multiple attacks while being at full HP
1596161057061.png
First of all show me your current configuration. Otherwise it will be hard to determine if it's my script or its your current setup the one causing the issue.
Also include a screenshot of your state database showing me how you defined the endure state there.
here is my current config (i think?)
1596169547892.png


and here is my state database
1596169605526.png
Well, the script configuration seems OK to me.

Err... why did you set it to "Regard as 0 HP"? That has nothing to do with KEndure at all...
Fainted works by default, no script is needed to let it run smoothly. Endure is supposed to mimic that for a LIVING actor but never a "deceased" one like Faint and Knockout do.

Can't Get XP... err, that's not necessary for the actor is ALIVE so he should get EXP.

0 Turns? That doesn't seem to be a good way to let it last 1 or more turns...
UMMM... whoops...
you're looking at the usual knockout state.
1596178157839.png

here is the ACTUAL Endure state.
(you were looking at State #1, not State #36.)
Thanks. I have updated the script again and even uploaded a demo!
I know it's working as intended now. Plus it also include a new feature.
ummm...
my ally is STILL constantly enduring multiple fatal attacks while being at full HP...
Your ally? Not the party leader? 😳? That's weird indeed. The script asks for a specific state and states are assigned to a very specific hero at a time.
Were you using my demo only? Or did you add more scripts to it?
well... 1. (my) Litten IS the leader. (guess i should've made it MORE specific...)
and 2. i tested your demo and it has same problem.
The Demo Has Been Updated!​

After altering the demo a little bit I noticed a few things.
The Basic Endure and Cursed Endure states worked pretty much fine but Endure 2 didn't. I mean, Endure+ didn't work.
I had to fix that and keep testing my demo under slightly different circumstances. Now the third kind of Endure state works as well!
Yeah, I know it was about time it did.
uhhhhhh dude.
i tested your updated demo,
and actors are STILL getting constantly enduring multiple fatal attacks...
the Endure state is supposed to endure from a fatal attack ONCE.
and when the actor has endured that fatal attack, the endure state wores off.
and it can be activated again for every battle.
Nsh, I can't be. I tested it many times under three different scenarios and they can survive fatal attacks but only for n turns. It didn't matter if n was equal to 1 or more turns, it didn't last any extra turn at all. Hey! I let my heroes fall in battle to confirm it works as intended.

Keep in mind that XP's battle system waits till it's a given actor's turn to autoremove old states.
To be honest I'd prefer it to be removed at the point where you can see the Fight or Escape command window...

To anybody:

What it doesn't do is to apply the Endure state automatically as in Pokemon games. Why? Because that works as a passive ability or skill while KEndure is just a state.
actually... i think in Pokemon, the endure state will only activate
when you're going to die while at full HP.
i was going for a more Persona method, where no matter how much HP you have left,
you'll always survive at 1 HP, and after that the Endure state is removed.

Original thread: https://forums.rpgmakerweb.com/threads/kendure-xp.117043/