• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
March 28, 2024, 07:29:49 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!


How to make items that give negative stats or R/S/M Abilities

Started by Ansehelm, August 11, 2017, 05:32:07 am

nitwit

Quote from: Pride on August 19, 2017, 10:43:39 am
Okay fixed the status part, originally messed up one of the storage pointers so it'll store the status properly now. Also added in your original question. Just be careful with adding in too many negative stats of the same kind (like 4 items of different types with -1 jump) since I don't have /any/ room to add in protection against this.



You use the 1st unknown as another attribute id, so like 18 would grant 2 PA (based on vanilla's original attribute).

Edit: Since I was assuming I should clarify, you need to use 255 - 128 to put a negative stat on a unit. 255 = -1, 254 = -2, etc.


http://ffhacktics.com/wiki/Transfer_Job%27s_Data_to_Unit%27s_Data


0005b684: a202003a sb r2,0x003a(r16) Store Unit's Move
0005b688: 92220018 lbu r2,0x0018(r17) Load Job's Jump
0005b68c: 00000000 nop
0005b690: 3042007f andi r2,r2,0x007f Cap Jump at 127 (0x80 flags stepping stone)
0005b694: a202003b sb r2,0x003b(r16) Store Unit's Jump
0005b698: 92220018 lbu r2,0x0018(r17) Load Job's Jump
0005b69c: 00000000 nop
0005b6a0: 30420080 andi r2,r2,0x0080 Get Stepping stone Flag
0005b6a4: 10400004 beq r2,r0,0x 0005b6b8 Branch if Unit isn't a stepping stone
0005b6a8: 00000000 nop
0005b6ac: 96020048 lhu r2,0x0048(r16) Load Unit's Y Coordinate + Flags
0005b6b0: 08016db1 j 0x 0005b6c4
0005b6b4: 34424000 ori r2,r2,0x4000 Enable Stepping Stone
0005b6b8: 96020048 lhu r2,0x0048(r16) Load Unit's Y Coordinate + Flags
0005b6bc: 00000000 nop
0005b6c0: 3042bfff andi r2,r2,0xbfff Disable Stepping Stone
0005b6c4: a6020048 sh r2,0x0048(r16) Store Unit's Y Coordinate + Flags

Did you remember to rewrite this so something other than 128 is the stepping stone bit?

Pride

It would only affect items that would give stepping stone, Raven also pointed it out to me.
  • Modding version: PSX
Check out my ASM thread. Who doesn't like hax?

nitwit

I think that the Dragon, Behemoth, and Worker 7/8 classes all have move in excess of 128.

Pride

It only affects items, not classes with x80 + jump value unless they have enough negative items that would break it since I didn't have room to prevent underflow
  • Modding version: PSX
Check out my ASM thread. Who doesn't like hax?