’Cause all games were better on the GBC

You are not logged in.

#1 2012-09-19 17:24:05

From: Somewhere in Johto
Registered: 2011-08-10
Post 159/410

Variable Sprites (6C)

(From Scripting Compendium)

6C Variable sprites:

Writes a number to the variable sprite RAM from D555 to D564 (see Compendium on the sprite system).


[6C][xx][Sprite no]

xx: Number between 0x00 and 0x0F

Can anyone explain how this actually works?

I know this is used after the encounter with Silver in Olivine City to change Silver's sprite into a male swimmer's, but I don't understand how it works.

Last edited by Munchulax (2012-12-02 02:26:07)

“To live is the rarest thing in the world. Most people exist, that is all.” ― Oscar Wilde


#2 2012-09-19 18:18:40

Registered: 2009-11-25
Post 1,570/3,654

Re: Variable Sprites (6C)

You would use the map's script header here. In the most basic way of doing it, you'd have an event for trigger timing 0 that loads one sprite. Then to make it show another sprite later, you would have a script that runs on trigger timing 1 that loads the other sprite.

I am not very active on this forum. I only pop in from time to time.


#3 2012-09-21 14:50:15

Registered: 2010-10-16
Post 302/459

Re: Variable Sprites (6C)

The sprite RAM is stored permanently. There is no need to reload it using a trigger or map entry script. Just be sure you initialize it somewhere (if 0x00 doesn't fit your need initially, which is likely) and off you go.

In case it isn't clear, xx is the slot number, i.e. 0x00 ^= 0xD555 ... 0x0F ^= 0xD564. Then use sprite indices in the upper 0xEx, 0xFx range (see guide) to actually display the selected sprite. It is supposed to be used on inside maps, so I guess for overworld maps you will have to have the corresponding sprites defined in the applicable spriteset.



Last edited by Tauwasser (2012-09-21 14:51:40)


#4 2012-12-02 02:22:09

Registered: 2009-11-25
Post 1,993/3,654

Re: Variable Sprites (6C)

I went through and wrote down which of the variable sprites are used and what they are used for, as well as what they default to and where the script is that initializes them.

Edited by game scripts (cannot be edited with this command, but are still variable)
E0 - Pokemon with Daycare Man
E1 - Pokemon with Daycare Lady

Editable by you with scripts
F0 - Game System in Room
F1 - Left Table Decoration
F2 - Right Table Decoration
F3 - Big Pokedoll in Room
F4 - Defaults to Sudowoodo, Then used by Girls (Route 36 & 37)
F5 - Defaults to Rival, Then used by Swimmer (Olivine & Route 40 & 41)
F6 - Defaults to Rocket, then Rival (Azalea Town)
F7 - Janine Gym 1
F8 - Janine Gym 2
F9 - Janine Gym 3
FA - Janine Gym 4
FB - Defaults to Girl (Copycat girl)
FC - Defaults to Girl, then Janine (Fuschia Pokecenter)
FD - Unused
FE - Unused
FF - Unused

x10048E - Script that sets their original sprites
 - Ignores the decorations, as well as FD, FE, and FF

That location isn't necessarily the start of the entire script, but the start of the 0x6C commands that actually initialize these.

Last edited by Mateo (2012-12-02 02:22:41)

I am not very active on this forum. I only pop in from time to time.


Board footer

Powered by FluxBB