Final Fantasy Hacktics

Modding => Help! => Topic started by: Argy on November 27, 2013, 09:05:48 am

Title: Locking Classes
Post by: Argy on November 27, 2013, 09:05:48 am
 Hi All,

Just a quick question, is there a way to have all the jobs unlocked but not be able to change jobs.  Essentially, they are locked to their initial job?

Thanks for your help,
Cheers Argy    :D
Title: Re: Locking Classes
Post by: Angel on November 27, 2013, 05:22:56 pm
As in, you would pick a job for a character when they join up / are bought at the office, but can't change after?
Title: Re: Locking Classes
Post by: formerdeathcorps on November 27, 2013, 06:38:01 pm
This hack would fit perfectly for my patch; if memory serves, I had an undead knight that I ultimately was forced to scrap because simply changing his job from his base class to a generic class would remove his dark-magic induced condition.  I'd presume Argy is similarly motivated.
In any case, this hack is on my list after I finish the formula hack.
Title: Re: Locking Classes
Post by: Pride on November 27, 2013, 10:27:15 pm
Probably would be a very easy hack, I have notes on the job change routine
Title: Re: Locking Classes
Post by: Argy on November 30, 2013, 08:25:46 am
I just wanted it as I am working on a FFXII IZJS hack and thought it would be a good idea. Ideally I would then have Ramza with a skillset that had invite as to 'collect' the other classes. Thank you all for your help!
Title: Re: Locking Classes
Post by: MasterGrand on November 30, 2013, 02:17:09 pm
Quote from: Argy on November 30, 2013, 08:25:46 am
I just wanted it as I am working on a FFXII IZJS hack and thought it would be a good idea. Ideally I would then have Ramza with a skillset that had invite as to 'collect' the other classes. Thank you all for your help!


Oh cool that is big deal to make FFXII, I can say keep up and good luck ! Argy :)
Title: Re: Locking Classes
Post by: Pride on December 01, 2013, 01:23:16 pm
Okay here's a quick one tell me if this is what you want. Save the code below as a .xml into the same folder with FFTorgASM and apply through FFTorgASM.


<?xml version="1.0" encoding="utf-8" ?>
<Patches>
<Patch name="No Job Switch .01">
    <Description>Forces all units to stay in the job they were recruited in</Description>
    <Location file="WORLD_WORLD_BIN" offset="4266C">
      0000828E
      00000000
      24004294
      00000000
      0000C2A6
      00000000
      FFFF0334
      CF890408
      0200C3A6
    </Location>
  </Patch>
</Patches>
Title: Re: Locking Classes
Post by: Choto on December 02, 2013, 10:17:41 am
Pride could you post your notes on the routine? I'd like to take a look at that one. Had some ideas i want to look into.
Title: Re: Locking Classes
Post by: Pride on December 02, 2013, 11:13:58 am
Code (Job Wheel - Main Routine) Select

0012257c: 27bdffd0 addiu r29,r29,0xffd0
00122580: afb60028 sw r22,0x0028(r29)
00122584: 00a0b021 addu r22,r5,r0 Move Job Wheel offset to r22
00122588: afb50024 sw r21,0x0024(r29)
0012258c: 00c0a821 addu r21,r6,r0
00122590: afb10014 sw r17,0x0014(r29)
00122594: 00808821 addu r17,r4,r0
00122598: 322200ff andi r2,r17,0x00ff
0012259c: 3c03801d lui r3,0x801d
001225a0: 2463d5ec addiu r3,r3,0xd5ec
001225a4: 00021080 sll r2,r2,0x02
001225a8: afb3001c sw r19,0x001c(r29)
001225ac: 00439821 addu r19,r2,r3
001225b0: afbf002c sw r31,0x002c(r29)
001225b4: afb40020 sw r20,0x0020(r29)
001225b8: afb20018 sw r18,0x0018(r29)
001225bc: afb00010 sw r16,0x0010(r29)
001225c0: 8e640000 lw r4,0x0000(r19)
001225c4: 00009021 addu r18,r0,r0 Clear r18
001225c8: 0c04ac6d jal 0x0012b1b4 Store r4
001225cc: 24840077 addiu r4,r4,0x0077
001225d0: 0c04890f jal 0x0012243c Find Unit Base Job
001225d4: 322400ff andi r4,r17,0x00ff
001225d8: 00408021 addu r16,r2,r0 Move Base Job to r16
001225dc: 34020002 ori r2,r0,0x0002
001225e0: 16a20008 bne r21,r2,0x00122604
001225e4: 00121040 sll r2,r18,0x01
001225e8: 8e620000 lw r2,0x0000(r19) Load Some Unit Data
001225ec: 00000000 nop
001225f0: 84420024 lh r2,0x0024(r2) Load Unit's Job
001225f4: 00000000 nop
001225f8: 16020002 bne r16,r2,0x00122604 Branch if Base Job = Unit's Current Job
001225fc: 00121040 sll r2,r18,0x01 r18 * 2
00122600: 36104000 ori r16,r16,0x4000 Gray out Job
00122604: 00561021 addu r2,r2,r22 Get position in Job Wheel
00122608: a4500000 sh r16,0x0000(r2) Store Base Job
0012260c: 322200ff andi r2,r17,0x00ff
00122610: 3c03801d lui r3,0x801d
00122614: 2463d5ec addiu r3,r3,0xd5ec
00122618: 00021080 sll r2,r2,0x02
0012261c: 00438021 addu r16,r2,r3
00122620: 8e020000 lw r2,0x0000(r16) Load Some Unit Data Pointer
00122624: 00000000 nop
00122628: 84440024 lh r4,0x0024(r2) Load Unit's Job
0012262c: 0c0482e4 jal 0x00120b90 Branch to end if Special Monster
00122630: 26520001 addiu r18,r18,0x0001 r18 ++
00122634: 1440003e bne r2,r0,0x00122730 Branch to end if Special Monster
00122638: 00121040 sll r2,r18,0x01
0012263c: 8e020000 lw r2,0x0000(r16) Load Some Unit Data
00122640: 00000000 nop
00122644: 8442003e lh r2,0x003e(r2) Load something about monsters
00122648: 00000000 nop
0012264c: 14400038 bne r2,r0,0x00122730 Branch to end if a Monster
00122650: 00121040 sll r2,r18,0x01 r18 * 2
00122654: 0c04ac7b jal 0x0012b1ec
00122658: 34040001 ori r4,r0,0x0001 r4 = 0x01
0012265c: 34130001 ori r19,r0,0x0001 r19 = 0x1 (counter)
00122660: 0200a021 addu r20,r16,r0
00122664: 00121040 sll r2,r18,0x01
00122668: 00568821 addu r17,r2,r22 r17 = 0x801c83f8 + r2
0012266c: 2670004a addiu r16,r19,0x004a Counter + 0x4a (Generic Jobs)
00122670: 0c04ac7b jal 0x0012b1ec
00122674: 34040001 ori r4,r0,0x0001 r4 = 0x1
00122678: 00401821 addu r3,r2,r0
0012267c: 3402005b ori r2,r0,0x005b
00122680: 16020008 bne r16,r2,0x001226a4 Branch if Job =/= 0x5b (Bard)
00122684: 3402005c ori r2,r0,0x005c
00122688: 8e820000 lw r2,0x0000(r20) Load Some Unit Data
0012268c: 00000000 nop
00122690: 90420070 lbu r2,0x0070(r2) Load Unit Gender
00122694: 00000000 nop
00122698: 30420040 andi r2,r2,0x0040
0012269c: 14400020 bne r2,r0,0x00122720 Branch if Unit is not female
001226a0: 3402005c ori r2,r0,0x005c
001226a4: 16020008 bne r16,r2,0x001226c8 Branch if Job =/= 0x5c (Dancer)
001226a8: 34020002 ori r2,r0,0x0002
001226ac: 8e820000 lw r2,0x0000(r20) Load Some Unit Data
001226b0: 00000000 nop
001226b4: 90420070 lbu r2,0x0070(r2) Load Unit Gender
001226b8: 00000000 nop
001226bc: 30420080 andi r2,r2,0x0080
001226c0: 14400017 bne r2,r0,0x00122720 Branch if Unit is not male
001226c4: 34020002 ori r2,r0,0x0002
001226c8: 16a20007 bne r21,r2,0x001226e8
001226cc: 00000000 nop
001226d0: 8e820000 lw r2,0x0000(r20) Load Some Unit Data
001226d4: 00000000 nop
001226d8: 84420024 lh r2,0x0024(r2) Load Unit's Job
001226dc: 00000000 nop
001226e0: 1202000c beq r16,r2,0x00122714 Branch if Units Current Job = Job Wheel Job
001226e4: 36024000 ori r2,r16,0x4000 Gray out Job
001226e8: 10600003 beq r3,r0,0x001226f8
001226ec: 34020002 ori r2,r0,0x0002
001226f0: 080489c6 j 0x00122718
001226f4: a6300000 sh r16,0x0000(r17) Store r16 into Job Wheel
001226f8: 16a20009 bne r21,r2,0x00122720
001226fc: 00000000 nop
00122700: 00102400 sll r4,r16,0x10
00122704: 0c048922 jal 0x00122488
00122708: 00042403 sra r4,r4,0x10
0012270c: 14400004 bne r2,r0,0x00122720
00122710: 26024000 addiu r2,r16,0x4000 Gray out Job
00122714: a6220000 sh r2,0x0000(r17) Store r2 into Job Wheel
00122718: 26310002 addiu r17,r17,0x0002 r17 + 2 (Position into Job Wheel)
0012271c: 26520001 addiu r18,r18,0x0001 r18 + 1 (Amount of jobs unlocked?)
00122720: 26730001 addiu r19,r19,0x0001 r19 (Counter) + 1
00122724: 2a620014 slti r2,r19,0x0014
00122728: 1440ffd0 bne r2,r0,0x0012266c Branch if all jobs haven't been check
0012272c: 00121040 sll r2,r18,0x01 r18 * 2
00122730: 00561021 addu r2,r2,r22
00122734: 2403ffff addiu r3,r0,0xffff r3 + 0xffff
00122738: a4430000 sh r3,0x0000(r2) Store end of Job wheel
0012273c: 02401021 addu r2,r18,r0
00122740: 8fbf002c lw r31,0x002c(r29)
00122744: 8fb60028 lw r22,0x0028(r29)
00122748: 8fb50024 lw r21,0x0024(r29)
0012274c: 8fb40020 lw r20,0x0020(r29)
00122750: 8fb3001c lw r19,0x001c(r29)
00122754: 8fb20018 lw r18,0x0018(r29)
00122758: 8fb10014 lw r17,0x0014(r29)
0012275c: 8fb00010 lw r16,0x0010(r29)
00122760: 27bd0030 addiu r29,r29,0x0030
00122764: 03e00008 jr r31
00122768: 00000000 nop


Code (Job Wheel - Load Base Job) Select

0012243c: 00042400 sll r4,r4,0x10
00122440: 00042383 sra r4,r4,0x0e
00122444: 3c01801d lui r1,0x801d
00122448: 00240821 addu r1,r1,r4
0012244c: 8c24d5ec lw r4,-0x2a14(r1)
00122450: 00000000 nop
00122454: 90830072 lbu r3,0x0072(r4) Load Sprite Set
00122458: 34020082 ori r2,r0,0x0082
0012245c: 14620004 bne r3,r2,0x00122470 Branch if Unit is not a Monster
00122460: 00000000 nop
00122464: 84830024 lh r3,0x0024(r4) Load Monster Job
00122468: 08048920 j 0x00122480 Jump to end
0012246c: 00000000 nop
00122470: 2c620080 sltiu r2,r3,0x0080
00122474: 14400002 bne r2,r0,0x00122480 Branch if Unit is a special job
00122478: 00000000 nop
0012247c: 3403004a ori r3,r0,0x004a Return Squire as base job
00122480: 03e00008 jr r31 Return r2 as base job
00122484: 00601021 addu r2,r3,r0 Move base job to r2


Code (Job Wheel - storing r4) Select

0012b1b4: 34020001 ori r2,r0,0x0001
0012b1b8: 3c018019 lui r1,0x8019
0012b1bc: a022e47c sb r2,-0x1b84(r1) Store 0x8018f47c as 0x0001
0012b1c0: 3c01801d lui r1,0x801d
0012b1c4: ac24a6f0 sw r4,-0x5910(r1) Store r4 into 0x801ca6f0
0012b1c8: 03e00008 jr r31
0012b1cc: 00000000 nop


Slightly updated code with some of the jump and links explained.
Title: Re: Locking Classes
Post by: Choto on December 02, 2013, 08:05:38 pm
Awesome, thanks dude!

Edit: I don't have time to look at this cause of school :/ But when I do get time I'd like to look into letting special characters be able to switch to all jobs..

Hehe we could divide the job tree into exclusive sections now... a set of 8 human jobs, 4 skeleton jobs, 4 goblin jobs or w/e or make a race system..
Title: Re: Locking Classes
Post by: Argy on December 14, 2013, 01:35:53 pm
Hiya,

Sorry for the late reply... thanks heaps for this... you are a star!

Cheers Argy
Title: Re: Locking Classes
Post by: Pride on December 14, 2013, 03:57:36 pm
Oh my... A late reply indeed. Let me know if that is what you wanted.