How can I change the damage that damage floors do?

The floor damage default seems to be set to subtract 10 HP from all party members every time the player steps on a trap tile. Is there a way to change this to a percentage instead of a flat HP rate? Or better yet, a flat HP rate PLUS a percentage?

Thanks for all the advice! 🙂
You could do this pretty easily with region events. VisuStella's Events Move Core has a feature to let a common event run when you step in a specified region; you could just use that instead of the damage floor and hit players with whatever feels good using variables.
Good idea. I guess I hadn't considered doing that, but it makes sense.

Follow up question: If I were to use the Script Operand to set the calculation, does anyone know what the script is to call up Player max HP? I suppose I can look it up on the forum and see if I can find it, but just in case I have trouble finding it, I thought I'd ask.
I don't know the answer to that offhand, but I'll save you finding the list if that helps at all:

RMMZ Script Call List
Yeah, I'm looking at the list, but I'm having trouble getting it to work.

My problem is that when I'm reading over them, they're all about targeting a party leader, instead of just the party in general.

So it says:
Code:
// In a Script command: 100 damage to party leader, allow KO
this.changeHp($gameParty.leader(), -100, true);

So, for example, I want to have the entire party lose 5% of their MaxHP.

Perhaps:
this.changeHp((actor.mhp*0.05), true);

I'll try that in game...

...
**********EDIT
Okay, I thought it worked at first, but it did not. I forgot the floor trap tile original settings were still on, so it was not working at all. I'm not sure what script I'm supposed to put in there.
I'm sure there's a simpler way, but I like just eventing things when I can... would something like this work for you?

Spoiler: sucking %5 hp from the party
Screenshot (193).png

Edit: Oops. I left 'change HP' as affecting tester1 on all four. This is probably obvious, but it should say tester2, 3, 4 and so on for as many possible party members as you have.
Hello, the floor damage value is coded in Game_Actor:
Code:
Game_Actor.prototype.basicFloorDamage = function() {
    return 10;
};
To change it, you can copy-paste that method in a plugin and change the value. Note that this value is then multiplied by the floor damage rate (fdr) which is a sp-parameter that can be set in the data base.
Code:
Game_Actor.prototype.executeFloorDamage = function() {
    const floorDamage = Math.floor(this.basicFloorDamage() * this.fdr);
    const realDamage = Math.min(floorDamage, this.maxFloorDamage());
    this.gainHp(-realDamage);
    if (realDamage > 0) {
        this.performMapDamage();
    }
};

Regards.
Database - Actors or Classes - Traits - Param - SP Parameter - Floor Damage -
Choose between 0% and 1000% damage.

I guess not exactly what you are looking for but maybe it helps.

Edit:
Ok i participate here is my Version of damage Floor rebuild with Event Commands,Code is used in a Parallel Event:

◆Control Variables:#0001 Var1 = Steps
◆If:Var1 ≠ Var2
◆Control Variables:#0002 Var2 = Var1
◆Get Location Info:Var3_TerrainID, Terrain Tag, (Player Position)
◆Comment:In RMMZ you can select the Player directly as target
: :in the Get Location Info Command.
: :In RMMV this is not available,but this example is for RMMZ.
◆If:Var3_TerrainID = 1
◆Change HP:Entire Party, - 100
◆
:End
◆
:End
◆Comment:Terrain ID for Map Tiles is set in Database Tilesets.

Edit: Sorry this code example failed. it doesnt provide a percentage change.
I'm sure there's a simpler way, but I like just eventing things when I can... would something like this work for you?

Spoiler: sucking %5 hp from the party

Edit: Oops. I left 'change HP' as affecting tester1 on all four. This is probably obvious, but it should say tester2, 3, 4 and so on for as many possible party members as you have.
Well, as I was playing around with it this evening, I discovered this, only to come back here and see that you have explained it perfectly. It works. I wish I would have checked this first; I didn't know if anyone would see my post or not. Thanks for making that effort because that ends up being the simplest solution, and I hope it helps other people.

Thanks to everyone else who offered scripting solutions. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-change-the-damage-that-damage-floors-do.146495/