Overworld combat attacks?

I really hate to say it but i just don’t really understand what the processes are meant to be with the Recoilgo thing. Could you show me the complete sequences or explain a little more simply?

For 3, are you saying I should replace what’s in the circle with exactly what you showed?

No worries, here’s the simpler version.

An Autorun freezes the player until it finishes. A parallel lets the player keep moving. The TurnInPlace plugin only breaks Player move routes that come from a parallel. So the one small piece that moves the Player (the step back) goes in its own Autorun, and everything else stays in your parallel like it is now.

Setting up the Autorun, one time:

  1. Database > Common Events, make a new one called RECOIL
  2. Trigger: Autorun
  3. Switch: make a new switch called RecoilGo
  4. Put these commands in it:
◆Set Movement Route: Player (Skip, Wait)
  : Speed: 6
  : Blend Mode: Screen
  : 1 Step Backward
  : Blend Mode: Normal
  : Speed: 4
◆Control Switches: #0XXX RecoilGo = OFF

Now any attack that wants the step back just turns RecoilGo ON instead of doing its own Player move route.

1. The S blast, this replaces everything inside your S key check:

◆Control Switches: #0181 ATTACKING = ON
◆Control Variables: #0197 ATTACK TYPE = 5
◆Control Variables: AtkX = Map X of Player
◆Control Variables: AtkY = Map Y of Player
◆Control Variables: AtkDir = Direction of Player
◆If: AtkDir = 2
  ◆Set Event Location: Attack collision, ({AtkX},{AtkY}), Down
◆End
◆If: AtkDir = 4
  ◆Set Event Location: Attack collision, ({AtkX},{AtkY}), Left
◆End
◆If: AtkDir = 6
  ◆Set Event Location: Attack collision, ({AtkX},{AtkY}), Right
◆End
◆If: AtkDir = 8
  ◆Set Event Location: Attack collision, ({AtkX},{AtkY}), Up
◆End
◆Control Switches: #0XXX RecoilGo = ON
◆Common Event: SCREENSHAKE MEDIUM
◆Set Movement Route: Attack collision (Skip, Wait)
  : Transparent OFF
  : SE: Maris Haven SFX/Fighting/BSFX SMACK (100, 100, 0)
  : Image: MH VitalAttacks1(3)
  : Speed: 5
  : 1 Step Forward
  : 1 Step Forward
  : 1 Step Forward
  (keep as many 1 Step Forward lines as you have now)
  : Transparent ON
◆Control Switches: #0181 ATTACKING = OFF
◆Control Switches: #0182 MOVEMENT ATTACK = OFF

The (Skip, Wait) means ticking both Skip If Cannot Move and Wait for Completion on that route.

Then in the enemy event, add this next to your If: ATTACK TYPE = 0 punch branch, inside the If: SV: AtkCol Y = SV: My Y:

◆If: ATTACK TYPE = 5
  ◆Common Event: DAMAGE SFX
  ◆Control Variables: #0189 SV: This event HP -= 25
  ◆Set Movement Route: This Event
    : Blend Mode: Additive
    : Wait: 30 frames
    : Blend Mode: Normal
◆End

2. The random one, this goes in the parallel with your other attacks, not in an Autorun:

◆Control Switches: #0181 ATTACKING = ON
◆Control Variables: #0197 ATTACK TYPE = 0
◆Play SE: Maris Haven SFX/Fighting/BSFX SHRILL (100, 100, 0)
◆Control Switches: #0XXX RecoilGo = ON
◆Set Event Location: Attack collision, ({BPlayer X},{BPlayer Y})
◆Common Event: SCREENSHAKE MEDIUM
◆Set Movement Route: Attack collision (Wait)
  : Image: MH VitalAttacks1(7)
  : Transparent OFF
  : Speed: 5
  : Move at Random
  : Move at Random
  : Move at Random
  : Move at Random
  : Move at Random
  : Move at Random
  : Move at Random
  : SE: Maris Haven SFX/Fighting/BSFX DING (90, 100, 0)
  : Transparent ON
◆Set Event Location: Attack collision, ({BPlayer X},{BPlayer Y})
◆Control Switches: #0181 ATTACKING = OFF
◆Control Switches: #0182 MOVEMENT ATTACK = OFF

This one shares RECOIL, so it picks up the Speed 6 and Screen flash too. If you want it different, make a second Autorun the same way with its own switch.

3. Yes, and the If: ActionCooldown > 0 block under it goes too. Delete the whole If: ActionCooldown = 0 block (the circled part and the End below it), and replace If: ActionCooldown > 0 with the one here. The top of the event should end up like this:

◆If: ActionTimer > 0
  ◆Control Variables: #0207 ActionTimer -= 1
  ◆If: ActionTimer = 0
    ◆Set Movement Route: Player
      : Speed: 4
    ◆Play SE: Maris Haven SFX/Fighting/BSFX LOW HITS (100, 100, 0)
    ◆Control Variables: #0206 ActionCooldown = 300
  ◆End
◆End
◆If: ActionCooldown > 0
  ◆Control Variables: #0206 ActionCooldown -= 1
  ◆If: ActionCooldown = 0
    ◆Play SE: Maris Haven SFX/Fighting/BSFX STUTTER (100, 100, 0)
  ◆End
◆End
◆If: Script: Input.isTriggered("action3")

1-It works perfectly!

2-It also works perfectly!

3-It ALSO works perfectly!

I’m honestly in disbelief as to how you’re so good at this stuff, I wouldn’t for the life of me have figured it all out on my own.

I only have 3 more damage-dealing attacks left to make before the battle system is effectively complete, and since they (and all the rest of the “stat buff moves” like the speed boost) are all very closely tied to the stats and damage calculations, I’ll need to move on to that system next. I’ve been working with my co developer on those systems and I think we have a pretty good base that should plug into what’s already been laid down, so I’m gonna go for it and see if I can get it to work myself. If I run into issues (which wouldn’t surprise me at all), I’ll be sure to come and ask for help.

Regardless, up to this point, thank you so incredibly much for the sheer amount of help you have provided! This system would not have been possible without your kind help. Do you want to be credited under “Baz” in the credits? And I insist on giving you a free game key once the game finally releases in full!

Glad all three are working!

Funny enough, this is pretty close to what we did for Naima's Melody Pre-Alpha Demo by JUMP Game Studio long ago. It was basically a state machine built out of a parallel event, where whatever input you pressed decided which state it ran next. Yours is its own thing, but the bones feel really similar with the switches and ATTACK TYPE doing that job.

Crediting as Baz would be awesome, and I’d sure I’ll take a key when it’s out. Good luck with the stats and damage side!

Okay, I was naive to think I’d be able to do this entirely myself lol.

Me and my codev have all the pieces we need I think, but if it’s not a bother we’d really appreciate some help in actually figuring out how to get them to come together, especially since my codev wrote most of those pieces, and I’m not nearly as familiar with them. He’s writing them down in as much detail as he can as we speak

What’ll help me most is seeing where each piece lives. Are the stats in the database on the actors and enemies, in variables, or in a plugin? I’d also like the formula written out the way he’d say it out loud, something like attack times 2 minus defense, and which attacks use which stat if they differ. Since your enemy event already sets its own stats from variables before the battle, I’m wondering if its defense ends up in a self variable like its HP does.

The enemy side already has a spot ready for it. Every hit branch has its own HP -= 25 line, so if the formula ends up in one variable, each of those lines would just read from it instead:

◆Control Variables: #0189 SV: This event HP -= Damage

I’ll tell him what you said. As it stands though, unless there’s an easier way, we were planning on making the stats variables, since we know how to make those talk to the events. Not everything is decided on yet, but we’ll show everything we’ve gotten down for the system far. We really appreciate that you’re still willing to help

Variables are fine. Your whole system already runs on them, so that’s probably what I’d do too.

The one place the database might save you work is the player. If they level up or equip gear in your game, the actor’s stats already include that, and you can still copy one into a variable whenever you need it. Set Control Variables to Game Data, then Actor, then pick the stat:

◆Control Variables: #0XXX Player ATK = Attack of [your actor]

That line can sit right before wherever the damage gets worked out, so the number is always current. The enemies can’t do the same thing. Database enemies only exist inside the regular battle screen, so your map enemies need their stats in self variables the same way their HP is.

Here’s everything we’ve gotten written to the best of our ability.

I understand that this is a lot of info, so feel free to ask for elaboration on anything unclear.

Ok, these constituent parts contribute to dealing a varying amount of damage per formula, based on the following factors.

Stats, Player Form, Affinity, Attack Type, and Enemy Form (1-14)

STATS
Attack, HP, and Defense are the relevant ones here, and will most likely be the only ones present in the battle system going forwards.
Current idea was for stats to be held and set within the enemy event’s automatic setup itself. (the portion at the beginning of the event that sets the appearance and then locks itself with a self switch) That way, the enemies only have to reference the variable that tells the game which enemy is being fought.

FORMS
This requires a bit of explanation about the nature of the game. To put it as simply as possible, some “enemies” can be recruited outside of battle to the player’s team, and grant the player access to a special battle form within battle.
Eight forms exist currently, granted on a per-member basis depending on the units in the player’s party. We don’t plan that any individual form will grant stat boosts themselves-this will be handled by Affinities, seen next.
The aim of this system is to grant variety in combat that isn’t just “mashing A”, but balance is a big priority going forwards to make sure that the more gimmicky forms aren’t just outclassed by the simple ones more accessible early on.

AFFINITY
Certain boons come from the precise unit granting the player’s form. These are more personalized and each affinity will be independent to each unit. They currently exist on a range from simple stat modifiers (defense buffed above 50% HP but defense debuffed below it) to entity placement (placing down blocks that will act as decoys and draw enemy attention until broken). We plan to implement this last, since it’s a bit more specialized and needs to be very carefully balanced to avoid objectively bad/OP ones.

ATTACK
There are 5 attack types-Small Knockback 0, Knockback No Damage 1, Big Knockback 2, No Knockback 3, and Independent Damage 4. These don’t necessarily have bearing on damage-just distance first and foremost.

ENEMY FORM
Each enemy has preset HP, Attack and Defense values, and they are different per enemy. Naturally, this determines how much damage they take and give.

FORMULAS (made by my Codev, I am bad at this part)

Basic: Attack / ((Defense+100)/100)

Special2: (Attack x 1.3) / ((Defense + 100)/100)

Special1: (Attack x 1.1) / ((Defense +100)/100) but uncommon, used for 2 special attacks

The one thing to change in the formulas is the order. Control Variables only works in whole numbers, so any Defense under 100 makes (Defense + 100) / 100 come out as 1, and the enemy takes damage as if it had no defense at all. 1.3 and 1.1 can’t be typed in either. Multiplying first and dividing last gives the same answers as his formulas with no decimals:

Basic:     Attack x 100 / (Defense + 100)
Special1:  Attack x 110 / (Defense + 100)
Special2:  Attack x 130 / (Defense + 100)

So the only thing that changes between the three is that one number. I’d add a Move Power variable that each attack sets right under its ATTACK TYPE line. I’ve put 100 on all of them since I don’t know which ones are Special1 and Special2, so change it to 110 on the two Special1 attacks and 130 on the Special2 ones. The shield doesn’t need one since it does no damage:

Punch
◆Control Variables: #0197 ATTACK TYPE = 0
◆Control Variables: #0XXX Move Power = 100

Ram, in MOVING ATTACK HANDLER
◆Control Variables: #0197 ATTACK TYPE = 2
◆Control Variables: #0XXX Move Power = 100

Type 3 attack
◆Control Variables: #0197 ATTACK TYPE = 3
◆Control Variables: #0XXX Move Power = 100

Every enemy attack
◆Control Variables: #0197 ATTACK TYPE = 4
◆Control Variables: #0XXX Move Power = 100

S blast
◆Control Variables: #0197 ATTACK TYPE = 5
◆Control Variables: #0XXX Move Power = 100

Random one
◆Control Variables: #0197 ATTACK TYPE = 0
◆Control Variables: #0XXX Move Power = 100

The player’s stats need a value before the first fight, so these go somewhere that runs once before then, like your opening event. The numbers are placeholders:

◆Control Variables: #0XXX Player ATK = 20
◆Control Variables: #0XXX Player DEF = 20
◆Control Variables: #0XXX Player HP = 100

The enemy stats go at the end of your setup branch, right before the line that turns its self switch on. ENEMY FORM is whatever variable tells it which enemy it is, and these numbers are placeholders too:

◆If: ENEMY FORM = 1
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 2
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 3
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 4
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 5
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 6
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 7
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 8
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 9
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 10
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 11
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 12
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 13
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End
◆If: ENEMY FORM = 14
  ◆Control Variables: #0189 SV: This event HP = 100
  ◆Control Variables: #0XXX SV: Enemy ATK = 20
  ◆Control Variables: #0XXX SV: Enemy DEF = 20
◆End

Here’s the whole hit section, from If: ATTACKING is ON down to its End, with the damage worked out right after the SV: My X and SV: My Y lines. SV: Damage and SV: Def Calc are two new self variables, set up the same way as your others. I rebuilt each branch from your screenshots, and I left the type 3 freeze out since you pinned it:

◆If: ATTACKING is ON
  ◆If: Self Switch B is OFF
    ◆Control Variables: #0192 SV: AtkCol X = Map X of Attack collision
    ◆Control Variables: #0193 SV: AtkCol Y = Map Y of Attack collision
    ◆If: ATTACK TYPE = 2
      ◆Control Variables: #0192 SV: AtkCol X = Map X of Player
      ◆Control Variables: #0193 SV: AtkCol Y = Map Y of Player
      ◆Control Variables: #0221 Hit Dir = Direction of Player
      ◆If: Hit Dir = 2
        ◆Control Variables: #0193 SV: AtkCol Y += 1
      ◆End
      ◆If: Hit Dir = 4
        ◆Control Variables: #0192 SV: AtkCol X -= 1
      ◆End
      ◆If: Hit Dir = 6
        ◆Control Variables: #0192 SV: AtkCol X += 1
      ◆End
      ◆If: Hit Dir = 8
        ◆Control Variables: #0193 SV: AtkCol Y -= 1
      ◆End
    ◆End
    ◆Control Variables: #0194 SV: My X = Map X of This Event
    ◆Control Variables: #0195 SV: My Y = Map Y of This Event
    ◆Control Variables: #0XXX SV: Damage = Player ATK
    ◆Control Variables: #0XXX SV: Damage *= Move Power
    ◆Control Variables: #0XXX SV: Def Calc = SV: Enemy DEF
    ◆Control Variables: #0XXX SV: Def Calc += 100
    ◆Control Variables: #0XXX SV: Damage /= SV: Def Calc
    ◆If: ATTACK TYPE = 4
      ◆Control Variables: #0189 SV: This event HP -= SV: Damage
      ◆Play SE: Blow1 (90, 150, 0)
      ◆Set Movement Route: This Event
        : Blend Mode: Additive
        : Wait: 30 frames
        : Blend Mode: Normal
      ◆Control Self Switch: B = ON
    ◆End
    ◆If: SV: AtkCol X = SV: My X
      ◆If: SV: AtkCol Y = SV: My Y
        ◆If: ATTACK TYPE = 0
          ◆Common Event: DAMAGE SFX
          ◆Common Event: SCREENSHAKE SMALL
          ◆Control Variables: #0189 SV: This event HP -= SV: Damage
          ◆Control Variables: #0194 SV: My X = Math.round(this.character(0)._realX)
          ◆Control Variables: #0195 SV: My Y = Math.round(this.character(0)._realY)
          ◆Set Event Location: This Event, ({SV: My X},{SV: My Y})
          ◆Set Movement Route: This Event (Skip, Wait)
            : Speed: 6
            : Turn toward Player
            : 1 Step Backward
            : 1 Step Backward
            : Speed: 4
        ◆End
        ◆If: ATTACK TYPE = 1
          ◆Control Variables: #0194 SV: My X = Math.round(this.character(0)._realX)
          ◆Control Variables: #0195 SV: My Y = Math.round(this.character(0)._realY)
          ◆Set Event Location: This Event, ({SV: My X},{SV: My Y})
          ◆Set Movement Route: This Event (Skip, Wait)
            : Blend Mode: Normal
            : Speed: 5
            : Turn toward Player
            : SE: Blow5 (80, 100, 0)
            : 1 Step Backward
            : Speed: 4
            : Wait: 5 frames
            : Blend Mode: Normal
        ◆End
        ◆If: ATTACK TYPE = 2
          ◆Control Variables: #0189 SV: This event HP -= SV: Damage
          ◆Control Variables: #0194 SV: My X = Math.round(this.character(0)._realX)
          ◆Control Variables: #0195 SV: My Y = Math.round(this.character(0)._realY)
          ◆Set Event Location: This Event, ({SV: My X},{SV: My Y})
          ◆Set Movement Route: This Event (Skip, Wait)
            : Blend Mode: Normal
            (the rest of your ram knockback route, your screenshot cut off after Blend Mode)
        ◆End
        ◆If: ATTACK TYPE = 3
          ◆Common Event: DAMAGE SFX
          ◆Control Variables: #0189 SV: This event HP -= SV: Damage
          ◆Set Movement Route: This Event (Wait)
            : Blend Mode: Additive
            : Wait: 30 frames
            : Blend Mode: Normal
        ◆End
        ◆If: ATTACK TYPE = 5
          ◆Common Event: DAMAGE SFX
          ◆Control Variables: #0189 SV: This event HP -= SV: Damage
          ◆Set Movement Route: This Event
            : Blend Mode: Additive
            : Wait: 30 frames
            : Blend Mode: Normal
        ◆End
        ◆If: ATTACK TYPE ≠ 1
          ◆If: ATTACK TYPE ≠ 3
            ◆Control Self Switch: B = ON
          ◆End
        ◆End
      ◆End
    ◆End
  ◆End
: Else
  ◆Control Self Switch: B = OFF
◆End

If you shortened the type 3 flash for the quicker hits, keep your number there instead of 30. With the freeze gone, Self Switch D never turns on, so the D release that was in the Else isn’t needed anymore.

Damage going the other way is the same shape with the sides swapped. In your enemy’s attack logic, this replaces whatever line takes HP off the player now:

◆Control Variables: #0XXX SV: Damage = SV: Enemy ATK
◆Control Variables: #0XXX SV: Damage *= 100
◆Control Variables: #0XXX SV: Def Calc = Player DEF
◆Control Variables: #0XXX SV: Def Calc += 100
◆Control Variables: #0XXX SV: Damage /= SV: Def Calc
◆Control Variables: #0XXX Player HP -= SV: Damage

Forms don’t need anything here, since they don’t change stats. They just decide which attack blocks the player has, and each block already sets its own Move Power. When you get to Affinity, I think the stat ones like the defense swap could adjust Player DEF before any of this reads it, so the formula itself wouldn’t need to change.

The type 3 freeze is gone, yes.

I’ve implemented almost everything. So you’re saying that every single This Event HP-25 should be replaced with all six of the control variable processes you showed here?

◆Control Variables: #0XXX SV: Damage = SV: Enemy ATK
◆Control Variables: #0XXX SV: Damage *= 100
◆Control Variables: #0XXX SV: Def Calc = Player DEF
◆Control Variables: #0XXX SV: Def Calc += 100
◆Control Variables: #0XXX SV: Damage /= SV: Def Calc
◆Control Variables: #0XXX Player HP -= SV: Damage

Only the HP line changes in those. The five lines that work out SV: Damage go in once, near the top of the hit section right after SV: My X and SV: My Y, so every branch below them reads the same number:

◆Control Variables: #0194 SV: My X = Map X of This Event
◆Control Variables: #0195 SV: My Y = Map Y of This Event
◆Control Variables: #0XXX SV: Damage = Player ATK
◆Control Variables: #0XXX SV: Damage *= Move Power
◆Control Variables: #0XXX SV: Def Calc = SV: Enemy DEF
◆Control Variables: #0XXX SV: Def Calc += 100
◆Control Variables: #0XXX SV: Damage /= SV: Def Calc
◆If: ATTACK TYPE = 4

Then in the type 0, 2, 3, 4 and 5 branches, this line:

◆Control Variables: #0189 SV: This event HP -= 25

becomes this:

◆Control Variables: #0189 SV: This event HP -= SV: Damage

The shield branch doesn’t have one, so it stays as it is.

The six lines you quoted are for the other direction, the enemy hitting the player. They don’t go in the hit section at all. They go in the enemy’s attack logic, wherever it takes HP off the player right now. I haven’t seen that part yet, so if you post a screenshot of it I can show exactly where they land.

Oh, right.

To be honest, we haven’t coded in a process for the player to take damage yet because we wanted to be well into the stats by that point. The enemy can’t actually attack the player yet. I guess this is as good of a time as any to have that discussion, though, so I’m going over it with my co-dev now.

While that discussion goes on, I want to clarify what all is going into the enemy hit section.

◆Control Variables: *#0194 SV: My X = Map X of This Event*
◆Control Variables: *#0195 SV: My Y = Map Y of This Event*
◆Control Variables: *#0XXX SV: Damage = Player ATK*
◆Control Variables: *#0XXX SV: Damage \*= Move Power*
◆Control Variables: *#0XXX SV: Def Calc = SV: Enemy DEF*
◆Control Variables: *#0XXX SV: Def Calc += 100*
◆Control Variables: *#0XXX SV: Damage /= SV: Def Calc*

^ So all of these go before any attack type checks…

  ◆Control Variables: *#0189 SV: This event HP -= SV: Damage*

^ And this replaces the “event HP-25” placeholders…

and then the enemies taking damage should function properly?

Yes, that’s it. They don’t have to go above the If: ATTACK TYPE = 2 position block, since the damage doesn’t use the positions, so that one can stay where it is. They just need to come before If: ATTACK TYPE = 4, since that’s the first branch that takes HP off.

The damage also relies on three pieces from my earlier post. Every attack block needs its Move Power line, Player ATK needs a value before the fight, and the 14 ENEMY FORM stat branches need to be in the setup. If hits land but do 0 damage, I’d check Move Power and Player ATK first, since either one being 0 makes the whole result 0.

Have i gotten it right?

(all the rest of the -25s are also -SV Damages)

The one thing I’d double check is the name. You’ve called it SV: This Event DEF where I wrote SV: Enemy DEF, which is fine as long as your 14 ENEMY FORM setup branches write to that same variable. The DEF line in each of them should read like this, with your own number:

◆Control Variables: #0XXX SV: This Event DEF = 20

If the setup writes to a different variable, Def Calc reads 0 and every enemy takes damage as if it had no defense.

It seems to be working fantastically upon testing it!

Okay, I’ve been discussing it with my codev. How complicated would it be to give enemies access to the same attacks the player has, depending on the enemy that’s in battle?

Like, say, the player is fighting an enemy that gives access to Form 3. (Basic attack, the speed boost+S Ram form) The enemy can use the Form 3 moves on the player. Is this realistic?

It’s really the enemy attack logic you haven’t built yet, with each move written from the enemy’s side.

The player versions can’t be reused as they are, because they run on ATTACKING and the Attack collision. ATTACKING is one switch that every enemy listens to, so an enemy turning it ON would make all the other enemies check for hits and stop the Attack collision from following you. The enemy side is actually simpler though. There’s only one player to hit, so instead of a hitbox event, each enemy can just check whether the player is on the tile in front of it.

That check is the piece every enemy move would share. Here it is with the damage formula in it, using your names:

◆Control Variables: #0XXX SV: Front X = Map X of This Event
◆Control Variables: #0XXX SV: Front Y = Map Y of This Event
◆Control Variables: #0XXX SV: Front Dir = Direction of This Event
◆If: SV: Front Dir = 2
  ◆Control Variables: #0XXX SV: Front Y += 1
◆End
◆If: SV: Front Dir = 4
  ◆Control Variables: #0XXX SV: Front X -= 1
◆End
◆If: SV: Front Dir = 6
  ◆Control Variables: #0XXX SV: Front X += 1
◆End
◆If: SV: Front Dir = 8
  ◆Control Variables: #0XXX SV: Front Y -= 1
◆End
◆Control Variables: #0XXX SV: Target X = Map X of Player
◆Control Variables: #0XXX SV: Target Y = Map Y of Player
◆If: SV: Front X = SV: Target X
  ◆If: SV: Front Y = SV: Target Y
    ◆Control Variables: #0232 SV: Damage = SV: This Event ATK
    ◆Control Variables: #0232 SV: Damage *= 100
    ◆Control Variables: #0233 SV: Def Calc = Player DEF
    ◆Control Variables: #0233 SV: Def Calc += 100
    ◆Control Variables: #0232 SV: Damage /= SV: Def Calc
    ◆Control Variables: #0XXX Player HP -= SV: Damage
  ◆End
◆End

The rest of Form 3 builds on that. The basic attack is that check on its own. The speed boost is a Speed route on This Event with a timer counting it down, the same shape as your ActionTimer but in self variables. For the ram, the enemy runs its steps with Skip and Wait, then runs the same check. If the player is on the tile in front when it stops, it ran into them. Which moves an enemy has could be one more self variable set in your ENEMY FORM setup branches, like SV: Moveset = 3, and the attack logic branches on that.

The one catch is knockback on the player. The enemy is a parallel, and TurnInPlace breaks Player routes that come from a parallel, so pushing the player back would need its own Autorun like RECOIL.

Before I write the moves out, what decides when an enemy attacks? Your loop already checks which attacks it’s allowed to use, so I’m wondering if that part picks a move and just has nothing to run yet. And should enemy hits knock the player back, or just do damage?

My question is, if we do pursue this angle, how do we make all instances of the enemies have their own Attack Collision without making innumerable manually defined duplicates of the original? Is that even possible?