Rand

From Final Fantasy Hacktics Wiki
Revision as of 17:05, 9 November 2023 by Glain (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Call the rand() function, which sets r2 equal to a pseudorandom number in range [0..0x7fff]. See RNG.

0002230c: 240a00a0 addiu r10,r0,0x00a0    
00022310: 01400008 jr r10               # Jump to 0xA0 (system call), with r9 = 0x2f (47). This calls the PSX built-in function rand().
00022314: 2409002f addiu r9,r0,0x002f


Return Locations

  • SCUS
00059ffc: Out of Battle Unit Generation x2
0005a448: Generate Unit's Base Raw Stats
0005ac1c: ENTD Data Calculation
0005b500: Sprite Set and Random Secondary Job Calculation
0005ba70: Calculate Unit's Abilities
0005c984: Store/Generate Character Names
0005cc98: Calculate Random Equipment
0005d0bc: Calculate Unit's R/S/M
0005da10: Level Up Section
0005e0cc: Check if Random is greater/equal to Chance
  • Battle.bin
0017d4a0: Determining Multi Hit Formulas
00180a08: Generate Treasure
00183078: Undead Revive, Reraise, death sentence, some brave change? some defend change?
0018eea0: Random Process, gives a number between 0-7fff
0019af18: 
  • Wldcore.Bin
000706c4:
00070710:
0007330c:
00077f2c:
000796d0:
00079bfc:
00079f24:
00079f60:
00079f84:
0007a02c:
00080654:
00080690:
0008baf4:
0008f188:
0008f1e4:
  • World.Bin
00119eec:
00119f18:
00120508:
00120538:
00120564:
00125b98:
00125bc8: 
00125c0c:
00125c60:
00125ca8: