Users browsing this thread: 1 Guest(s)
Entrance Events and Palette #6

#1
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 158
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
The crane in Zozo, the painting in Owzer's Basement, the rocks that cover up the sealed gate, the elevator in the Magitek Factory...
These are ALL actual NPCs, and they ALL use palette #6.

You may look at them in the LE (the level editor) and see them looking like a rainbow in color, and wonder what exactly's going on there, because they sure as hell don't look like that in-game!?! Hopefully this small tutorial will help you get a better understanding of it all, as well as get you more comfortable with how to go about editing and creating entrance events, and most importantly searching for and finding the addresses.

---

As we know, NPCs in LE only go up to palette 7, and when assigning a character a palette through an event, after palette 7 it simply resets and goes back to 0-7. That sucks.

You CAN however assign a palette outside of 0-7 to an NPC or object at least, through what's called an 'Entrance Event'. This is not groundbreaking information by any means, I'm just explaining it for those of you who don't yet know, which I'd guess is quite a few.

Here, let's take a look at an example first of an entrance event in LE.
So open up LE, and go to:

Example - Map 0DD Zozo, Outside.

Go to that map in LE, and enable the NPCs to be viewed.
Take a look there at NPCs 0-6. Those are all the crane objects, and are palette 6.
Take a note of that. Also, while we're here, take a good look at NPC #11, the girl. She is in a knocked out pose when you see her in-game...but not here. Why?? Let's investigate.

Now click on EVENTS at the top left.
You will see ENTRANCE EVENT there, and you will see: EF85

(If it's ED85, that means your ROM is headerless, so take that into account when searching for the address in the event dump.)

Now, you must have a copy of the event dump document in order to see what exactly is going on at that address. You should already have that document if your hacking FF6, but if not, grab it from Imzogelmo's site, or RH.net. I'm to lazy to link it here. ~_~

Anyways, open the EventScript (the dump) and search for:
CA/EF85

You see, if an address there in LE only has 2 bytes like EF85:
- that means it is in the 'A' bank.
- If the address was 1EF85 that would mean it's in the 'B' bank.
- If the address was 2EF85, that would mean it is in the 'C' bank.

Get it? So...

Key =
XXXX = CA/XXXX
1XXXX = CB/XXXX
2XXXX = CC/XXXX

Now, go to CA/EF85 like the entrance event there says, and you will see the entrance event!
It looks like this:

CA/EF85: 60    Change background layer $0E to palette $0C
CA/EF88: 60    Change background layer $0F to palette $19
CA/EF8B: C0    If ($1E80($1B6) [$1EB6, bit 6] is set), branch to $CA5EB3 (simply returns)
CA/EF91: 1A    Begin action queue for character $1A (NPC $1A), 32 bytes long
CA/EF93: E0        Pause for 4 * 64 (256) frames
CA/EF95: 80        Move vehicle/entity up 1 tile
CA/EF96: 85        Move vehicle/entity right 2 tiles
CA/EF97: E0        Pause for 4 * 32 (128) frames
CA/EF99: C3        Set vehicle/entity's event speed to fast
CA/EF9A: C8        Set object layering priority to 2 (low nibble 2)
CA/EF9C: DD        Make vehicle/entity jump (high)
CA/EF9D: 89        Move vehicle/entity right 3 tiles
CA/EF9E: C8        Set object layering priority to 3 (low nibble 3)
CA/EFA0: E0        Pause for 4 * 10 (40) frames
CA/EFA2: CF        Turn vehicle/entity left
CA/EFA3: E0        Pause for 4 * 16 (64) frames
CA/EFA5: C8        Set object layering priority to 2 (low nibble 2)
CA/EFA7: DD        Make vehicle/entity jump (high)
CA/EFA8: 8B        Move vehicle/entity left 3 tiles
CA/EFA9: C8        Set object layering priority to 3 (low nibble 3)
CA/EFAB: E0        Pause for 4 * 8 (32) frames
CA/EFAD: C1        Set vehicle/entity's event speed to slow
CA/EFAE: 87        Move vehicle/entity left 2 tiles
CA/EFAF: 82        Move vehicle/entity down 1 tile
CA/EFB0: FC        Branch 29 bytes backwards ($CAEF93)
CA/EFB2: FF        End queue
CA/EFB3: 1B    Begin action queue for character $1B (NPC $1B), 2 bytes long
CA/EFB5: 2D        Do vehicle/entity graphical action $2D
CA/EFB6: FF        End queue

CA/EFB7: FE    Return

---

CA/EF85: 60    Change background layer $0E to palette $0C

It's this command here that is telling the NPCs with palette 6 to take on another palette. In other words, the Change backround layer XX to palette XX is what's coloring the cranes, and palette 6 is allowing that to happen.

60    Change background layer $0F to palette $19

Layer $0F is used/reserved for palette 7.

Also, take a look at the:

CA/EFB3: 1B    Begin action queue for character $1B (NPC $1B), 2 bytes long
CA/EFB5: 2D        Do vehicle/entity graphical action $2D
CA/EFB6: FF        End queue

THAT is what's telling NPC $1B (11 in LE, 1B = 11) the girl, to do action $2D, which is the knocked out action for that girl. So it is this entrance event that is making the girl NPC fall on the floor! Mind-blowing stuff, I know.

Some entrance events will say 5EB3. Changing an entrance event to 5EB3 will make nothing at all happen for the map upon entering, because 5EB3 = CA/5EB3: FE    Return.

Return means: do nothing.

So what did we learn?
Palette 6 is a placeholder palette, that when used with a corresponding entrance event with the 60    Change background layer command, will allow that object to have a palette outside 0-7.

---

IMPORTANT:
This also presents a MAJOR problem if you should decide to use palette 6 for a character in your hack, as it will take on whatever color the entrance event is telling it to in maps that use NPC's with palette 6. So some major changes would need to be done or your palette 6 character will look really bad on the maps with an entrance event that tells a NPC(s) to have a background color.

---

Through entrance events, you can do things like have NPC's in different poses, or make them have routines like walk around in a circle, or tint the map and characters with colors, change the music, basically anything you can imagine when entering a map. It is also vital for more advanced event editing like tile-replacement events, as you will need to implement the 'IF' subroutine commands into the entrance event as well.

It's very fun as well as important to make and edit them, and I really hope this helps!


We are born, live, die and then do the same thing over again.
Quote  
[-] The following 1 user says Thank You to Gi Nattak for this post:
  • SSJ Rick (02-29-2012)

#2
Posts: 2,768
Threads: 88
Thanks Received: 24
Thanks Given: 87
Joined: Jun 2009
Reputation: 25
Status
None
great info thanks

this means I might have to make Celes pal 0 again for my hack *sigh*

ah well its no big deal really

as for Kefka its no problem at all I had something planned Wink


"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  

#3
Posts: 3,969
Threads: 279
Thanks Received: 236
Thanks Given: 57
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
Well I never experimented with command 60 but now I know better what it does... But from what I see:

Code:
CA/EF85: 60 Change background layer $0E to palette $0C
CA/EF88: 60 Change background layer $0F to palette $19

this means: Change background layer 14 to palette 12 and change background layer 15 to palette 31...How do you know which layer is which NPC such as the cranes?

Edit: As for NPC repetitive movements set in a entrance event I have explained it a bit an I gave an example recently with the event dump how it's achieved. Check the last post of this thread
  Find
Quote  

#4
Posts: 2,548
Threads: 98
Thanks Received: 147
Thanks Given: 158
Joined: Aug 2009
Reputation: 52
Status
Nattak\'d
Ah, my apologies, the background layer that affects the NPC's is background layer $0E.
I'll edit my post to reflect that, thanks. Wink


We are born, live, die and then do the same thing over again.
Quote  



Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite