Jump to content

FE7 new promotion table


icecube
 Share

Recommended Posts

New promotion table of FE7. This patch will allow the module to be promotion table editor. Using this patch, each promotion can have its own requirement level. Still, incomplete battle animation of a class will cause a glitch(for example, promoting Druid into Paladin).

This patch uses 0xD90000. This module doesn't make an item into a promotion item but change the result of the promotion.

Download here

Link to comment
Share on other sites

08027404

00 0608 lsl r0,r1,0x18
01 0E00 lsr r0,r0,0x18 //filter the item
02 686D ldr r5(r5,0x04)
03 792D ldrb r5(r5,0x04)
04 490F r1 = 09800054 //this is the new table
05 780C ldrb r4(r1,0x00) //let's find our destined pair
06 2CFF cmp r4,0xff //the end of the table.
07 D017 beq #32
08 4284 cmp r4,r0 //let's check our item.
09 D001 beq #12
10 3104 r1 = r1 + 0x04 //move onto the next pair.
11 E7F8 b$ #05
12 784C ldrb r4(r1,0x01) //let's check our class
13 42AC cmp r4,r5
14 D000 beq #16
15 E7F9 b$ #10
16 78CC ldrb r4(r1,0x03) //let's check our level
17 0664 lsl r4,r4,0x19
18 0E64 lsr r4,r4,0x19
19 9801 ldr r0(sp,0x04)
20 3008 r0 = r0 + 0x08
21 7800 ldrb r0(r0,0x00)
22 42A0 cmp r0,r4
23 DB07 blt #32 //Underleveled. Can't promote
24 788C ldrb r4(r1,0x02)
25 4806 r0 = 0203A456 //this is the critical slot.
26 7004 strb r4(r0,0x00) //store the promotion result here
27 78CC ldrb r4(r1,0x03)
28 7044 strb r4(r0,0x01) //and your level here (second byte)
29 2001 r0 = 0x01 // This means your unit can be promoted.
30 E001 b$ #33
31 0000 ----
32 2000 r0 = 0x00 //any failure goes here
33 BC30 pop r4,r5
34 BC02 pop r1
35 4708 bx r1
36 0054
37 0980
38 A456
39 0203

08029818

00 4900 r1 = 09800001
01 4708 bx r1
02 8001
03 0980

Just jump.

080298C4

00 4F00 r7 = 0980003D
01 4738 bx r7
02 003D
03 0980

Jump.

09800000

00 B5F0 push r4-r7,lr
01 1C04 r4 = r0 + 0x00
02 1C10 r0 = r2 + 0x00
03 3066 r0 = r0 + 0x66
04 7841 ldrb r1(r0,0x01) //see your msb of req. level
05 0609 lsl r1,r1,0x18
06 2900 cmp r1,0x00
07 DB0E blt #23 //jump to #23 if checked
08 7800 ldrb r0(r0,0x00) //start of wexp deletion
09 2154 r1 = 0x54
10 4348 mul r0,r1
11 4907 r1 = 08BE015C
12 1840 r0 = r0 + r1
13 3004 r0 = r0 + 0x04
14 2328 r3 = 0x28
15 2B30 cmp r3,0x30
16 DA05 bge #23
17 5CC1 ldrb r1(r0,r3) //load wexp in class table
18 2900 cmp r1,0x00
19 D100 bne #21
20 54E1 strb r1(r4,r3) //set wexp to 0 if the class doesn't have it.
21 3301 r3 = r3 + 0x01
22 E7F7 b$ #15
23 7800 ldrb r0(r0,0x00) // reload the promotion result
24 4901 r1 = 08029821 //go back
25 4708 bx r1
26 015C
27 08BE
28 9821
29 0802

0980003C

00 7807 ldrb r7(r0,0x00)
01 7809 ldrb r1(r1,0x00)
02 1A79 r1 = r7 - r1
03 2900 cmp r1,0x00
04 DA00 bge #06
05 2100 r1 = 0x00 //set the value into 0 if less than 0
06 7001 strb r1(r0,0x00)
07 4901 r1 = 080298CD
08 4708 bx r1
09 0000 ----
10 98CD
11 0802

The only difference between this and the patch is the address. In this case, the table is set at 09800054, 4 byte

Edited by icecube
Link to comment
Share on other sites

Geez did you write down that disassembly by hand or something? What disassembler are you using? This will still save time for people who are trying to use this source as a basis for stuff (or understanding why it works) but has a ways to go before it's one click away from being turned into a binary patch. I'd be interested to see what solution you come up with on your own for rewriting the source to be capable of that for comparison to existing methods.

Edited by Aleph
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...