Scripted Battles and you (for FE8 on EA)

Tags: #<Tag:0x00007f0e2fae90e0> #<Tag:0x00007f0e2fae8f78>

This was a request on the FEU discord, so I’m going to be doing a quick tutorial on doing scripted battles.
First and foremost - make sure the units you want to fight are within attacking range of each other!
Otherwise, you’ll just end up with, well, nothing good. Remember to use ENUN after moving as well.
Once that’s good to go, you’ll want to set up the battle parameters.
These macros don’t start the battle - they’re only setting it up first.
(You can find these macros at Event Assembler/EA Standard Library/Unit Helpers.txt)

StartBattle
NormalDamage(combatantNumber,damage)
CriticalHit(combatantNumber,damage)
MissedAttack(combatantNumber,damage)
EndAttack

So how do we use these? It’s quite simple. First, start with a StartBattle and an EndAttack.
Next, inbetween the two, add as many attacks as you’d like for your scripted fight.
For example, if I wanted a miss followed by a crit, it would be

StartBattle
MissedAttack(0,0)
CriticalHit(1,99)
EndAttack

You may be wondering what the “combatantNumber” is for. Simply put, it is 0 for the attacker and 1 for the defender. In my example, the attacker will miss and be countered by a cit. Since this is a scripted battle, we don’t necessarily have to follow convention - I can have the attacker attack 5 times in a row without retaliation if I wanted to.
What determines the attacker and defender, you may ask? Well, that’s made clear when we actually initiate the combat.

FIG1 Attacker Defender AttackerWeapon

For the weapon, we can set 0x0 to use whatever is currently equipped, or any itemID to spoof that item. Note that you don’t actually need the item in your inventory to spoof it! The defender will always use whatever they currently have equipped (this includes nothing).

In the end, my example will look like

StartBattle
MissedAttack(0,0)
CriticalHit(1,99)
EndAttack
FIG1 Attacker Defender AttackerWeapon

(And should be preceeded by moving the Attacker and Defender in range of each other and ENUN, if they weren’t in range aleady)

And that’s it! There are more commands for things like Lethality and Devil Reversal, but they function in exactly the same manner. If you’re curious, I’d recommend checking the macros on eastlib. Happy eventing!

14 Likes

That was fast

1 Like

Be me:

“Hey guys I just needed some help with scrip-”

Pik:

“Ok here’s a whole thread on how to do scripted battles.”

2 Likes