• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 18, 2024, 11:41:42 pm

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!


How can I change a variable upon reading a rumor?

Started by advfox, November 02, 2014, 08:23:17 pm

advfox

November 02, 2014, 08:23:17 pm Last Edit: November 03, 2014, 01:46:07 pm by Blue
I'm curious - how can I set a bar rumor to change the value of a variable? I'd like for a certain event to become available after reading said rumor.
  • Modding version: PSX

Pride

You see these strings in tactext: {0xF566}{0xF60A}{0xF509}{0xF601} = 0x006D

Why it activates the variable at x6D is because of the two middle halfwords xF60A & xF509. It multiplies the x0A * x0A and then adds x09. So 10 * 10 + 9 = 109 or x6D
  • Modding version: PSX
Check out my ASM thread. Who doesn't like hax?

advfox

So if I took a variable like 40, and put that in 6D's place - {0xF566}{0xF606}{0xF504}{0xF601} = 0x0040. Would that be correct?
  • Modding version: PSX

Pride

No because x06 * x06 + x04 = x28 (or 40). Make sure you're using a hex calculator.

Correct would be...

{0xF566}{0xF608}{0xF600}{0xF601} = 0x0040 (x08 * x08 + x00}

or

{0xF566}{0xF607}{0xF60F}{0xF601} = 0x0040 (x07 * x07 + x0F}
  • Modding version: PSX
Check out my ASM thread. Who doesn't like hax?

advfox

  • Modding version: PSX