Hedera Helix wrote:...I was going to have a character with a set of attacks that depended on how much HP they lost, with a special ability that reduced their own HP to 1. Welp.
There is actually a sneaky way you can accomplish this, without needing to use another stat, with multiple attacks chained together, although there will be one small problem with the way it works. What you want to do is have 3 attacks chained together:
Attack #1 has whichever animation you want to be associated with the HP-to-1 move. It targets self and deals no damage.
Attack #2 resets the user's HP to its maximum, then heals them to 1 HP above their normal maximum. Under "Damage Settings", select "Pure Damage", 100 for the attack stat, -99% extra damage, and then under "Damage bitsets", set "Cure instead of Harm", "Do not randomize", "Allow cure to exceed maximum", and "Reset target stat to max before hit". Select "null" for the attack animation and attacker animation, "self" for the target class, and turn on the "don't display damage" and "don't cause target to flinch" bits.
Attack #3 deals damage to the user equal to their max HP. You can make an attack that deals damage equal to a percentage of the target's maximum in a stat instead of setting that stat to a percentage of its normal maximum, but the damage settings aren't set up in a way that makes it obvious you can do that. What you want to do is, under "Damage Settings", for "Damage Math", select "HP = 100% of Maximum", then under "Damage bitsets", set "% based attacks damage instead of set". Select "null" for the attack animation and attacker animation, "self" for the target class, and turn on the "don't display damage" and "don't cause target to flinch" bits.
The end result of this will be to set the user's HP to 100% + 1 - 100%, equaling 1, without their HP having been 0 at any point.
The problem I alluded to is, it seems that in the OHRRPGCE, every attack always takes one tick's worth of time before moving on to the next attack in a chain, even if it has no visual effects. (Instead-chains seem to be the only exceptions to this; it seems that you can go through an unlimited number of instead-chains to other attacks without incurring any time delay, but that's not useful here, since if you connect Attack #2 to Attack #3 with an instead-chain instead of a regular chain, it will skip over Attack #2's effect, which you need to happen.)
Since setting the hero's HP to their maximum plus 1 and reducing their HP by their maximum have to be done as two separate steps, if you look straight at the HP display for your hero while you use this move, you'll notice that if, for instance, your hero's maximum HP is 100, their HP will display as 101 for one frame before changing to 1. This won't make any practical difference in terms of using the move in battles (if an enemy happens to attack your hero on the exact frame where their HP is 101, they'll die when they use the -100% attack, but they're supposed to die when they're attacked while at 1 HP anyway,) but it's the kind of thing that I can't help but notice and be bugged by. The reason you want the animation to be separate from the attacks that actually affect the user's HP is to avoid making this problem worse; if attack #2 had "Cast" as the attacker animation, the HP value of 101 would be visible not just for one frame, but for the entire time the hero was moving from their "casting" position back to their starting position before attack #3 started.
Speaking of which, on the subject of feature requests, I'd like it if there was a way for a hero to do their "strike" or "cast" animation, and then execute multiple attack effects before they returned to their starting position. In the game I'm making, there's a "fireball" spell where you target one enemy, and the spell first deals damage to that enemy, then deals splash damage to all enemies (including the initial target,) and there are several other in-battle moves that, for various reasons, consist of multiple attacks chained together. I'm setting them up the way I've described here, with an attack that makes the hero do their "cast" animation but doesn't do anything functional, chained to attacks with null attacker animations that handle the actual visual effects and damage of the attack, since that seems to be the least awkward way to do things, but I'd like it if there was a way for the hero to go into their "cast" position, execute both parts of the fireball attack, and then return to their starting position.
I think a good way to implement this would be to have 4 new options for "attacker animation", which could be called "Strike and Pause", "Cast and Pause", "Dash In and Pause", and "Return to Starting Position". The first three of these would have the hero move to the same positions, with the same animation frames, as they do with the Strike, Cast, and Dash In animations, but stay in the same place after the attack instead of returning to their starting position, and they would stay in that same position until they executed an attack with anything other than "null" set as its attacker animation. "Return to Starting Position" would make the hero move back from wherever they were to their starting position, the same way they normally would at the end of a "Strike", "Cast", or "Dash In" animation.
It would be similar to the way Jump and Land are already handled, where it's possible for a character to execute attacks from their position above the battlefield after Jumping, and there are some games like Dungeonmen that actually take advantage of this. (The Sage's "Bing Dan" spell starts with an attack that Jumps, then chains to 3 Meteor attacks that each make a projectile come down from above the screen towards a random enemy, then chains to a "Land" attack that does no damage, and its only purpose is to get the Sage back onto the battlefield.)
In other news, the Global NPC Pool is an awesome idea! I feel like it would be the ideal tool to have to make a Zelda-style game, where there are distinct types of obstacles and puzzle elements that show up throughout the game, and when you get a tool that can be used to get past them, you want it to be able to act on those obstacles in a consistent way, everywhere you've seen them before.