News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: [SNES] [FF2us] Bunch of questions & ideas  (Read 2234 times)

Lizardking

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
[SNES] [FF2us] Bunch of questions & ideas
« on: January 27, 2020, 03:17:33 am »
Hey there,

Stilling playing around with FF4Kster and a few other programs. I figured I should hold off on asking questions until I have a decent amount of them, but I think we've gotten there now, so...

1) Changing world map - How does the game know when to bury Mist, open up the passage around Agart and re-close it? Has anyone played around with this? Is it possible to expand on this feature in the game? (Like say, having an area go from forest to desert after an event?) Best I can tell, it's related to the game flags, but that's as far as I've been able to figure out.

2) Item depletion - how does the game know to not remove the Crystal (that Cecil uses in the final battle) from inventory? Is it possible to extend that to another item (or preferably multiple ones, like some of the event triggering items?)

3) Is it possible to alter the battle commands and what they point to? Specifically, I'm wondering if Edge's Ninja magic can be redirected to draw on a Call magic list instead of Black magic.

4) Sprites - An idea I had (probably several lessons in assembly hacking away from being able to do this, but still) was to re-direct Golbez' battle sprites to use the three sprites of Anna's so he could have a complete sprite set, then just using a monster slot for Anna. Is this possible? On that same note, is it possible to re-direct the game to look to either the toad portrait or the mini-map sprite for Golbez so he's not spread across three different characters?

5) The ship - I get there's no spot to tell the game what the ship should do with the various map tiles (can pass, not pass, etc) but I keep seeing in various hacking notes that there's spots in the RAM to track the map tile you're currently on and the adjacent ones. Would it be possible to manually insert parameters for the ship so when the game detects there's, say, a mountain next to the ship it won't let you move there? Or if there's a walkable terrain to disembark the ship?

6) FFIV's config menu - you can load your savegame up with an FF4 rom, use the config (such as changing the button inputs) and then load it back into the FF2 rom and the settings will stay, so is it possible to just re-insert the FF4 custom menu into the FF2 rom?

7) Jumping hero - Looking through hacking notes, I noticed NPCs have an option to spin jump and make forward jumps, which are blank for the player sprite. Would it be possible to link the blank command to the code for jumping to make the hero jump? Following on that, assign the command to a button for a jump function like in Final Fantasy: Mystic Quest?

8) Successive world map triggers on same co-ordinates - specifically, I'm wondering if you could have a pre-bombed Damcyan that changes to the standard ruined Damcyan after the Red Wings bomb it. Is it possible to have a trigger change where it teleports you depending on what flags are on?

9) Underworld expansion - The game has the same area available for the underworld as the overworld, but half the data slots? What would it take to get the same amount of data slots for the Underworld?

10) Chocobos - I saw somewhere on here some info on getting the Yellow Chocobos to stay put when you dismount them which I would like to try to implement, but can you do the same for Black chocobos? Another idea I had was making Rydia's Chocobo summon useable on the map and having it call a chocobo to the party's position. Possible? Also, is there a way to make chocobos able to enter locations like Boco does in FF5?

11) Rydia's Magic orbs - Something I'm hoping to do is change the magic lists to something closer to FFV where the entire party shares a white magic and black magic list instead of having individual lists for each character. Obviously this doesn't work with the learning magic at level up system, so I'm wondering if the way the magic orbs add spells to lists could be adapted into some sort of a spell shop system?

12) Shadow party - I still would love to know how Chillyfeez figured out how to keep everyone in the shadow party, instead of having multiple Kain and Tellah actors. Also, does Golbez have an actor?

Thanks in advance.

Grimoire LD

  • Sr. Member
  • ****
  • Posts: 415
    • View Profile
Re: [SNES] [FF2us] Bunch of questions & ideas
« Reply #1 on: January 28, 2020, 08:51:16 am »
Hey there,

Stilling playing around with FF4Kster and a few other programs. I figured I should hold off on asking questions until I have a decent amount of them, but I think we've gotten there now, so...

Oh you bright eyed yearner of wisdom, learn now the sadness and the tragedy of Slickproductions and the vast amounts of knowledge lost to the dusts of time.

Alright, enough with the dramatics. It's great to see someone who has so many ambitious ideas for FFIV, I'll try to give my thoughts and possibilities on accomplishing each of them.

Quote
1) Changing world map - How does the game know when to bury Mist, open up the passage around Agart and re-close it? Has anyone played around with this? Is it possible to expand on this feature in the game? (Like say, having an area go from forest to desert after an event?) Best I can tell, it's related to the game flags, but that's as far as I've been able to figure out.

There is a flag which tells the game that Mist Events have occurred, along with the Agart mountain hole, but you've likely figured that out. I do recall that Chillyfeez had found information relating to the placement of tiles through flag manipulation, but I don't recall what it was he discovered.

Quote
2) Item depletion - how does the game know to not remove the Crystal (that Cecil uses in the final battle) from inventory? Is it possible to extend that to another item (or preferably multiple ones, like some of the event triggering items?)

Quite an intriguing question. The game treats the Crystal as a "Key Item" the same way it treats the Legend Sword. However it is unlikely it can be applied to anything outside the usable Battle Items because the game doesn't know what graphics and effects to draw for items that have been used in that way. Here's a test you can try... in FF4kster try to change the "Key Item" of Crystal in the "Features" tab to something else like... Cure1, and see if Cure1's are used up any more.

Quote
3) Is it possible to alter the battle commands and what they point to? Specifically, I'm wondering if Edge's Ninja magic can be redirected to draw on a Call magic list instead of Black magic.

The listing is purely superficial. Edge's Spellbook can contain whatever spells you want in them without there being any real issue, as far as I'm aware. Ah, unless you mean you want him to link into Rydia's Call magic...? I'm a little confused what you are looking to accomplish here, admittedly.

Quote
4) Sprites - An idea I had (probably several lessons in assembly hacking away from being able to do this, but still) was to re-direct Golbez' battle sprites to use the three sprites of Anna's so he could have a complete sprite set, then just using a monster slot for Anna. Is this possible? On that same note, is it possible to re-direct the game to look to either the toad portrait or the mini-map sprite for Golbez so he's not spread across three different characters?

A great question... I know nothing about that, but that is an interesting idea. Were it up to me, I would scrap the Pig spell entirely against PC's and just use it as the base to put Golbez in the game without replacing any characters, but ideally we could expand the rom... but again, outside of my purview of knowledge.

Quote
5) The ship - I get there's no spot to tell the game what the ship should do with the various map tiles (can pass, not pass, etc) but I keep seeing in various hacking notes that there's spots in the RAM to track the map tile you're currently on and the adjacent ones. Would it be possible to manually insert parameters for the ship so when the game detects there's, say, a mountain next to the ship it won't let you move there? Or if there's a walkable terrain to disembark the ship?

It's possible, sure. the best example to look at would be the Enterprise in the Underworld for the brief minute that it can't cross Lava, if you can figure that out you might be able to program the ship to act in that manner. As for disembarking... you might be able to use a normal event that occurs when you touch the water tile next to a dock or what have you.

Quote
6) FFIV's config menu - you can load your savegame up with an FF4 rom, use the config (such as changing the button inputs) and then load it back into the FF2 rom and the settings will stay, so is it possible to just re-insert the FF4 custom menu into the FF2 rom?p

I think someone's actually done that or has tried to do that, but I can't distinctly recall...

Quote
7) Jumping hero - Looking through hacking notes, I noticed NPCs have an option to spin jump and make forward jumps, which are blank for the player sprite. Would it be possible to link the blank command to the code for jumping to make the hero jump? Following on that, assign the command to a button for a jump function like in Final Fantasy: Mystic Quest?

All characters have the ability to jump in the air, we see them do it several times in cutscenes throughout the game. I can't see it as anything but automated though, FF4 is very stringent with where you are at a given point, jumping from layer 1 to layer 2 or things like that would be incredibly difficult to set up.


Quote
8) Successive world map triggers on same co-ordinates - specifically, I'm wondering if you could have a pre-bombed Damcyan that changes to the standard ruined Damcyan after the Red Wings bomb it. Is it possible to have a trigger change where it teleports you depending on what flags are on?

There are indeed! In fact, this is how the hallway before the Baron Throne Room works. Unfortunately FF4kster never made it to the point where you could edit triggers on the Overworld, if you could you would be able to take one of the unused Tower of Babil Overworld entrance tiles and set it to trigger an event sequence that searches for an enabled or disabled flag, and proceeds accordingly. It can be done manually with a little hacking, using old surviving notes (at least I hope they survive...).

Quote
9) Underworld expansion - The game has the same area available for the underworld as the overworld, but half the data slots? What would it take to get the same amount of data slots for the Underworld?

I'm not sure what you mean by data slots... care to elaborate? If you mean increase its size, that shouldn't be difficult. You can easily add one or two new areas to it by using Yousei's old editor and attaching the right trigger data to it.

Quote
10) Chocobos - I saw somewhere on here some info on getting the Yellow Chocobos to stay put when you dismount them which I would like to try to implement, but can you do the same for Black chocobos? Another idea I had was making Rydia's Chocobo summon useable on the map and having it call a chocobo to the party's position. Possible? Also, is there a way to make chocobos able to enter locations like Boco does in FF5?

Not without some major hacking... the game doesn't remember where the Yellow Chocobo's are, it does with Black Chocobos. It might be easily possible to kill the "return home" part of the Black Chocobo code, therefore allowing you to keep it. FFIV is very picky with sprite allotment in maps. You could pretty easily create a sequence that shows a Chocobo running the player through a given area, but you couldn't allow the player to have control during it.

Quote
11) Rydia's Magic orbs - Something I'm hoping to do is change the magic lists to something closer to FFV where the entire party shares a white magic and black magic list instead of having individual lists for each character. Obviously this doesn't work with the learning magic at level up system, so I'm wondering if the way the magic orbs add spells to lists could be adapted into some sort of a spell shop system?

My first FFIV hacks were looking into how the Summon Orbs worked... (and yet that data was never entered into FF4kster... *sniffle*) If every character has the same magic list you might be able to cannabalize alot (And I mean A Lot) of items to make a spell shop system, so... you might want to think of another way. An easier way is to use events to do this. Though it is innately hacky... Say you want to have each town sell three black/white spells. You could make a couple items called a "(Orb)Spell" of varying levels.  You could have a White Mage NPC activate an event asking the player. "Do you want to use a Spell Page to inscribe the Mute Spell or..." YES/NO. If yes, search for a Spell Page, then the player gains the Mute Spell. If you choose No... "do you want the Shell Spell or..." Rinse and repeat. It's hacky... but it accomplishes a similar system, IF you link all the magic systems together... or you can code your own spell learning system using the shop ui as a base... but I wouldn't know how to go about that.


Quote
12) Shadow party - I still would love to know how Chillyfeez figured out how to keep everyone in the shadow party, instead of having multiple Kain and Tellah actors. Also, does Golbez have an actor?

Thanks in advance.

Only Chillyfeez can really tell you that. Golbez does not have a proper actor, no. As you noted his functionality is basically split. The NPC for Golbez does not correspond in battle with Golbez. With some hacking it might be able to be done, along with changing his class to Lunarian or something, but as you noted he is lacking some frames...

Aexoden

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [SNES] [FF2us] Bunch of questions & ideas
« Reply #2 on: January 31, 2020, 05:35:52 pm »
Answering most of this accurately would require diving into some code to remember everything I've forgotten, but I can at least comment on a few off the top of my head, especially where I have something to add on top of what Grimoire LD said.

2) Item depletion - how does the game know to not remove the Crystal (that Cecil uses in the final battle) from inventory? Is it possible to extend that to another item (or preferably multiple ones, like some of the event triggering items?)

There is actually some custom code that prevents the Crystal's count from being decremented that specifically checks for the Crystal. I suppose there could be other checks that are linked to some property of the item, but not that I know of.

Quote
5) The ship - I get there's no spot to tell the game what the ship should do with the various map tiles (can pass, not pass, etc) but I keep seeing in various hacking notes that there's spots in the RAM to track the map tile you're currently on and the adjacent ones. Would it be possible to manually insert parameters for the ship so when the game detects there's, say, a mountain next to the ship it won't let you move there? Or if there's a walkable terrain to disembark the ship?
At this time, I'm not yet sure if there's a bit that could be repurposed as a "ship allowed here" bit, or if you'd have to eliminate another vehicle or something. I think the ship still needs the board/disembark routines, but those aren't incredibly complicated.

Quote
9) Underworld expansion - The game has the same area available for the underworld as the overworld, but half the data slots? What would it take to get the same amount of data slots for the Underworld?
If you mean the size of the map, the main problem is fitting into the space allowed in ROM. The outdoor maps are compressed, and there isn't loads of free space available. (The unused three quarters of the underworld map take up very little space due to the compression.)
If you meant number of maps, I don't recall how ingrained the 384 total map limit is in the code, but at least one of the data structures would have to expand, and there's no room where it currently is.

Lizardking

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: [SNES] [FF2us] Bunch of questions & ideas
« Reply #3 on: February 13, 2020, 08:21:34 pm »
Hi guys - thanks for getting back to me with feedback. I'll try to clarify where I was thinking on your responses.



Quite an intriguing question. The game treats the Crystal as a "Key Item" the same way it treats the Legend Sword. However it is unlikely it can be applied to anything outside the usable Battle Items because the game doesn't know what graphics and effects to draw for items that have been used in that way. Here's a test you can try... in FF4kster try to change the "Key Item" of Crystal in the "Features" tab to something else like... Cure1, and see if Cure1's are used up any more.


Yeah, I can confirm the negative on that - for using both the Legend Sword and the Crystal.



There is actually some custom code that prevents the Crystal's count from being decremented that specifically checks for the Crystal. I suppose there could be other checks that are linked to some property of the item, but not that I know of.


Presumably that check could be redirected to another item, though? My hope is/was to have each of the crystals (or at least the four elements and a darkness one) as sort of infinite-use items you can use for special effects, something like how the Runes work in 7th Saga.


The listing is purely superficial. Edge's Spellbook can contain whatever spells you want in them without there being any real issue, as far as I'm aware. Ah, unless you mean you want him to link into Rydia's Call magic...? I'm a little confused what you are looking to accomplish here, admittedly.


Essentially I'm hoping to have a universal white and black magic list that all the characters draw from (like in FFV) and then use the other lists for other abilities (like Songs, Blue Magic, that sort of thing) - what I'm wondering is if I can change it so Ninja magic is, say, Blue magic but references whatever Edge (or whoever ends up with the ability) is listed as his Call magic so the character can also have Black magic.



It's possible, sure. the best example to look at would be the Enterprise in the Underworld for the brief minute that it can't cross Lava, if you can figure that out you might be able to program the ship to act in that manner. As for disembarking... you might be able to use a normal event that occurs when you touch the water tile next to a dock or what have you.



At this time, I'm not yet sure if there's a bit that could be repurposed as a "ship allowed here" bit, or if you'd have to eliminate another vehicle or something. I think the ship still needs the board/disembark routines, but those aren't incredibly complicated.


Board/Disembark would probably be 90% of the battle. Once I can board the ship from the map I could test the rest. I remember reading in one of the notes the game has a spot in RAM for tracking what tile the player is one and all the adjacent ones, so I imagine it would be a matter of getting the game to check if those tiles are compliant (left is a water tile, can go. Right is a desert tile, disembark) and linking to something like the airship over lava mentioned.

Only problem is I have no idea where to even start. I haven't quite delved into ASM hacking much yet except for reading a little bit about it.



I'm not sure what you mean by data slots... care to elaborate? If you mean increase its size, that shouldn't be difficult. You can easily add one or two new areas to it by using Yousei's old editor and attaching the right trigger data to it.



If you mean the size of the map, the main problem is fitting into the space allowed in ROM. The outdoor maps are compressed, and there isn't loads of free space available. (The unused three quarters of the underworld map take up very little space due to the compression.)
If you meant number of maps, I don't recall how ingrained the 384 total map limit is in the code, but at least one of the data structures would have to expand, and there's no room where it currently is.



I mean the amount of space allowed for the main underworld map. It just feels like such a waste now that I know how much potentially larger it could be.

Anyway, thanks again for the feedback. I have a few other one other questions/ideas;

1) Removing Namingway and Big Chocobo's "portrait" from their prospective screens - This would free up eight sprites, which could be a decent boss or something? I would imagine this is probably a few bits...

2) When you're in the airship mode7 mode (or the Big whale) is it possible to have other sprites on the world map? Like to create/emulate the more 3Dish airship mode you see in FF4Advance?

3) Another neat thing would be to be able to go amidships on the airship like in FFVI - I'm guessing it shouldn't be THAT hard to link a teleport to a button? Or is it?

Thanks again,

Aexoden

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: [SNES] [FF2us] Bunch of questions & ideas
« Reply #4 on: February 14, 2020, 04:57:15 pm »
Presumably that check could be redirected to another item, though? My hope is/was to have each of the crystals (or at least the four elements and a darkness one) as sort of infinite-use items you can use for special effects, something like how the Runes work in 7th Saga.
A quick note, any memory addresses I give in my comments are the mapped addresses in memory, not the offset in the ROM image. It's a relatively simple conversion (if you don't mind a little math, or you can use something like Lunar Address), but I work exclusively with in-memory addresses unless I have no other choice.

You could easily change the item ID to something else. That's at $03:A69F. For doing multiple items, you'd probably want to inject a jump to a custom routine that does the check. The code at $03:A69B through $03:A6AA is responsible for the check.

Quote
Board/Disembark would probably be 90% of the battle. Once I can board the ship from the map I could test the rest. I remember reading in one of the notes the game has a spot in RAM for tracking what tile the player is one and all the adjacent ones, so I imagine it would be a matter of getting the game to check if those tiles are compliant (left is a water tile, can go. Right is a desert tile, disembark) and linking to something like the airship over lava mentioned.

Looking at it in more detail, the existing boarding routine may be sufficient. The bigger problem is that the vehicle change routine at $00:9C1D does not currently care about the ship at all. It would have to be expanded to call the ship boarding routine and a disembark routine would have to be created. Then, you'd probably want to create a new tile (some sort of dock tile I guess) that is both walkable and ship-accessible. After further examination of the tile property bits, it appears they all serve a purpose currently, so if you're not planning on eliminating a vehicle, a more complicated solution would be needed to allow that. The routine at $00:A966 is responsible for checking if a vehicle can move onto the specified tile. For vehicles it simply checks a designated bit in the tile properties, but I suppose it could be expanded somehow to check the ship manually. Obviously this is getting into more advanced ASM hacking. At some point in the not do distant future, I may put together a ship patch myself, but it'll be at least many months before that happens.

Quote
I mean the amount of space allowed for the main underworld map. It just feels like such a waste now that I know how much potentially larger it could be.
I mean, it could be made larger, but you'd almost certainly have to expand the ROM and write the extra ASM needed to relocate the underworld's data to another bank.

Quote
1) Removing Namingway and Big Chocobo's "portrait" from their prospective screens - This would free up eight sprites, which could be a decent boss or something? I would imagine this is probably a few bits...
For that amount of free space, it's pretty much already available in a few unused blocks. ROM expansion can solve most space issues with a little ASM work. The biggest restrictions you'll run into are index limitations. (Like how many things have an index limit of 0-255 and all entries are already used, for example.)

Quote
2) When you're in the airship mode7 mode (or the Big whale) is it possible to have other sprites on the world map? Like to create/emulate the more 3Dish airship mode you see in FF4Advance?
What kind of sprites were you looking at? You should be able to add more sprites, but you get the honor of calculating their correct position on your own. They also don't scale in size, so you have to have multiple versions of them for different zoom levels. (If you watch closely, the game is almost hilariously bad at this if you fly north past an airship on the ground. Its relative size changes a lot.) Maybe you meant to add something like a sky effect? I'm not sure how they technically did the one in FF6, but you're almost certainly going to have to get creative with your HDMA. I guess maybe you could just draw it manually with sprites instead if you got creative. I'm just spitballing at this point.

Quote
3) Another neat thing would be to be able to go amidships on the airship like in FFVI - I'm guessing it shouldn't be THAT hard to link a teleport to a button? Or is it?
Honestly probably wouldn't be that difficult, no. Or at least, there aren't any obvious barriers coming to mind.