Author Topic: What is known about vehicles?  (Read 6120 times)

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: What is known about vehicles?
« Reply #15 on: August 25, 2013, 10:42:49 PM »
How curious. So the Black Chocobo graphic won't fully reappear. Even when it's in the air if you always set the value to 00? (A pet Black Chocobo would be great for a hack though!)

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: What is known about vehicles?
« Reply #16 on: August 25, 2013, 11:46:52 PM »
Sorry, no, I guess I didn't explain that right...
If you change the tile properties so the chocobo can land on non-forest land, it's bottom half will still be invisible when it lands.
It's fully visible when flying.
This is really only a problem if you want to turn your chocobo into a different vehicle. It's a fully-working patch if you want a pet chocobo.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: What is known about vehicles?
« Reply #17 on: August 26, 2013, 04:37:41 AM »
Hah! Very nice! I always loved the concept of the Black Chocobo, a vehicle that couldn't fly over mountains and could only land in forests. FFIV never really uses this to its full advantage unfortunately, FFV uses it to some extent though. However due to the restrictions regarding the Airship and the Black Chocobo there could be areas only one or the other could reach, hmm...

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: What is known about vehicles?
« Reply #18 on: August 27, 2013, 06:06:47 PM »
So for the past couple of days, I became somewhat obsessed with making an airship that would rise and zoom differently than what is standard. I finally began writing my own takeoff and landing routines based on those of the Hovercraft. It was coming along nicely, but then I finally came to realize - being able to do this, while a fun little diversion and a useful exercise to learn some ASM, is not really very helpful.
You see, even if I can make the Falcon rise a few pixels off of the ground with no zoom out, I still have no idea if it's possible - and if so how - to make it's travel and landing ability different from the Highwind. So this would really only be a novelty at best.

Anyway, I decided instead to put what I've learned towards pursuits that are actually of use, and on that note, I discovered how to change the music that plays with each vehicle!
The pointers are located at 0D74 in ROM.
By default, the string reads:
Code: [Select]
0D 04 05 0D 18 18 0EThese represent the songs played while on foot, riding the Yellow Choc, the Black Choc, Hovercraft, Highwind, Falcon and Whale respectively. Just change the appropriate byte to any other value between 00 and 37 for a different song. Yes, the Highwind and falcon have separate assignments, and yes, you can have the game play different music when you're riding the hovercraft.
It should be noted that I don't know how the game handles cuing underworld and moon music when you are at those places, because OD is definitely the "Overworld" song.

Next up for me is creating a map of the world map tilesets. Having that in combination with knowledge of the tile properties will make for easy editing of where each vehicle type can travel.

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: What is known about vehicles?
« Reply #19 on: August 27, 2013, 07:38:56 PM »
You are making incredible strides, just a question though. Is Mythril Reinforced Aircraft a different kind of vehicle from the normal aircraft? Is going over a Lava a flag or is it considered to be a different variable of a vehicle?

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: What is known about vehicles?
« Reply #20 on: August 27, 2013, 07:46:31 PM »
(7E)1701 stores which world you're currently on, so I'd imagine something checks that and plays the appropriate track. Does changing $0D actually have any effect?

 :edit:

Ah wait, you mentioned the hovercraft music change works, so it must.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: What is known about vehicles?
« Reply #21 on: August 27, 2013, 08:43:47 PM »
Is Mythril Reinforced Aircraft a different kind of vehicle from the normal aircraft? Is going over a Lava a flag or is it considered to be a different variable of a vehicle?
I thought of that a day or two ago.
When I was breaking down the tile properties, I was primarily experimenting on the Overworld, but figuring that out exactly will be part of the project I'm about to undertake.
My theory - and it's only a theory - is that there is an as-yet undocumented by me property that blocks airship travel until a specific event flag is set (like the Magnes Cave flag). Event flag 39 (hex) gets set at the end of the event when Mystic Silver is added to the Falcon. So I'll play around with that when I'm messing with Underworld tiles. Part of me wonders if the Underworld might have some slightly different tile properties, since there would be no (default) need to dictate chocobo or Lunar Whale travel. I will find all of that out in good time.

Does changing $0D actually have any effect?
There are two ODs. changing the one at 0D77 changes the music while riding the hovercraft. Changing the one at 0D74 changes what music is cued when dismounting your vehicle. The "mode of transport music cue" subroutine at 0D3F is called at every mount and every dismount. It checks the value at 1704 in RAM and adds that to 0D74 ($8B74 in LoROM). So if you're on foot, your value at 1704 is 00, and it will cue the song at 0D74.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: What is known about vehicles?
« Reply #22 on: August 29, 2013, 10:32:26 PM »
Figured out the lava problem. Posted it to the "What is known about the Overworld" thread... sort of by mistake, but also because it's equally relevant to both topics.
http://slickproductions.org/forum/index.php?topic=1866.0

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: What is known about vehicles?
« Reply #23 on: August 30, 2013, 09:03:56 AM »
I thought of a few more things I don't know yet about vehicles. Here's the list so far of things I'm trying to figure out:
  • The Falcon's drill - obviously it's set by an event flag and is essentially cosmetic, but is the falcon still the same vehicle with new graphics, or is it a new vehicle (in which case maybe it could be given a separate set of travel instructions)?
  • The Enterprise's crane - ditto, except for the cosmetic part
  • The heat shield - so I figured out the tile property that determines its requirement, and I figured out the event flag, but I still haven't looked into whether this works for both airships, or just the Falcon
  • The Enterprise's first trip to the Underworld - I intend to look into this routine (if I can find it) to see how it decides to only affect the Enterprise, and if it is possible to make the Enterprise do something else - besides not take off - when the flag is set
  • Entering the Tower of Zot - ditto, but also, is the Enterprise alone capable of entering? What if you have the Falcon instead at this point? will it also enter Zot?
  • The airships traveling between the Overworld and the Underworld - of course the ability to do so is toggled by an event flag, but beyond that, how does the game know where this is possible? could this be the purpose of Byte 1 bit 5 in tile properties that I thought was unused? it would only have to be set on (I believe) ten tiles, so it's possible I missed it when I scanned the properties data.

Lenophis

  • Forum Overlord
  • *
  • Posts: 1,688
  • Gender: Male
  • I sad
    • View Profile
    • Slick Productions
Re: What is known about vehicles?
« Reply #24 on: August 30, 2013, 09:58:02 AM »
I'm going to take a guess generalizing this. If you should cheat your way into having a different airship than the one you're supposed to have that early in the game, I believe the game will treat it as though you have the one you should. I will also guess that there is one master airship logic routine, and it simply checks to see which one of the airships you're riding at the time, and checking various event flags to see which actions are possible when. The Lunar Whale probably has its own logic routine, though I could be wrong.

Quote
could this be the purpose of Byte 1 bit 5 in tile properties that I thought was unused? it would only have to be set on (I believe) ten tiles, so it's possible I missed it when I scanned the properties data.
One way to find out. Clear that bit of tiles allowing you to go back up, and then see if you can go back up. :omg:

119 bugs fixed and counting.

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: What is known about vehicles?
« Reply #25 on: August 30, 2013, 10:51:48 AM »
I'm not sure if it's relevant to the SNES version, but the GBA version actually disables the Lunar Whale's flight ability (including the crystal) when the Tower of Zot is accessible. Not all that useful in a hack following the normal progression, but interesting - I'd imagine the Falcon is the same way.

On a similar note, the GBA debug room never enables the airships to fly over magma. That includes the Enterprise, if you take it down to the underworld. The GBA version (well, WSC really) doesn't share code with the SNES version, so it's possible the behavior isn't the same as the original, but it'd surprise me if they were separate in the original but shared the flag in the remake.

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: What is known about vehicles?
« Reply #26 on: August 30, 2013, 02:33:57 PM »
Thanks - I wasn't necessarily asking for help on figuring these things out. I was just listing the aspects of airship travel that I acknowledge I haven't cracked yet to let interested parties know I will figure them out in good time. Most of these things, I know what I am going to do to try to figure them out, it's just a matter of taking the time to do so.

Can anybody think of any other missing vehicle information not yet covered on this thread?

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: What is known about vehicles?
« Reply #27 on: August 31, 2013, 10:52:39 AM »
Byte 1 bit 5 of tile properties is definitely unused.
Looks like I'll have to trace the routines that travel between the Overworld and Underworld to try to figure out how airships do it.
... unless there's another dual-use bit like the chocobo/lava bit...  :hmm:

chillyfeez

  • FF4 Hacker
  • *
  • Posts: 1,285
  • Gender: Male
  • Go ahead, ask me about Angel Feathers!
    • View Profile
Re: What is known about vehicles?
« Reply #28 on: September 02, 2013, 10:37:59 PM »
I haven't had a lot of time this weekend, but I can tell you this - only the Enterprise will fly to Zot (in the SNES version). If you have the Falcon at that time, you are still free to fly around. So even though (I think) they use the same takeoff routine, there must be a STA $1704, CMP #04 preceding the entrance to the tower.
« Last Edit: September 02, 2013, 10:58:21 PM by chillyfeez »

Grimoire LD

  • FF4 Hacker
  • *
  • Posts: 1,684
    • View Profile
Re: What is known about vehicles?
« Reply #29 on: September 03, 2013, 12:20:32 AM »
Hmm, the Event Flag is 49 (30 or 31 in Hex) but I've taken a look and I've come up empty as well. There are several CMP for the Enterprise, but nothing of much value as far as I can make out.