• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 16, 2024, 04:57:45 pm

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


Secret Units Problem

Started by leonharu, May 17, 2013, 04:30:05 pm

leonharu

I wanna make secret units available from the beginning of the game (after snow fight and lizzard incident) using gameshark but sadly Cid, Ezel, and Babus can't gain exp like any other character in the battle. Ritz and Shara can still gain exp. Is there a way to fix this?

Sorry for my English

Thanks.

Darthatron

What gameshark codes are you using? I can't help you if I don't know why it's happening.
  • Modding version: Other/Unknown
  • Discord username: Darthatron

leonharu

Actually I use ARv3 code to add new character in the blank slot like this one:



Cid in Slot 7
042006B0 085512BB   ----> Name Pointer
042006B4 7317735E   ----> Job/Race/Sprite
042006B8 00000100   ----> Exp/Level
042006BC 01010101   
042006C0 01010101   
042006C4 00000001   
042006C8 00480048   
042006CC 00120012   
042006D0 005C0052   
042006D4 00540044      
042006E4 00004709      
04200780 005F0000      
042007B4 000100FF   

Slide for Abilities in Slot 7 (Mastered 5 Advanced Laws abilites)
00000000 802006F1   
000000e4 00050001   




I test it in Herb Picking Mission and after Cid attack or use an abilites, it just skip the exp-gain step. Is there something that I miss? or there is another code that trigger secret units to do this? I think that way because we can only use secret units just after we complete all 300 missions (I never complete the game before though).

Once again, sorry for my english. Correct me if I am wrong.

Darthatron

Try changing it to this code:

Cid in Slot 7
042006B0 085512BB   ----> Name Pointer
042006B4 0117735E   ----> Job/Race/Sprite (Changed the first 73 to a 01)
042006B8 00000100   ----> Exp/Level
042006BC 01010101   
042006C0 01010101   
042006C4 00000001   
042006C8 00480048   
042006CC 00120012   
042006D0 005C0052   
042006D4 00540044     
042006E4 00004709     
04200780 005F0000     
042007B4 000100FF


It's a quick fix that doesn't appear to have any bugs.

However, there is an actual check in the game to not give EXP to any character that wasn't given at the correct time. It checks for Ezel, Babus, Ritz, Shara and Cid and won't give any experience if the correct flag isn't set.

ROM:0812E5B4 ; =============== S U B R O U T I N E =======================================
ROM:0812E5B4
ROM:0812E5B4
ROM:0812E5B4 CalculateEXP                            ; CODE XREF: sub_80A7040+A2p
ROM:0812E5B4                 PUSH    {R4-R6,LR}
ROM:0812E5B6                 MOVS    R6, R0
ROM:0812E5B8                 MOVS    R5, R1
ROM:0812E5BA                 MOVS    R1, #LRC_bJob   ; index
ROM:0812E5BC                 BL      LoadRAMCharacter
ROM:0812E5C0                 CMP     R0, #0x52 ; 'R'
ROM:0812E5C2                 BLS     NoFlagChecksRequired
ROM:0812E5C4                 MOVS    R4, flag_GotEzel
ROM:0812E5C8                 MOVS    R0, R6          ; pRAMCharacter
ROM:0812E5CA                 MOVS    R1, #LRC_bSprite ; index
ROM:0812E5CC                 BL      LoadRAMCharacter
ROM:0812E5D0                 CMP     R0, #0xA
ROM:0812E5D2                 BEQ     checkflag_r4    ; Ezel
ROM:0812E5D4                 CMP     R0, #0xA
ROM:0812E5D6                 BHI     MoreFlagChecks
ROM:0812E5D8                 CMP     R0, #4
ROM:0812E5DA                 BEQ     checkflag_Ritz
ROM:0812E5DC                 CMP     R0, #9
ROM:0812E5DE                 BEQ     checkflag_Babus
ROM:0812E5E0                 B       Return_0
ROM:0812E5E2 ; ---------------------------------------------------------------------------
ROM:0812E5E2
ROM:0812E5E2 MoreFlagChecks                          ; CODE XREF: CalculateEXP+22j
ROM:0812E5E2                 CMP     R0, #0xC
ROM:0812E5E4                 BEQ     checkflag_Shara
ROM:0812E5E6                 CMP     R0, #0x5E ; '^'
ROM:0812E5E8                 BEQ     checkflag_Cid
ROM:0812E5EA                 B       Return_0
ROM:0812E5EC ; ---------------------------------------------------------------------------
ROM:0812E5EC
ROM:0812E5EC checkflag_Babus                         ; CODE XREF: CalculateEXP+2Aj
ROM:0812E5EC                 LDR     R4, =flag_GotBabus
ROM:0812E5EE                 B       checkflag_r4
ROM:0812E5EE ; ---------------------------------------------------------------------------
ROM:0812E5F0 dword_812E5F0   DCD flag_GotBabus       ; DATA XREF: CalculateEXP:checkflag_Babusr
ROM:0812E5F4 ; ---------------------------------------------------------------------------
ROM:0812E5F4
ROM:0812E5F4 checkflag_Ritz                          ; CODE XREF: CalculateEXP+26j
ROM:0812E5F4                 LDR     R4, =flag_GotRitz
ROM:0812E5F6                 B       checkflag_r4
ROM:0812E5F6 ; ---------------------------------------------------------------------------
ROM:0812E5F8 dword_812E5F8   DCD flag_GotRitz        ; DATA XREF: CalculateEXP:checkflag_Ritzr
ROM:0812E5FC ; ---------------------------------------------------------------------------
ROM:0812E5FC
ROM:0812E5FC checkflag_Shara                         ; CODE XREF: CalculateEXP+30j
ROM:0812E5FC                 LDR     R4, =flag_GotShara
ROM:0812E5FE                 B       checkflag_r4
ROM:0812E5FE ; ---------------------------------------------------------------------------
ROM:0812E600 dword_812E600   DCD flag_GotShara       ; DATA XREF: CalculateEXP:checkflag_Sharar
ROM:0812E604 ; ---------------------------------------------------------------------------
ROM:0812E604
ROM:0812E604 checkflag_Cid                           ; CODE XREF: CalculateEXP+34j
ROM:0812E604                 MOVS    R4, flag_GotCid
ROM:0812E608
ROM:0812E608 checkflag_r4                            ; CODE XREF: CalculateEXP+1Ej
ROM:0812E608                                         ; CalculateEXP+3Aj ...
ROM:0812E608                 MOVS    R0, R4          ; flag
ROM:0812E60A                 BL      CheckFlag
ROM:0812E60E                 LSLS    R0, R0, #0x18
ROM:0812E610                 CMP     R0, #0
ROM:0812E612                 BEQ     Return_0
ROM:0812E614                 MOVS    R0, R6
ROM:0812E616                 BL      CheckCharFlag_Guest
ROM:0812E61A                 LSLS    R0, R0, #0x18
ROM:0812E61C                 CMP     R0, #0
ROM:0812E61E                 BNE     Return_0
ROM:0812E620                 MOVS    R0, R6
ROM:0812E622                 BL      CheckCharFlag_Enemy
ROM:0812E626                 LSLS    R0, R0, #0x18
ROM:0812E628                 CMP     R0, #0
ROM:0812E62A                 BNE     Return_0
ROM:0812E62C
ROM:0812E62C NoFlagChecksRequired                    ; CODE XREF: CalculateEXP+Ej
ROM:0812E62C                 MOVS    R0, #0xD        ; ID
ROM:0812E62E                 BL      LoadByte        ; r0 = [02002030 + r0] (byte)
ROM:0812E632                 LSLS    R0, R0, #0x18
ROM:0812E634                 CMP     R0, #0
ROM:0812E636                 BEQ     loc_812E63C
ROM:0812E638
ROM:0812E638 Return_0                                ; CODE XREF: CalculateEXP+2Cj
ROM:0812E638                                         ; CalculateEXP+36j ...
ROM:0812E638                 MOVS    R0, #0
ROM:0812E63A                 B       End
ROM:0812E63C ; ---------------------------------------------------------------------------
ROM:0812E63C
ROM:0812E63C loc_812E63C                             ; CODE XREF: CalculateEXP+82j
ROM:0812E63C                 MOVS    R0, R5          ; pRAMCharacter
ROM:0812E63E                 MOVS    R1, #LRC_bLevel ; index
ROM:0812E640                 BL      LoadRAMCharacter
ROM:0812E644                 MOVS    R4, R0
ROM:0812E646                 MOVS    R0, R6          ; pRAMCharacter
ROM:0812E648                 MOVS    R1, #LRC_bLevel ; index
ROM:0812E64A                 BL      LoadRAMCharacter
ROM:0812E64E                 SUBS    R4, R4, R0
ROM:0812E650                 LSLS    R4, R4, #0x11
ROM:0812E652                 MOVS    R0, 0xA0000
ROM:0812E656                 ADDS    R4, R4, R0
ROM:0812E658                 LSRS    R5, R4, #0x10
ROM:0812E65A                 CMP     R4, #0
ROM:0812E65C                 BGT     loc_812E660
ROM:0812E65E                 MOVS    R5, #1
ROM:0812E660
ROM:0812E660 loc_812E660                             ; CODE XREF: CalculateEXP+A8j
ROM:0812E660                 LSLS    R0, R5, #0x10
ROM:0812E662                 ASRS    R0, R0, #0x10
ROM:0812E664                 CMP     R0, #100
ROM:0812E666                 BLE     loc_812E66A
ROM:0812E668                 MOVS    R5, #100
ROM:0812E66A
ROM:0812E66A loc_812E66A                             ; CODE XREF: CalculateEXP+B2j
ROM:0812E66A                 MOVS    R0, R6          ; pRAMCharacter
ROM:0812E66C                 MOVS    R1, #LRC_bLevel ; index
ROM:0812E66E                 BL      LoadRAMCharacter
ROM:0812E672                 CMP     R0, #49
ROM:0812E674                 BLS     Return_r5
ROM:0812E676                 MOVS    R0, R6          ; pRAMCharacter
ROM:0812E678                 MOVS    R1, #LRC_bEXP   ; index
ROM:0812E67A                 BL      LoadRAMCharacter
ROM:0812E67E                 LSLS    R1, R5, #0x10
ROM:0812E680                 ASRS    R1, R1, #0x10
ROM:0812E682                 ADDS    R0, R0, R1
ROM:0812E684                 CMP     R0, #99
ROM:0812E686                 BLS     Return_r5
ROM:0812E688                 MOVS    R0, R6          ; pRAMCharacter
ROM:0812E68A                 MOVS    R1, #LRC_bEXP   ; index
ROM:0812E68C                 BL      LoadRAMCharacter
ROM:0812E690                 MOVS    R1, #99
ROM:0812E692                 SUBS    R1, R1, R0
ROM:0812E694                 LSLS    R1, R1, #0x10
ROM:0812E696                 LSRS    R5, R1, #0x10
ROM:0812E698
ROM:0812E698 Return_r5                               ; CODE XREF: CalculateEXP+C0j
ROM:0812E698                                         ; CalculateEXP+D2j
ROM:0812E698                 LSLS    R0, R5, #0x10
ROM:0812E69A                 ASRS    R0, R0, #0x10
ROM:0812E69C
ROM:0812E69C End                                     ; CODE XREF: CalculateEXP+86j
ROM:0812E69C                 POP     {R4-R6}
ROM:0812E69E                 POP     {R1}
ROM:0812E6A0                 BX      R1
ROM:0812E6A0 ; End of function CalculateEXP
ROM:0812E6A0
ROM:0812E6A0 ; ---------------------------------------------------------------------------


To remove this in the actual ROM, you can change the byte at 0812E5C3 in a hex editor from D9 to E0. I hope this helped.

Your English is very good. :)
  • Modding version: Other/Unknown
  • Discord username: Darthatron

leonharu

Wow that's a simple ram editing trick! I never thought that way before.
I know how to hex-editing but I don't have any experience to do ASM-hacking because It's too tiring for me and my brain :D .
Really big thanks Darth, oh yeah I want to ask you one question again  if you dont mind,
do you know how to hack experience routines so we can gain less or greater amount of exp?

once again, thanks for your help.

yeah thanks for your compliment, tell me if you dont understand about my post.  :D

Sigiloso

Quote from: leonharu on May 23, 2013, 04:47:10 pm
oh yeah I want to ask do you know how to hack experience routines so we can gain less or greater amount of exp?


Some codes for vba or gba i found in gamefaqs, hence you won't need to patch the ROM for this task:

QuoteBasically, these codes just set your EXP points to 99. You will need to
do combat damage to level up the character. Once again, I've provided a
Level Up all character code for CBA.

- CBA -

Level Up All Characters

4200008A 0063
00000014 0108

3200008A 0063: Hero Level Up
32000192 0063: P2 Level Up
3200029A 0063: P3 Level Up
320003A2 0063: P4 Level Up
320004AA 0063: P5 Level Up
320005B2 0063: P6 Level Up
320006BA 0063: P7 Level Up
320007C2 0063: P8 Level Up
320008CA 0063: P9 Level Up
320009D2 0063: P10 Level Up
32000ADA 0063: P11 Level Up
32000BE2 0063: P12 Level Up
32000CEA 0063: P13 Level Up
32000DF2 0063: P14 Level Up
32000EFA 0063: P15 Level Up
32001002 0063: P16 Level Up
3200110A 0063: P17 Level Up
32001212 0063: P18 Level Up
3200131A 0063: P19 Level Up
32001422 0063: P20 Level Up


- GSA -

572905DE EC7804A2: Hero Level Up
E13D45CF 338AE33C: P2 Level Up
BB90E226 9CE87CD8: P3 Level Up
5E470844 4D192636: P4 Level Up
03A5C065 A83DB225: P5 Level Up
417BC3FF 04638D06: P6 Level Up
CF202A90 18F0DBE6: P7 Level Up
DCBF031D BB3C47FC: P8 Level Up
9263279D E29EE07E: P9 Level Up
A42EB80C 995F3BA3: P10 Level Up
45978299 C973DFA5: P11 Level Up
AC12B80F CE871987: P12 Level Up
DCEDD212 1587E0E4: P13 Level Up
61759B8E 436AC851: P14 Level Up
DC1D10C4 CAA61076: P15 Level Up
01266E59 2AB74FB1: P16 Level Up
1DEAB6DC E6096CC5: P17 Level Up
206623D9 0F5AC344: P18 Level Up
5B69B19A C6372827: P19 Level Up
8C87EC67 7F1BFF21: P20 Level Up


- PAR V3 -

00F1AEEA 6F2537F4: Hero Level Up
D7DFA1B0 57E36DA9: P2 Level Up
139AA757 D12D849D: P3 Level Up
EEBF0230 E0F86E94: P4 Level Up
8814FFA7 E9A1DBB0: P5 Level Up
7954B4AD 358D9EC7: P6 Level Up
02D7541E D006F90D: P7 Level Up
7A2D8042 8E973B61: P8 Level Up
C7D895F6 34000DA6: P9 Level Up
25FDCCB2 F92AC625: P10 Level Up
8223BEB4 2EA3E246: P11 Level Up
1AD47635 0050D00A: P12 Level Up
1AF999F8 14550322: P13 Level Up
3BFB5E06 C7791281: P14 Level Up
79E47A7F D3CF824F: P15 Level Up
F17AA34D A59E2576: P16 Level Up
659B3378 34A8A8DD: P17 Level Up
E91605D5 9975F5ED: P18 Level Up
F3711E2F B30AC935: P19 Level Up
7E6E880E 10CA8F8B: P20 Level Up


Hope this helps anyone further investigating into the topic.