Aslickproductions.org/forum/index.php?PHPSESSID=q4c29v6tmbbnv0gvgpv2lv9nn7&topic=1754.60e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexf7cf.htmlslickproductions.org/forum/index.php?board=13.160e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/indexf7cf.html.zx@g^,//*OKtext/htmlISO-8859-1gzip0|/*Tue, 10 Mar 2020 07:40:21 GMT0 0P@g^./* Unknown info from FF4 that would be great to know

Author Topic: Unknown info from FF4 that would be great to know  (Read 17969 times)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #60 on: February 04, 2013, 03:36:40 PM »
Indeed, it has everything to do with that. I've found what Seems to be why that is, but unfortunately changing it makes the entire process not function correctly, it's really quite bizarre.

vivify93

  • Liquid Flame
  • *
  • Posts: 304
  • Gender: Male
  • White Wizard
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #61 on: February 10, 2013, 04:27:15 AM »
1A Chang -- Yes, this really is "Chang" in the ROM; I don't know where the e
            gets put in.
I actually found some info on the Change and Parry commands just now. I'll quote it here.

Quote from: vivify93
Okay, story time. So I noticed the battle label "Need MP" is different from the menu label sharing the same text. So I looked for it. No dice. Then I found this weird block of text.

Code: [Select]
KOSWaeimp/NeedMP
ParyChnge0123456
"mp" before the slash on the first line are the little ones shown in the HP / MP display.

I think I just discovered where "Change" and "Parry" are really being drawn from. I'll report my findings.
:hmm:

 :edit: I discovered, so far, that I have no idea where the game is drawing the space for "Need MP" from. Attempts at changing it to "MP Cost" yielded "MPCo st". Further, it appears the "a" of "Parry" and "Change" are shared. Changing it to "Row" made it show as "Roaw" in battle.

"Pary" just doubles its own "r".

I hope this helps somehow. I have no idea what to do with this information.
Hacking is hard. :sad:

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #62 on: February 10, 2013, 11:42:02 AM »
What a bizarre way to... save space? I ran into a similar type of issue attempting to change the word "Call" to something with five letters in the spell menu screen - doing so causes the word "Ninja" not to appear correctly... Inserting the extra byte for a letter after "Call" causes "Ninja" to not appear at all (instead you get "Black," which the game somehow replaces with "Ninja" when the character is in Edge's slot). Typing over the 00 that naturally follows "Call" works, but then you get a "u" after that, and changing the naturally-occurring "u" again causes "Ninja" to mess up. So it seems like the only possibility is to change "Call" to a six-character string that ends with "u."

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #63 on: August 14, 2013, 12:15:28 PM »
Does anyone know anything about how encounters are stored? By which I mean, what monster formations do you fight in what maps, and at what frequencies?
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #64 on: August 14, 2013, 12:23:01 PM »
Hmm, as I recall several of the older editors has that information able to be editted (at least for the overworld) but where that data is drawn from, I'm not sure.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #65 on: August 14, 2013, 01:20:46 PM »
Ok so from Zyrthofar's editor I've discovered that there is a table from 74966 to 74C95. The table consists of 0x60 entries, each of which is a sequence of 8 bytes. Each byte is the index of a formation.

The next question then is, how does the game store which maps correspond to which encounter sets? This information is displayed in Zyrthofar's editor but is not editable and thus I'm not sure I can reverse engineer it.

 :edit: Never mind, I found it!! There is a list from 74796 to 74915. Each entry is a single byte and represents the encounter table used for that map's encounters.
« Last Edit: August 14, 2013, 01:37:17 PM by Pinkpuff »
Let's dance!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #66 on: August 14, 2013, 01:28:45 PM »
There are 511 possible monster formations, each composed of 8 bytes, located in a table at 70200 (previously discussed here: http://slickproductions.org/forum/index.php?topic=1713.300)

There are 96 sets of monster formations that can be assigned to any given location.
Each set consists of eight of the possible monster formations (represented by one byte each, and whether this byte represents one of the first 255 or the latter 255 formations is determined by whether the location it's set to is in the Overworld or Underworld/Moon). The probability of each formation within a set is even.
The table for these sets begins at 74996.

Which monster formation set is used by each location is determined by a table beginning at 74742.
According to Phoenix:
   74742-74781   For the Overworld (1 byte per 32x32 tile region)
   74782-74791   For the Underground (1 byte per 32x32 tile region)
   74792-74795   For the Moon (1 byte per 32x32 tile region)
   74796-74995   For Locations (1 byte per location)

I hope I made that clear enough. If not, lemme know.

 :edit: You figured some of that out in the time it took me to type it.  :blush:
« Last Edit: August 14, 2013, 03:50:39 PM by chillyfeez »

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #67 on: August 14, 2013, 01:38:57 PM »
 :celosa: No problem. Your info is much more comprehensive by the looks of it. Thanks!!

 :edit: Wait a second...

The probability of each formation within a set is even.

... is that true?? There's a 1/8 chance of a Pinkpuff encounter?
« Last Edit: August 14, 2013, 01:57:43 PM by Pinkpuff »
Let's dance!

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #68 on: August 14, 2013, 02:29:03 PM »
Hmm... good question. I assume it is true because I haven't seen any indication otherwise. I guess some experimentation is needed.

 :edit: This seems to imply I'm mistaken: http://rb.thundaga.com/monsters/pink_puffs.txt
Still looking for the actual answer.

 :edit: 2 - Found it.
http://s-endo.skr.jp/ff_analyzer.html
This document is in Japanese, but I'm 99% sure that it says:
Group 1: 43/256 Chance Encounter
Group 2: 43/256
Group 3: 43/256
Group 4: 43/256
Group 5: 32/256
Group 6: 32/256
Group 7: 16/256
Group 8: 4/256

Kinda wish I could read more Japanese... I bet there's some good stuff in there.
« Last Edit: August 14, 2013, 03:50:10 PM by chillyfeez »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #69 on: August 15, 2013, 11:04:08 AM »
Hmm, is there any documentation on how Cover actually works? It seems that if it's not the Paladin who is using it, it would put the Paladin into Cover, if the Paladin were present.  Which is actually interesting when you think about it. You could give the Cover command to Rosa and have her call out for her own protection rather than using a turn with Cecil to protect her.



 :edit: Well that's a little disappointing, at least in regards to my hack. The game will not say that the Paladin is Present in the Cover section of data if the Dark Knight is also present, therefore Cover will not work if both Dark Knight Cecil and Paladin Cecil are in the same party. I'll try to find the reason for this.
« Last Edit: August 15, 2013, 11:42:10 AM by Grimoire LD »

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #70 on: August 15, 2013, 12:12:07 PM »
:edit: 2 - Found it.
http://s-endo.skr.jp/ff_analyzer.html
This document is in Japanese, but I'm 99% sure that it says:
...etc...
Kinda wish I could read more Japanese... I bet there's some good stuff in there.

That is awesome! Thanks chillyfeez! So it is as I suspected. I wonder if we can find where those probabilities are stored and change them!  :hmm:

I can read a little Japanese... not enough to read that document though.  :sad:
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #71 on: August 15, 2013, 02:49:10 PM »
Well... Cover is cracked. It's an odd little command, admittedly with a redundant check which is quite boggling.



So how the command works is at the start of the battle the game checks to see what slot the Paladin is Occupying (thanks to the Tower of Babil docs for that bit of info.)  If the Paladin is present then Cover can effectively be used.

If the Paladin is not present however or the Dark Knight Cecil is Present, Cover Cannot Work.

It's bizarre that the game would have programmed in it this safeguard that can never logically happen. In any case in RAM it is at...

0x038D61 - C9 01 (CMP with 01 ) 01 is Dark Knight Cecil's Actor Number. If the Dark Knight is Present the game will act as if the Paladin is Not.

0x038D65 - C9 0B (CMP with 0B)  0B is Paladin Cecil's Actor Number. If the Dark Knight is Present and the Paladin is, the game will still act as if the Paladin is Not.

In ROM this is at...

0x018F61 - C9 01 (CMP with 01 ) 01 is Dark Knight Cecil's Actor Number. If the Dark Knight is Present the game will act as if the Paladin is Not.

0x018F65 - C9 0B (CMP with 0B)  0B is Paladin Cecil's Actor Number. If the Dark Knight is Present and the Paladin is, the game will still act as if the Paladin is Not.

If you were giving Cover to say... Kain or Yang you would first change the 01 to an invalid number like 1F and then change 0B to their corresponding Actor Numbers. Though there is a problem you may have noticed,  when a character leaves the group the next time they come back they likely are using a different Actor Number, therefore unless your game has a set party or the same instance of a character returns instead of a copy (Not sure how that would work) then Cover would no longer work. I'm sure a little more digging could be done to find why it is looking at an Actor and switch that to the Character ID, but this is fine for my purposes for the moment.

 :edit: I can never just leave things be, can I? Well here's the way to change Cover's lockouts and allowances based on Character Class rather than Actor ID, making it a lot more versatile and you won't have to change things wildly to use it on a rejoining character.

In RAM at...

0x038D5C BD 00 20 - Loads what is at 7E2000 (mirrors) - This is the Actor Identifier and it's looking at this to determine if the Paladin and/or the Dark Knight is present. Changing this to BD 01 20 allows for the modder to assign the Cover functionality to a Class rather than a Character, meaning that you can freely give it to another character, no matter who they are without worry of losing it when they rejoin.

In ROM this is at...

0x018F5C BD 00 20 - Loads what is at 7E2000 (mirrors) - This is the Actor Identifier and it's looking at this to determine if the Paladin and/or the Dark Knight is present. Changing this to BD 01 20 or rather 7E2001 check, allows for the modder to assign the Cover functionality to a Class rather than a Character, meaning that you can freely give it to another character, no matter who they are without worry of losing it when they rejoin.
« Last Edit: August 15, 2013, 07:19:26 PM by Grimoire LD »

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #72 on: August 16, 2013, 09:33:44 AM »
Ok, I have created a new wishlist of things to figure out. It's rather lengthy and involved, so I'm basically trying to decide between these options:

1. Post it here as a reply. The list is large-ish and this thread is already a bit all-over-the-place, but it would fit the original theme and purpose of the thread

2. Edit the original post to contain the new wishlist. Similar to above except it might make it easier to reference (though I'll probably have to do a better job of maintaining it than I had been)

3. Post a new thread for the new wishlist. This would be easier for me but might cause too many too-closely-related threads (this, the new one, and the main FF4kster thread)

4. Post a new (separate) thread for each item in the wishlist. Might be kinda cluttered but at least it would be organized and easier to find information on particular topics.

Do you guys have any advice?
Let's dance!

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #73 on: August 16, 2013, 09:48:49 AM »
Well here's a little bit of information that some might find interesting. I'm not sure if anyone's ever noticed but when you go to use an Item in a "Use Item" event like the Well in Agart, you can only choose Items. While this makes sense from the game's standpoint it is also very limiting for modders, especially since Square went through the efforts of making any kind of item usable in those kind of events. Well a quick check on why a specific weapon wasn't showing up as a choice for a custom event (setting a read breakpoint on it) I found the answer straight away.



In RAM at 0x0B0AE C9 CE - Compare with the Start of the Consumables List. If you want it to include all items just change C9 CE to C9 00.

In ROM at 0x032AE C9 CE - Compare with the Start of the Consumables List. If you want it to include all items just change C9 CE to C9 00.

In addition nearby there are references to C9 E7, C9 EB, and C9 FE, but I have no idea what they are comparing.

-------------------------------------------------------------------

Hmm, the separate thread idea would be keeping up with the tradition that Deathlike2 started and his information and sorting is concise for the most part, but it would depend on how many threads you plan on making, is it more than 5? 10? If it's less than 5 it might be a good idea, more than 5 it could be a bit cluttered.

A new thread is always an option, though the idea to edit your opening post for this thread is a very valid option, but there is quite a bit in this thread already.

In the end it comes down to how easy it is to see things. If you think you can manage the ideas with this thread and not let much slip through the cracks, that could be your best bet. But if you're worried about accessibility your multiple threads idea would not be without precedence.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Unknown info from FF4 that would be great to know
« Reply #74 on: August 16, 2013, 10:47:44 AM »
I'm leaning towards the separate thread for each item myself. There's already some gems that I know are in this thread somewhere but it's too haphazard / I'm too lazy to go hunting for it. There are definitely more than 5. 15-20 would be a better estimate.

I think what I'll do then is make separate threads and if it's a problem the mods can bring it up with me and I'll by all means comply with whatever they say.

Perhaps we can have an index thread then that links to all of them, kind of like how there's a "THE Command Thread" but then there's a thread for each separate command.
Let's dance!