Final Fantasy Hacktics

Modding => Help! => Topic started by: RavenCurow on April 14, 2018, 08:20:39 am

Title: Trying to figure out an asm formula
Post by: RavenCurow on April 14, 2018, 08:20:39 am
So I'm trying to figure out this asm formula to get the status on the formula and I can't seem to figure the math. So I set x to 27 and that gives me the status block that looks like this

   0x80 -
   0x40 - Crystal
   0x20 - Dead
   0x10 - Undead
   0x08 - Charging
   0x04 - Jump
   0x02 - Defending
   0x01 - Performing

Now the status that gets added is the Y value and so you plug that number in. Where it gets complicated is that Y will add multiple statuses to the formula because it adds the statuses together. For example if I put in 1 I'll get performing. 2 will get defending. But 3 will get both defending and performing. Now I want to just have Undead, but putting in 10 will of course get me defending and charging. So I'm not exactly sure what number to use to get what I need.

Edit: After much trial and error I came upon the correct number which is 16. I'm still not quite sure why that number is correct. The only reason I made a guess at it is because all of the statuses before it combine to 15 so I tried 16 which I figured was just as likely to get me Undead, jump, and defending.
Title: Re: Trying to figure out an asm formula
Post by: Glain on April 14, 2018, 07:00:26 pm
The 0x prefix designates a hexadecimal (base 16) number.  Place value is based on 16, not 10.  0x10 = 16 * 1 + 0 = 16.
Each number is double the previous, and represents a different bit inside the status byte.
Title: Re: Trying to figure out an asm formula
Post by: RavenCurow on April 15, 2018, 05:47:35 pm
Oh okay. I was thinking 0x10 was A lol. Shows how much I've picked up. Thanks for explaining that.