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

Author Topic: Want to start a Pony FF1 romhack, but I need palette help  (Read 3283 times)

Toastypk

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Want to start a Pony FF1 romhack, but I need palette help
« on: March 25, 2018, 07:58:28 pm »
Hey everyone. I've used this site for years, but never posted on the board.
My level of rom hacking skill is pretty decent. I can poke around with hex, edit graphics, and I've made Mario World music for SMWCentral.

I come here asking for a help with a rom hack I wish to start. I wanted to start this years ago, but I ran into a snag with something that got me to have to put this off.

Years ago I had a great idea for a Pony rom hack of Final Fantasy 1. I was inspired by the popular Final Fantasy 6 Pony hack, and Final Fantasy 1 would be less complex, plus, it works out. There are six main characters, and six classes! There is a student of Celestia who turns to darkness who would be a good stand in for Garland. I had all these ideas, and I was going to start.

But I had a big issue that I couldn't seem to work around.
Freaking palettes.



In the big Final Fantasy editor, you can choose from 4 palettes for characters.
Two are used for characters.
A third one changes depending on what attack is being used.

A fourth is for the cursor and when a character is petrified. (so gray.)


The main characters are quite the colorful cast, which is a problem.
What I decided would be this:
Palette 1 could be Orange, Pink, and Yellow for Applejack, Pinkie, and Fluttershy. (First, fifth, and sixth in this image)
Palette 2 could be White, Purple, and Blue for Twilight, Rainbow Dash, and Rarity. (second, third, and fourth in this image)
This would be a good approximation of how to get the most colors in.
But that left me with a big problem.

There is only one Pink, and Pinkie is two shades. She would look like this.

This is why I had to pause the hack. I don't believe I can get around this.
Is there a way to dedicate a palette to Pinkie alone? Some way to trick palette usage for the NES to give her her own? Is there some other idea for this? Or is this pretty much not going to work?
If not, I've been considering trying the GBA version for more room and such, but I don't believe that game has been thoroughly looked at yet...

Disch

  • Hero Member
  • *****
  • Posts: 2611
  • NES Junkie
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #1 on: March 26, 2018, 12:51:06 am »
Depending on how much work you want to do, you can theoretically have any number of palettes for sprites.  However, only 4 can be "visible" in any given frame*.  This is a hard limitation on the NES, and there's no way around it.

But... you can ask yourself, WHICH four do you want to be visible?  What things are going to need to be on the screen at any given time?

Let's say you want the below palettes for your characters:
- Orange/Pink/Yellow (for Applejack, others)
- White/Purple/Blue (for Twilight, others)
- Pink/Dark Pink (for Pinkie)

Are you allowing the user to select their party?  If yes, the user may select Applejack, Twilight, AND Pinkie in the same party, so all 3 of those palettes need to be used at the same time.  Which leaves you only 1 palette left.

Now... the cursor and magic never appear on-screen at the same time.  So you could have both of those things share the remaining palette, which would give you all the space you need.  HOWEVER, stoned characters may be on-screen at the same time as magic is being cast.  BUT, if you got rid of stone as an ailment, then that's not an issue.  Since it's basically the same thing as death in that game anyway, it wouldn't be the biggest loss.

OR... maybe you can have the cursor and Pinkie share a palette?  If you reduce the cursor so it's only two colors, you can have a palette that's Pink/Dark Pink/Gray/Black.  Gray/Black can be your cursor, and Pink/Dark Pink/Black can be Pinkie.  Of course this means stone would no longer be [just] a palette swap, and you'd probably have to create a separate graphic (and swap it in) when a character is stone.  And that's not exactly trivial.



TL;DR:  Yes there are things you can do.  But there are tradeoffs, you have to be creative, and some of them might be a lot of work to implement.





*(technically you can split the screen to get more palettes, but that is not really applicable here.  I only mention it to avoid being corrected on a technicality.  If you really want to know more about this I can explain, but it's quite complicated and I really don't think it will help)
« Last Edit: March 26, 2018, 01:00:56 am by Disch »

Toastypk

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #2 on: March 26, 2018, 04:17:16 am »
I thought it was 8 palettes at once maximum? ...I think. Cause aside from the four main ones, there's enemy palettes and the background palette that have to be used too, so I thought I could use something like that with some palette out of left field or something that wasn't being used.
I did consider having Pinkie share the palette with the cursor, but I believe like you said since it's gray and uses the stone palette, stone would be pink too... The other, less appealing option would be to say f it and make her body or hair orange or yellow and just find a combination that looks alright.
FYI I've put Pinkie as the Red Mage, because in the show she's that particular breed of wacky that follows cartoon physics and exhibits unexplained oddities like her weird sixth "Pinkie sense", and so someone who doesn't use magic it can be brushed off with a "oh it's just Pinkie being Pinkie" explanation for why she can cast.

I did have other questions about FF hacking, and I've played around a lot with your editor. I like the Final Fantasy Restored hack, in particular the aspect where it added more space for enemy and spell names and more text, which I'd love to use. But when I tried to edit the map data (like trying to put two thrones in the throne room, since there are two rulers of the world, or add a bonus room in the unused space in the last floor of the temple of chaos) the other graphics would sometimes get garbled.

This happened.

I can save those and any other things I can't figure out for when I make a personal projects thread for this though.

And PS: Petrification actually has happened in the show! By a cockatrice no less. So I probably should keep it.

Disch

  • Hero Member
  • *****
  • Posts: 2611
  • NES Junkie
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #3 on: March 26, 2018, 10:46:02 am »
I thought it was 8 palettes at once maximum? ...I think. Cause aside from the four main ones, there's enemy palettes and the background palette that have to be used too, so I thought I could use something like that with some palette out of left field or something that wasn't being used.

Aha!  Yes you're right.  Good job thinking outside the box!

Although the 8 palettes are specifically limited to 4 for sprites, and 4 for BG.  Which means to use the other palettes, you'd have to change how something is drawn from being drawn by sprite to being drawn on the BG.  And that's probably the most difficult of the options presented thus far.

- You wouldn't really be able to move the cursor, because it needs to be drawn on top of enemies when you target them.
- You MIGHT be able to move the magic effects, but the weapon swings might end up looking wonky because I don't think the "above the head" frame of the weapon swing animation falls cleanly on a tile boundary.  Also the weapon swing relies on horizontal flipping, which you can't do on the background.
- You MIGHT be able to move one of the characters... but that would be INSANELY difficult because you'd have to have special cases thrown in all over the place in the rendering code.

Quote
FYI I've put Pinkie as the Red Mage [snip]

That's fine.  You don't have to go into detail for me.  I know absolutely nothing about MLP.  I just like the technical romhacking shit.   :thumbsup:

Quote
I did have other questions about FF hacking, and I've played around a lot with your editor. I like the Final Fantasy Restored hack, in particular the aspect where it added more space for enemy and spell names and more text, which I'd love to use. But when I tried to edit the map data (like trying to put two thrones in the throne room, since there are two rulers of the world, or add a bonus room in the unused space in the last floor of the temple of chaos) the other graphics would sometimes get garbled.

What's probably happening is that FF Restored puts some extra graphics in unused space after the map data.  Then Hackster is coming in, thinks that space is unused, and clobbers it when writing map data.

Hackster has a 'KAB' (Known Available Bytes) value.  This changes as you use more/less space with the maps (depending on how small they can be compressed).  More complex maps use more space, etc.  If you can edit the maps without using more bytes (KAB value doesn't change or increases), it *might* not clobber the graphics.  Or if it still does, you could copy/paste the graphics from a clean FFRestored ROM to restore them -- as long as you're not using too much KAB.

Reducing KAB usage kind of relies on you knowing a bit about how the compression works.  Basically:  horizontal runs of the same tile compress well, and anything else doesn't.

An easy way to free up KAB in the original ROM is to change the path to Bahamut's room and/or the Sky Bridge (WarMech area) from a long vertical corridor to a long horizontal corridor.  That will free up a good chunk of space.

Toastypk

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #4 on: March 28, 2018, 02:11:15 am »
Ok, so I'm getting the feeling that if I edit the map data first and then apply the FF restored hack, I will "lock in" the map data, does this sound about right? Then I don't have to be concerned about any graphics data getting garbled.

Disch

  • Hero Member
  • *****
  • Posts: 2611
  • NES Junkie
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #5 on: March 29, 2018, 12:21:58 am »
That's the general idea... but you're simplifying it a bit  :P.  But yeah, basically.

At long as your map data isn't too big... that's the important part.

Also... you used the word "apply".  Note that you probably can't apply the FF Restored patch to your hack, because if that makes any map changes at all, it will completely clobber your map changes.  So you'll probably have to apply the FF Restored patch to a CLEAN rom, then go in with a hex editor or tile editor and copy/paste the graphic data you want back over to your rom.

If FF Restored doesn't changes the maps, then applying the patch directly might work.



It's a pain in the ass, I know.  In general, FFHackster does not play nice with external changes.

Toastypk

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #6 on: March 29, 2018, 10:20:18 pm »
I just made that long vertical Bahamut room a shorter horizontal one, and I got almost 200 KAB from it.

Is that enough to not interfere with anything FFRestored does? Or is it more than just free KAB?
(Primarily, what I like about it is I like the space for more names and the extra battle music used in subsequent FF1 remakes, though I know that the ship minigame data gets used for that, that's fine.

Disch

  • Hero Member
  • *****
  • Posts: 2611
  • NES Junkie
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #7 on: March 30, 2018, 03:51:53 pm »
Is that enough to not interfere with anything FFRestored does? Or is it more than just free KAB?

I honestly have no idea.  I've never once looked at FFRestored.  I'm mostly making educated guesses based on what you told me about the problem. ;D

One way to check:

1)  Make your map changes to a fresh ROM.  Make a patch of that (so the patch has ONLY the map changes)
2)  Get a fresh ROM.  Apply FFRestored to it first,  Then apply your map changes
3)  Open the new ROM in Hackster to make sure the maps are all OK (they should be fine... but double check)
4)  Open the ROM in an emu to make sure the graphics are OK


A big problem with Hackster is that it expects to be modifying a ROM, rather than just keeping track of individual changes.  I've been wanting to make a new editor for this forever which fixes all these problems, but I just don't have the time or energy these days.

Toastypk

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #8 on: April 01, 2018, 04:55:00 am »
Oh there's another idea I had years ago but it's just a theory, I'm wondering if this is feasible.

You know how there's that treasure chest that only gives 10 gold? Pff. I thought about removing that, and then getting to add in an extra weapon in its place. It seems that in theory you could do that. get rid of the 10 gold, and use the space to put in a new weapon. Some hex would need to get jumbled a little, but it just seems like it could happen based on what I could theorize from the editor.

Could that work?

Disch

  • Hero Member
  • *****
  • Posts: 2611
  • NES Junkie
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #9 on: April 01, 2018, 11:53:44 am »
Yeah chest contents are editable directly from FFHackster.  In the map editor, click on the tile and there's a drop-list that has the treasure contents -- just change it to be whatever you want.

Toastypk

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #10 on: April 02, 2018, 01:46:18 am »
Oh, actually I mean, removing the 10G entry from the rom and using that space to add a new weapon.
Like this.

It seems like you would have to move some hex around but it might be something one could do.
It's just an idea though.

Disch

  • Hero Member
  • *****
  • Posts: 2611
  • NES Junkie
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #11 on: April 02, 2018, 03:12:43 am »
Ah.  Okay this question makes much more sense.

This is technically possible, of course.  Making this change isn't particularly hard... but the problem is there is no space for any additional weapon stats.  So unless you shuffle some data around (read:  quite difficult) any new weapon you add is going to have stats that overlap other [armor] data and thus it will be garbage.


So... reasonably... no.  This is more work than it's worth.  If you REALLY want details I can go into it, but believe me when I say it's pretty difficult.

Toastypk

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #12 on: April 05, 2018, 04:46:10 am »
Hey more theories and questions.

1. There is a Special command in the tile editor called Move-Need 4 Orbs.
As far as I'm aware... this isn't used. The only thing that the four orbs affect, I believe, is opening the way to the Temple  of Fiends, and that's an NPC, the orb, that does that. Is this right?

2. I like the idea of using useless or underutilized things for something else, like for my hack, I can take the four element icons from the temple of fiends and make some new decor or something out of them. The same idea goes for text boxes. I never knew about the four text boxes that say "The Alter of the X", when you look at one of those. I could use that text box for something new, adding a new NPC to say something. And there's spaces in the NPC list that are Unknown, so they must not be used. How would I tell a specific NPC to say a specific thing? It's not in the editor and so is likely complex, but I would suspect finding whatever hex it corresponds to and what text box it says shouldn't be difficult. Like, say King of Corneria is 01, and his text box is 01, but when you beat Garland his text box is 02 or something.

Disch

  • Hero Member
  • *****
  • Posts: 2611
  • NES Junkie
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #13 on: April 05, 2018, 12:08:21 pm »
1.
Yes I think you're right but I can't double-check.  They probably intended to use that "need 4 orbs" tile but never actually did.


2.
I think there was a "Hackster Companion" utility made that edited which NPCs had which dialogue logic and which strings they used.  If not, that information is definitely editable via a hex editor.

The object talk data starts at offset 0x395E5, and the format is as described in the disassembly:

Quote
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;  LUT for Map Object Talk Data  [$95D5 :: 0x395E5]
;;
;;    Each object has 4 bytes of data which is used with the various talk routines
;;  to determine which text to draw when you talk to this object (and possibly other
;;  things).  See TalkRoutines for more details.
;;
;;    There are $D0 objects, each having 4 bytes of data in this table.  Therefore
;;  this table is $340 bytes large.

The four bytes of data are further elaborated upon here:

Quote
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;  TalkRoutines  [$9296 :: 0x392A6]
;;
;;    One of these routines is called each time you talk to a map object.
;;  It determines the action performed by the object (if any) and the text that is
;;  to appear in dialogue on-screen.
;;
;;    Routines are not JSR'd to directly.  They are all accessed via a jump table
;;  See lut_MapObjTalkJumpTbl above.
;;
;;    Before jumping to these routines, the game fills the first 4 bytes of temp
;;  RAM (tmp through tmp+3) with the data for the object being talked to.  See
;;  lut_MapObjTalkData for this data.
;;
;;    Not all of these bytes go used -- sometimes only one is used, but at least one is used
;;  always (except for dummy routines that are never called).  To save space/time, these values
;;  will be referred to by index in brakets in the routines below.  IE:  [0] for the first
;;  byte of data, [1] for the next, then [2], [3].
;;
;;    Most of the time (but not always), [1], [2], and [3] are only used for a dialogue
;;  string ID.  Sometimes, though, they might be used for an object ID as part of a condition
;;  check.  [0] is used for the more dynamic routines that are used for several different
;;  but similar objects... and is always used for a condition check.  Several other of these
;;  routines are (needlessly) hardcoded to be for a specific object.
;;
;;    Some objects hide themselves after you talk to them (like Garland, the fiend orbs, etc,
;;  anything you fight).  This is usually accomplished by loading the object ID into Y and
;;  calling HideThisMapObject, instead of calling the more general HideMapObject routine.
;;  See HideThisMapObject for details on the differences between the two.
;;
;;  IN:   tmp - tmp+3 = map object's data
;;                  X = runtime map object list index (to index 'mapobj') -- only used
;;                        for HideThisMapObject.
;;             dlgsfx = assumed to be zero
;;
;;  OUT:            A = dialogue ID of text to print
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Toastypk

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #14 on: April 22, 2018, 03:05:46 am »
Hey, it's me again. Things are going pretty fine with my hack. I'm doing all the little map changes I can before applying the FFR patch,
And sometimes I put the FFR patch on to see if things get garbled, and they don't!
Except there's one issue.
It turns out that whatever I do to the Temple of Fiends revisited gets undone. (and it undid some new chests I put in!)

I added some new treasure chests in the last dungeon, turned the weakest equipment into best equipment for specific characters, inspired by the show. (For instance, the show has the ancient Netitus shield, which is fireproof... tell me that isn't FF-esque!)

Additionally, the final floor. The tiles at the top are going to be substituted later for a cool mural, cause there's a location in the show that's very much fitting for this floor, called the Well of Shade, which uses that mural.  The purple slab is going to be a specific thing too, sprites to come later.

But when I apply the FFRestored Patch, all of that comes undone.
It's getting pretty complicated to ask this now, but is there a way to look around the patch and tell it to NOT do certain
things? I know you probably don't know that patch as well as others, but I dunno if I'm going to get my Well of Shade or new chests anymore.

Disch

  • Hero Member
  • *****
  • Posts: 2611
  • NES Junkie
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #15 on: April 22, 2018, 11:23:50 am »
I vaguely remember an IPS patcher that showed you all the individual "blocks" that the patch changes, and would allow you to individually select/deselect which ones you wanted to apply.  But for the life of me I can't remember the name of it.

You could find that, or you could read up on the IPS file format and look at the patch directly in a hex editor and delete the blocks you don't want.

OR you could a hex editor to copy/paste your map data from a non-FFR ROM to a patched FFR ROM with to undo the changes the FFR patch makes to the maps.



Standard map data is placed between offsets $10010 and $1ACAF in the original ROM (though your map data might be a little shorter or longer depending on how it is compressed, and FFR probably sticks some non-map stuff after it in that bank).

Overworld map data is between $04010 and ~$07F50 (but again, YMMV depending on how well it compresses)

Toastypk

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #16 on: April 22, 2018, 04:25:53 pm »
The main thing I really want from FF Restored is the longer text space and longer names for things. If there's a way to do that without needing FFR, that could be something.
When you have a villain named Sunset Shimmer, it's better to put that as an enemy name instead of SShimmer or something.
The patch has the FF1 boss music from subsequent remakes too, I like that.

Are there documents or ways people would know how just to insert those particular elements? It might be easier than having to rework the patch. I could have sworn I read something once about how to get certain things in.
« Last Edit: April 22, 2018, 04:33:38 pm by Toastypk »

Disch

  • Hero Member
  • *****
  • Posts: 2611
  • NES Junkie
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #17 on: April 22, 2018, 06:17:48 pm »
If you just want individual changes, perhaps this thread will be useful?

https://gamefaqs.gamespot.com/boards/522595-final-fantasy/45575058

Toastypk

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #18 on: April 22, 2018, 11:39:55 pm »
Wow, that's extraordinarily spiffy! I'll be sure to have a look.

April 24, 2018, 11:44:37 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
I'm really loving that gamefaqs page! But when it comes to the text expanding patch, It's just getting a little tedious to putlong  things in the hex editor, and I'm sure I've made a mistake.
I would love to get that text in a ips so I can just use IPSWin on it. But the question is, how do you make a patch? It can't be that hard...
« Last Edit: April 24, 2018, 11:44:37 pm by Toastypk »

Disch

  • Hero Member
  • *****
  • Posts: 2611
  • NES Junkie
    • View Profile
Re: Want to start a Pony FF1 romhack, but I need palette help
« Reply #19 on: April 25, 2018, 11:00:12 am »
Dunno of a way to add those easily other than tedious copy/pasting into a hex editor.  Your hex editor SHOULD allow you to copy/paste directly into it so you don't have to manually type.  If it doesn't, I recommend getting a better hex editor (I recommend HxD, which is hands down the best free hex editor I've ever used -- too bad it doesn't support table files)


If you know Python, you could probably write a script to create an IPS patch out of that data... but I'm too lazy to do it myself.

But that's about all the tricks I can think of.