Users browsing this thread: 1 Guest(s)
Patch: allowing use of "reserved" palette colors for player characters

#21
Posts: 2,769
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
I'm glad to hear such promising news and I must say I am very impressed with your knowledge and skill

and no my projects are known as Final Fantasy 6 The 2nd War Of The Magi, Final Fantasy 6 The Forgotten Warrior, and Final Fantasy 6 The New Resistance

since this isnt the post for me to talk about my threads I'll leave it at that, if you want to know about them feel free to send me a msg or add me on skype pocoloco211


"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC
Quote  

#22
Posts: 45
Threads: 4
Thanks Received: 7
Thanks Given: 1
Joined: Jul 2013
Reputation: 4
Status
None
So, I'm going to post a final version soon probably. Or a "final" version anyway. But I will only do an update if someone discovers a problem with it.

The two main things I'm still doing are 1. Trying to write a good readme, and 2. trying to work out compatibility with other patches.

There doesn't seem to be a fast/easy way of knowing which bytes are altered by the different patches. Is there a database of this I'm not aware of? For instance, I'm going to add the new code to an existing bank so the rom doesn't have to be expanded (I'll provide both a non-expanded and an expanded rom version of the patch, so people can choose either one).

There's a list of free space in a stickied thread in this forum. Plenty of those spaces are big enough to fit my code, but I'm not sure which ones have already been used by other popular patches, or patches that people might want to use at the same time as mine.

I'm also pasting a small amount of new code into C3, and so it would probably be good to check who else has used C3, and use a different part if I can.

If anyone can name any important conflicts I should worry about, I'll try to work around them.

I may just release a version of it where I do my best, and then if someone complains of a conflict, I'll release a new version that avoids it if possible.

Of course, it's also possible to move the code yourself, but you'd have to be comfortable running the assembler to get the binary, and then pasting it in with a hex editor. I'd like to make the patch as "accessible" as possible through an .ips patch.

EDIT: Probably not going to finish with it tonight as I thought, but tomorrow probably.
  Find
Quote  

#23
Posts: 2,769
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
awesome


"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC
Quote  

#24
Posts: 45
Threads: 4
Thanks Received: 7
Thanks Given: 1
Joined: Jul 2013
Reputation: 4
Status
None
http://bitshare.com/files/dv2hs1en/expan....0.7z.html

"Final" version. I'll wait a short while for feedback, and see if I need to do a revision.

It should be fully compatible with new expanded sprites, like the one Edrin showed off in his recent tutorial.

You can now clear the cache by pressing L+R+SELECT on the main menu. This will fix bugs that might occur if you alter your sprites, and the load a save game you saved before you altered your sprites. See the readme for more details.

By the way, I abandoned the idea of doing a version for a non-expanded ROM, for various reasons. There is info in the readme on how to relocate the code, and you could move it to a non-expanded region if you want to. But I'd prefer not to use up that space.

As requested by Edrin, I'm going to post the hex code for a version of the main function, altered for relocation to F4/E000. I'll also post the default version, for location F0/0000. If you compare these, you should be able to figure out which bytes are absolute-address pointers, and how you would need to offset them to move the function again. That is, if you would prefer to do it by hand.

There are instructions in the readme for assembling the included source code, in order to relocate it (or for any other reason). So, you can do that. But, I'm posting the two versions anyway, since that's easy for me to do.

Version for F0/0000:
Code:
C9FFD0016B8514861CAAA5104848DAA6
1C861AA51485130A186514AAA9C28516
8BA97F48ABBF45CEC28512C220BF43CE
C28510A945C78514A61AA90001851AA9
10008518A714C9FFFFD00C7B9D0000E8
E8C618D0F7800EA8B7109D0000E8E8C8
C8C618D0F3E614E614C61AD0D27BE220
A61CA9408512BDC0030A66100A66100A
66100A66100A66100A66100A66100A66
10A5109DC003BDC0100A66100A66100A
66100A66100A66100A66100A66100A66
10A5109DC010E8C612D0BBABFA680A0A
0A0A0A08C23048DA5AA90000E230AF8E
7E30D006A9FF8F8E7E30A513C230C917
00100F0AAA48BF007E30F03F851AFA4C
0502E220A20000A88AC91FF01098DF2E
7E30F019BF2E7E30F003E880EB989F2E
7E30C2208A0A18694E0048800EC2208A
0AAABF4E7E30851A4C0502A9C300851A
A21E00E22064196418C220A51C186900
208510A97F008512C220A510290F00D0
08A51038E910008510C610C610A00000
E220A9028514A9FF85158A2514F004A9
008002A9FF571025158515F0110614C8
98C912F009C902D0E1A0100080DCE220
A515F016C220A51A1F7404F0851A8AC9
1800300EE220E6198008C220A510C51C
D096C2208AC91800100CA51A3F7404F0
D004E220E618C220CACA8AC90000F02C
A51A3F7404F0D0EE8AC918001019E220
A518C519D011C220A51A1F7404F0851A
CACA8A10F18005C2204C3901C220A51A
FA9F007E30E220A90085138514851585
16C220A20000A51A3F7404F0F00BE8E8
8AC91800D0F04CAE029BA21800A51A3F
7404F0D00BE8E88AC92000D0F04CAE02
E230A513D0118A4A0A0A0A0A8513984A
051385134C9602A514D0118A4A0A0A0A
0A8514984A051485144C9602A515D011
8A4A0A0A0A0A8515984A051585154C96
02A516D0298A4A0A0A0A0A8516984A05
1685164C9602C230DABBBF7404F0451A
851AFABF7404F0451A851A4C1302E230
A513D0034C5D03C230A51C1869002085
10E230A97F8512C230C230A510290F00
D008A51038E910008510C610C610E230
A200A011A9FF8518A9808519BF130000
D0034C52032519F004A9008002A9FF57
102518F044851898C900F00EC910D004
A00180018846194CEC02A000A9018519
BF1300002519F008B710051897108008
A9FF451837109710C898C912F00BC902
D002A01006194C2003E88AC904F0034C
E202C230A510C51CF0034CC902C2307A
FA6828DAAABDAE2EC90ED012BDC62EC9
01D00BADA01E2908F004FA7B8005FABF
2BCEC2C2200A0A0A0A0AAA7BE220680A
0A0A0A0AA85AA9188510BF0063ED99AD
81E8C8C610D0F308C23048DA5A8A38E9
1800851A9838E91800851CA51329FF00
4A4A4A4A0A18651AAAA513290F000A18
651CA8E220BF0063ED99AD81E8C8BF00
63ED99AD81C220A51429FF004A4A4A4A
0A18651AAAA514290F000A18651CA8E2
20BF0063ED99AD81E8C8BF0063ED99AD
81C220A51529FF004A4A4A4A0A18651A
AAA515290F000A18651CA8E220BF0063
ED99AD81E8C8BF0063ED99AD81C220A5
1629FF004A4A4A4A0A18651AAAA51629
0F000A18651CA8E220BF0063ED99AD81
E8C8BF0063ED99AD81C2207AFA6828FA
FEC4616B010002000400080010002000
40008000000100020004000800100020
00400080

Version for F4/E000:
Code:
C9FFD0016B8514861CAAA5104848DAA6
1C861AA51485130A186514AAA9C28516
8BA97F48ABBF45CEC28512C220BF43CE
C28510A945C78514A61AA90001851AA9
10008518A714C9FFFFD00C7B9D0000E8
E8C618D0F7800EA8B7109D0000E8E8C8
C8C618D0F3E614E614C61AD0D27BE220
A61CA9408512BDC0030A66100A66100A
66100A66100A66100A66100A66100A66
10A5109DC003BDC0100A66100A66100A
66100A66100A66100A66100A66100A66
10A5109DC010E8C612D0BBABFA680A0A
0A0A0A08C23048DA5AA90000E230AF8E
7E30D006A9FF8F8E7E30A513C230C917
00100F0AAA48BF007E30F03F851AFA4C
05E2E220A20000A88AC91FF01098DF2E
7E30F019BF2E7E30F003E880EB989F2E
7E30C2208A0A18694E0048800EC2208A
0AAABF4E7E30851A4C05E2A9C300851A
A21E00E22064196418C220A51C186900
208510A97F008512C220A510290F00D0
08A51038E910008510C610C610A00000
E220A9028514A9FF85158A2514F004A9
008002A9FF571025158515F0110614C8
98C912F009C902D0E1A0100080DCE220
A515F016C220A51A1F74E4F4851A8AC9
1800300EE220E6198008C220A510C51C
D096C2208AC91800100CA51A3F74E4F4
D004E220E618C220CACA8AC90000F02C
A51A3F74E4F4D0EE8AC918001019E220
A518C519D011C220A51A1F74E4F4851A
CACA8A10F18005C2204C39E1C220A51A
FA9F007E30E220A90085138514851585
16C220A20000A51A3F74E4F4F00BE8E8
8AC91800D0F04CAEE29BA21800A51A3F
74E4F4D00BE8E88AC92000D0F04CAEE2
E230A513D0118A4A0A0A0A0A8513984A
051385134C96E2A514D0118A4A0A0A0A
0A8514984A051485144C96E2A515D011
8A4A0A0A0A0A8515984A051585154C96
E2A516D0298A4A0A0A0A0A8516984A05
1685164C96E2C230DABBBF74E4F4451A
851AFABF74E4F4451A851A4C13E2E230
A513D0034C5DE3C230A51C1869002085
10E230A97F8512C230C230A510290F00
D008A51038E910008510C610C610E230
A200A011A9FF8518A9808519BF130000
D0034C52E32519F004A9008002A9FF57
102518F044851898C900F00EC910D004
A00180018846194CECE2A000A9018519
BF1300002519F008B710051897108008
A9FF451837109710C898C912F00BC902
D002A01006194C20E3E88AC904F0034C
E2E2C230A510C51CF0034CC9E2C2307A
FA6828DAAABDAE2EC90ED012BDC62EC9
01D00BADA01E2908F004FA7B8005FABF
2BCEC2C2200A0A0A0A0AAA7BE220680A
0A0A0A0AA85AA9188510BF0063ED99AD
81E8C8C610D0F308C23048DA5A8A38E9
1800851A9838E91800851CA51329FF00
4A4A4A4A0A18651AAAA513290F000A18
651CA8E220BF0063ED99AD81E8C8BF00
63ED99AD81C220A51429FF004A4A4A4A
0A18651AAAA514290F000A18651CA8E2
20BF0063ED99AD81E8C8BF0063ED99AD
81C220A51529FF004A4A4A4A0A18651A
AAA515290F000A18651CA8E220BF0063
ED99AD81E8C8BF0063ED99AD81C220A5
1629FF004A4A4A4A0A18651AAAA51629
0F000A18651CA8E220BF0063ED99AD81
E8C8BF0063ED99AD81C2207AFA6828FA
FEC4616B010002000400080010002000
40008000000100020004000800100020
00400080

Do I need to ask permission to post this to the "IPS patches" forum? And does anyone have a suggestion for a better place to upload the zip file? Or another site to submit the patch to. I know about romhacking.net.
  Find
Quote  

#25
Posts: 763
Threads: 83
Thanks Received: 55
Thanks Given: 7
Joined: Apr 2015
Reputation: 22
Status
Obliviscence
Working brilliantly and officially inserted into my hack. This is a big deal. Well done.
  Find
Quote  

#26
Posts: 2,769
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
I'm gonna suggest this for the improvement patch


"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC
Quote  

#27
Posts: 3,970
Threads: 279
Thanks Received: 236
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
(08-17-2013, 09:45 PM)Eggers Wrote: Do I need to ask permission to post this to the "IPS patches" forum? And does anyone have a suggestion for a better place to upload the zip file? Or another site to submit the patch to. I know about romhacking.net.

You don't need permission to post a patch in the IPS Patches forum. Once you made your thread, I'll transfer the zip file on the servers that way there is no chance the link will someday broke. And yes, romhacking.net is a good idea also.
  Find
Quote  

#28
Posts: 45
Threads: 4
Thanks Received: 7
Thanks Given: 1
Joined: Jul 2013
Reputation: 4
Status
None
I'll probably do a slight revision. I noticed a tiny flaw: namely that the extra palette colors look bad on the load game screen when they are "gray'd out" because the file is not selected.

Also, I may change the structure of the .asm and the instructions associated with it, so it gets made into multiple files for multiple blocks of code, so it's easier to find the right code if you assemble it to patch manually.

Other than that I don't anticipate many changes. I'll be looking forward to seeing what people do with this. I'll probably do something with it myself, but there are other asm hacks I want to do first, in order to do the project I want.
  Find
Quote  

#29
Posts: 45
Threads: 4
Thanks Received: 7
Thanks Given: 1
Joined: Jul 2013
Reputation: 4
Status
None
So, an update.

I am working on a new version of the patch that will fix some nitpickey but surprisingly difficult bugs, having to do with the appearance of characters on the save and load game screen, shop screen, and party-change screen.

While doing that, I have also been automating my process of creating and applying modifications. In the next distribution, I'll include the ASM files along with a .bat file that will 1. not only assemble the code for you (once you've downloaded the assembler for free), but also 2. create an IPS patch for you based on the new version of the code.

This will allow you to modify the code in any way, including but not limited to relocating it to your chosen location. The custom-created IPS patch will automatically update all the pointers: both the ones within the code, and the ones that point into the new code from the old functions. This will make the patch very easy to use for people who want to relocate it because they are using it along with other patches. You will not have to know very much about hexes, and you won't really have to know anything about ASM. Just enter the desired ROM locations when prompted by the script.

I did this to make things easier for myself. I'm modifying the game a lot, and I'm ending up making tons of tiny little changes to little pointers here and there. Having an automated process helps me, and ensures I don't make some dumb copy-and-paste mistake that breaks the ROM (this recently happened to me). As a side-effect of creating this for myself, I can also give it to people who download my patch.

The save/shop menu stuff is 90% done, and the custom IPS patch thing is 100% done. I'm using it myself.

So why don't I just release the final patch? I may do that. But I'm thinking of making some more ambitious changes first.

While in the process of ironing out these little bugs, I got a PM from Gi Nattak. He asked me about an issue where characters using palette 6 don't display correctly in the save window, party-select window, and so on.

By amazing coincidence (as I told him), I knew exactly what the issue was, because I had just been ironing out bugs with palettes and sprites in that very same section of code.

And, as I told him, making palette 6 display correctly is probably possible to do with some minor drawbacks. And I know how to do it.

I hadn't thought about allowing an extra palette for PCs, because I assumed it would be impossible. But, looking into it, it might be less problematic than I thought. Although it would have limitations.

Here are the issues:

In battle:

There is no problem with using extra palettes for battle. Each of the four characters who appear in battle has his own palette anyway, even if they "share" a palette. The palette is duplicated in palette memory. This is so the game can apply status effects. For instance, if both Edgar and Sabin appear in battle, the game has to modify Edgar's palette to show that he has haste, or poison, or whatever. You don't want to modify Sabin's at the same time. So, each has his own copy. You could give every character a unique palette and it would cause no problems in battle. On the world map is a different story.

Out of battle / world map / towns:

Now, there are a total of 8 palettes stored in palette memory at once. Each sprite must have one of these, and it can only have colors from its own assigned palette.

In towns and dungeons, 6 of the 8 palettes always loaded are those used by PCs and also most NPCs. All of them are loaded at all times.

Palette #6 is a "placeholder" palette. Its selection of colors changes based on the need. In most maps it is not used. The main things it is used for, I think, are: cranes in a couple maps, and a treasure chest in one map. This is partly based on what Gi Nattak told me.

Gi Nattak is trying to use this as a standard palette for PCs in his hack. He's told me he hasn't totally been able to eliminate the problem of this palette being modified. Whenever it's modified, in order to be used by a sprite that has special color needs, the PC will look wrong.

I think this palette is also used for special effects in a few other cases. It might be used for the fire encounter sprites you run into in the burning house in Thamsa, though I'm not sure about that. Maybe also for the tentacle things in Figaro in WoR. Maybe for random lightning bolts and things like that.

Anyway, ways I can think of to solve this:

1. eliminate everything that uses/modifies palette #6. This would be hard to do without significantly modifying the game's events.

2. Make a custom palette that happens to have a selection of colors that can do a decent representation of the cranes and chests and fire and so on. But can simultaneously be used for a PC. Some modification of the sprites would be required. They wouldn't look exactly the same, but they could probably look "OK". The PC would have to use the same selection of colors. They would have to be grays, browns, and reds, and so on.

3. Similar to #2, you could modify all the sprites that currently use palette #6 to use a variety of standard palettes. All of them don't necessarily have to use #6. For instance, you could make the flames use Kefka's & Strago's & Relm's palette, which includes reds and oranges. They might not look exactly the same, but they might look good enough. And, again, you probably wouldn't be able to just switch the palette, because it would probably not use the right palette indices, and would initially appear green and white, or something. You would have to edit the sprite, keeping it the same shape, but changing the color indices.

OK, now. There's also a palette #7. Which actually seems like a more promising choice to me, for an additional palette to enable for PCs.

Palette #7 is always loaded and never changed, I think. It is used only for magitek armor and chocobos, I think.

It is filled with a lot of yellows, browns and grays. Currently, it is not set up well for PCs. For instance, the colors that are hard-coded to be "skin color" are yellow-orange, and don't look good as skin.

But, this could look pretty good on a PC/NPC if you swapped the colors around. You could give characters a brownish skin color (which no human characters in the game have currently) and they would have brown, yellow and gray colors to choose from for hair and clothes.

You would also have to alter the chocobo and magitek sprites, switching around their colors so they look the same as they used to, even though their palette indices have been juggled. After that, there would be no visible difference in-game.

You would not be able to alter the selection of colors in the palette, unless you're OK with also altering the appearance of chocobos and mtek.

I think I should be able to enable one or both of these palettes for PCs.

Making palettes 6 and 7 look right on the save/load screen, shop screen, and party select screens might require some work-arounds or trade-offs. But should be doable.

A few things that might be required:

1. Remove the character face portraits that are shown when you select a character in the party-change screen.

2. Eliminate the brown/sepia color that characters appear in when you're loading or saving a game, when they're in the save file not currently selected.

3. Make the cursor on these screens into a simpler, two-color cursor, rather than the hand cursor. This allows it to easily share a palette with a PC without demanding the PC "loan" any colors.

4. Disable expanded colors (13-16) for PCs who use palettes 6 or 7.

5. In the worst case, we could always just make all characters appear sepia or grayscale on those screens.

By choosing a couple of those drawbacks (not all of them -- just a subset) I can allow PCs to use palette 6 AND/OR palette 7, and have them appear right on all screens, including the maps, battle, and other screens.

So, that's the exciting thing I may include with the next version of the patch. Depending on how long it takes, I may release a version with bugfixes but without the extra palettes enabled. Or, the next version may have the extra palettes enabled.

A note: If I enable palette #6, I'm not going to do all the work of making it always look right. That will require changing a lot of scripts and sprites. I'll make the game's code handle it, but if you want to actually make it work, you will have to do all those alterations yourself.
  Find
Quote  
[-] The following 1 user says Thank You to Eggers for this post:
  • SSJ Rick (08-22-2013)

#30
Posts: 2,769
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
thats quite an update Eggers lol

I'll tell you now, the whole pal 6 thing was originally my idea, I came up with it due to the former limitations that you just owned (thanks again btw lol)

but for Nattak's hack the fire NPC uses pal 5 (I altered it), as for the cranes I think they use another pal

what I did for Nattak and what I would suggest is since esper terra uses both pal 6 and pal 8, her over world pal is 8 (which can only be loaded via special events), and battle pal 6, we changed it to 7 because the magitek and chocobo sprite pals in battle use a palette from a completely different bank

so by giving esper terra pals 7 and 8 instead of 6 and 8, we have pal 6, since we found out that anyone using that pal can get glitched in certain events if we arent careful (the whole placeholder thing), so thats why the fire sprite uses pal 5 now

I think the cranes use pal 18 or something but I dont remember


"Sometimes ninjas do wrong to each other, and in dat way the force of tha earf' comes around da moon - and at that presence, da dirt, it overshadows the grass, so you're like, I can't cut dis grass, there's no sun comin' through. So in order to enable each other the two fruits have to look each other in da eye and understand we can only be right, as da ripe is wrong, you know what I mean?"

-HNIC
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite