• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 19, 2024, 04:36:38 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!


Mime's Portrait keeps defaulting to Goblin

Started by y22bc, April 06, 2014, 03:43:03 am

y22bc

April 06, 2014, 03:43:03 am Last Edit: April 10, 2014, 11:18:44 am by y22bc
Hi,

I tried to turn Mime into Onion Knight and it worked fine at first, but something went wrong after I applied Zodiac's "Mime Function as Normal Job(v2)."

I learned to change sprites and graphics for battle, portrait, job wheel, and formation screen.
Everything looked perfectly fine at first, but as soon as I applied the said hack, Mime's portrait started defaulting to Goblin.
I changed Shishi's Type thing to 1 from 2, but it didn't help.
What can I do to fix this problem?  Unless there's a better work around for it.

Thanks.

Jumza

The only thing I can think of that might be having an effect on this would be these values

Go to the Mime job in the FFTPatcher under the jobs tab and make sure that these values are all 0. Making them something other than 0 will force different portraits / palettes onto them, and you probably don't want that for a generic job.
  • Modding version: PSX
Nyzer: Alma teleports out of her own possessed body.
Raijinili: Remember that you're telling a modding community that the game they love could use some fixing.

y22bc

Thanks for your reply.

It seems like the hack is meant to override the portrait.
I prepared my self a clean ISO and applied the hack and the result was the same.
Mime's portrait was overwritten by goblin.

I'm still looking for a way to make Mime function almost like the rest of generics.

Choto

I wish I could give a better answer, but what I would do is apply each part of that hack 1 at a time to see which of the edits overwrite the portrait. Is it the in-battle portrait or formation screen portrait that's overwritten? or both?

That hack is probably a bit imperfect too. Mime has a ton of hardcoding throughout the game and that hack may not cover it. It's just the best we have so far.

y22bc

Hi Choto,

I forgot to mention that its the formation screen portrait.
I just did what you said and found out the 9th code, counting from the top, was causing it to become that of goblin.
Here is a copy and paste of the code:
    <Location file="WORLD_WORLD_BIN" offset="0002CB2C">
      FFFF0334
    </Location>
I checked wiki, but I couldn't find what above 2 bytes mean.
Not that I can't make a wild guess that they must have something to do with formation screen portrait, but I'd still like to be explained, because I'm pretty sure Zodiac left it in for a reason.
I also noticed Mime has Item Throw hardcoded to it, but I should assume there are more to it.
So, can you explain to me what are the imperfections and hardcodings that you mentioned?
Thanks.


Choto

Well the easy way instead of figuring out exactly what it does (since I don't have time right atm) is to try to change it back to it's original code and see if that fixes the issue. Try replacing it with this and see if it fixes the problem. Or if you make a new iso you can just delete that part of the hack.

<Location file="WORLD_WORLD_BIN" offset="0002CB2C">
      5d000334
    </Location>

You're right in that it must have something to do with how the portrait is loaded.. but I have no clue why that would be hardcoded for a mime. Mime portraits aren't anything special. That's what I mean by there is random hardcoding all over the place for the Mime job. Furthermore, I have no clue what other hardcoding there is.. but other problems like the Item Throw can be investigated as they pop up.

My guess is that this hack was made by searching for a certain command that the creator knew would be present in a check for the Mime class (0x005d would be a guess since mime's job # is 0x005d) and just breaking that check. You can see why this may be an imperfect approach and leave some residue. Not to take anything away from the creator, it's actually a good way to approach finding the hardcoding without thumbing through miles and miles of code.

So anyway, with the Item Throw thing, you can take a similar approach and see if a certain part of the hack causes it. If you don't get lucky that way, we'll have to take a deeper look.

y22bc

Your code worked.
I tried to figure out how to get rid of the code that's disabling MP consumption and the code that's adding Item throw, but I couldn't, so I just give up.
Thnaks for your replies.

Choto

Never give up! This was a rather quick one to find with a debugger. Basically, you set a breakpoint on the units job ID in battle before you use an mp ability or item ability, and it will freeze the game at the point where it is checking if the units job is a mime (hopefully). These should work for ya.

<Location file="BATTLE_BIN" offset="113980"><!--Item Throw range-->
     ffff0334
    </Location>
   <Location file="BATTLE_BIN" offset="116b50"><!-- MP Usage-->
     00000000
    </Location>

y22bc

April 10, 2014, 11:18:22 am #8 Last Edit: April 10, 2014, 12:27:19 pm by y22bc
Thanks for your time and effort.
I didn't know using debugger was that easy, I guess I should learn to use it.
Your hack worked.
Mime couldn't use spells when it didn't have enough current MP, just like the rest of generics.
Followings also applied:
  Magic Attack Up
  Half of MP
  Item Throw
Magic Attack Up screwed up damage calculation a bit, but I'm assuming this was because FFT is not very good at handling decimals(or whatever else that it's not good at handling).

I'm pasting this here just in case someone needs it.
    <Location file="WORLD_WORLD_BIN" offset="0002CB00">
      5d000334
    </Location>
The above hack is meant to get pasted onto the 8th code of Mime Hack(v2) to revert male Mime's portrait from Chocobo.
All I did was to overwrite Zodiac's code with Choto's.

I'll be testing things like how Mime handles Draw Out and some other skills when Mime Hack(v2) is applied.

Choto

Pokeytax's ASM tutorial explains how to set a breakpoint with the debugger. Once you get to know where the data is stored in RAM it gets much much easier. For that check the "Data Locations.txt" file in the ASM starter kit thread in important links. In-battle unit data is at 801908cc. Player unit data starts at 801924cc. Trust me once you get used to it it's incredibly simple to find when the game is loading or changing certain data about your units.

and yeah, rounding is often imperfect with ASM code... that's part of why i hate testing number-based things.. I never know what is applying or what I'm supposed to expect to get. I consult Raven for that since he knows all that shit. Lemme know if you have any questions or anything.