Modular Battle Routine ~ Demo Released, Currently Needs Ease Of Installation

I’ll reply and explain anyway. First off, except for the might one, they all have an inplace part and an out of place part. The in place part replaces the game’s built in routine, and you can place the out-of-place part anywhere, but repoint to them with the in-place ones. Then you need to set up a pointer table that points to your custom routines. Then in the ItemId-th pointer, you put the location of your custom asm routine. A bit roundable, I know. But then (this is the part that takes asm skillz) you have to write your own routine in asm and compile it. End it with just bx r14; I worked out all the lr shenanigans for you.

Im going to be making a patch and/or Fire Shell extension out of it when I’m 100% done, don’t worry!

This is the part I’m most looking forward to, pretty excited to see some sort of defaultly installed package of routines. But the capacities that this will open up when all is said and done are simply incredible.

Hello! It’s been a little bit since I’ve updated this. I kind of hit a snag where I didn’t know where to insert the pre-and-post routines. So I analyzed the crap out of the battle routines until I found the rather simplistic core of it, where it just randomizes hit, etc etc, and writes to the battle buffer while reading from the battle stats data.

I just wrote the Just-before-randomization routine and just-after-randomization routine. I have yet to test them.

After this, it’s just the Weapon Effects part, then revamping the pointer tables to be in one spot for easy nightmare editing, and I should be done.

1 Like

SNES style criticals:
[battle screen][1][1]:https://www.dropbox.com/s/vyxvxn40c8vjshx/Screenshot%202014-07-12%2022.34.09.png
[in battle, showing final health][2][2]:https://www.dropbox.com/s/46zqbnbd1vrsr0u/Screenshot%202014-07-12%2022.34.23.png

Here is the complete source code for the routine doing the SNES crits through Modular Battle:

ldrh r1, [r3]
mov r0, #0x01
and r1, r0
cmp r1, #0x0
beq return @not critical; go back
ldrh r0, [r2, #0x6] @Atk
ldrh r1, [r2, #0x8] @Def
lsl r0, #0x1
sub r0, r1
strh r0, [r2, #0x4] @damage
return:
bx r14

See, not so bad, right?

Added another section that gives you more flexibility over editing anything in the Unit Battle Data. With it, I implemented iron-swords-give-+20-avoid

[lowen with iron sword][1]
[1]:https://www.dropbox.com/s/pdnnqcx0n4i8ps1/Screenshot%202014-07-13%2011.52.14.png
[lowen with javelin][2]
[2]:https://www.dropbox.com/s/3cqi3upn59ax52k/Screenshot%202014-07-13%2011.52.16.png

.thumb
mov r1, #0x62 @avoid
ldrh r2, [r0, r1]
add r2, #0x20 @add 20 to avoid
strh r2, [r0, r1]
bx r14

See? That coding’s not too bad.

Edit: Yeah, I realized this was giving 32 to avoid. I fixed it though!

I’ve decided to forego the Weapon Effect expansion. I don’t think there are that many effects to implement there. If I do decide to make an expansion, it’ll just expand upon Ct075’s status swords.

Released a version for fire shell’s first release.

v0.1 - fixed the bug in the critical routine that handled the Crit+15 skill incorrectly.

v0.1 for Project Fire Shell – this is build for the patch arch sent me; it should work with previous versions, but, anyway. I confirmed the various modules work.

[definitely not a screenshot of a demonstration I plan to make for FEE3][1]
[1]:https://www.dropbox.com/s/oo1knj8finzc29v/Screenshot%202014-07-14%2022.23.44.png

[definitely not another screenshot][2]
[2]:https://www.dropbox.com/s/jg1icgpayjt8d8m/Screenshot%202014-07-15%2014.02.52.png

2 Likes

If I can figure out how to use this thing in vanilla FE7 (newbie here), I’ll definitely give it a shot. Looks awesome, dude. I’ll see if I can figure it out later!

Wait a bit – I’m still developing things and it’ll be in Fire Shell. Believe me, you’ll want to use a patch; this is ridiculously hard to install by hand.

1 Like

Noted, haha :stuck_out_tongue: I think I’m speaking for everyone, hackers and players, when I say that we’re looking forward to it!

Display hack (hopefully) works. Editing pre/post calculation routines to be in a better place. Though this takes a bit of guesstimation as to what calls this function, but… Well, hey. If there’s a hole to the calculations, then I can jsut patch it up.

1 Like

[Another not-screenshot for you mooks. I hope you’re smart enough to figure out what I’m hoping to show by this.][1]
[1]:https://www.dropbox.com/s/lfuc2uhugvedhrh/Screenshot%202014-07-20%2023.18.24.png

There seems to be some kind of code that skips over the part containing the pre/post routines if hit is 0(but not if it’s negative ??? ). This is… quite puzzling. But I will look into it.

Edit: was just me being dumb and had mistyped a pointer lol

1 Like

I’m a little daft… Could you point out what it is I’m looking at? ehehe

1 Like

Defense.

1 Like

Demo should be done; just needs some playtesting to make sure it isn’t too brutal.

1 Like

can you give spec for how parameters are passed into the routines? I vaguely remember you having some (r0 is attackerData, r1 is defenderData?), but I can’t seem to find it