News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Add another state.

Started by TheOrigin, December 24, 2017, 06:29:22 AM

Previous topic - Next topic

TheOrigin

Well, i like to ask things, now i need help.
I wanna to add a state from a room (obviously).
I've this.

00079550: 00 00 0A 00 11 01 01 04 70 A0 00 79 95 E6 E5 DB
00079560: AC C3 00 00 04 54 81 3E 8B 3D 82 C1 C1 01 00 00
00079570: 00 00 00 3A 82 7E B8 D3 91 7E 8A 8A 8A 0B 00 35

blue: MDB Header
yellow: states
orange: doors
green: doors data
teal: level data
pink: room scrolls
purple: background
brown: PLM set
navy: Layer 3
lime green: enemy and GFX set
red: well they're many colors hahaha "red" are just "things"

and that's not all, also i need the same thing from another room, i wanna to learn how do this step by step.

You know, do things myself, (with "do things myself" i talk about editing the hack haha, so i still need help).
if you're very smart and you can understand my horrible english because obviously i don't speak english, help me pls.

Jordan5

I recommend reading Grimes documentation on room states as well as the header format as these may help you.

As you have to put the room header in free space anyway, I would just recommend copying one which has the desired number of states and then changing the level data, PLM, enemy etc. pointers as required.

TheOrigin

Quote from: Jordan5 on December 24, 2017, 08:07:45 AM
I recommend reading Grimes documentation on room states as well as the header format as these may help you.

As you have to put the room header in free space anyway, I would just recommend copying one which has the desired number of states and then changing the level data, PLM, enemy etc. pointers as required.

Emmmm, ok i'll see what I can do, anyway ty m8 ;)

TheOrigin

Well, I can see something.
I try to add a new state, but to do that i need put 12 E6 and other thing which i don't understand, some rooms have 0E and others have 00.

After this number rooms have another number for example room 792B3 haves 12 E6 00 DF 92

What do these bytes mean, what's the difference between 00 or 0E and how can i find or create the next 2 bytes?(here the example is DF 92)

I know how create a copy of a room (thing that i learned in SMILE RF Manual) but i can't translate with my english every things so I go directly to the thing which i wanna to learn, but i don't know where to start so i ask from help, coming from people who know about this subject.

Mettyk25jigsaw

The first 2 bytes are telling you it's a normal event state, not a boss state or an item state, the third byte is the event no.---that is, what event must go off for this event to load the new data, eg 00 is zebes is awake, 0e zebes time bomb set, 0d is shaktool cleared a path etc.

The last 2 bytes are a pointer, you must copy $1A bytes starting from the room's level data pointer which is straight after E6 E5 (AS WRITTEN IN A HEX EDITOR) and paste it somewhere where there is free space in bank $8F, wherever you paste the $1a worth of data, well that's the pointer you must put down as the last 2 bytes and remember to reverse the pointer backwards and do not put it forwards. Also these five mentioned bytes you showed as an example must always go b4 the standard state pointer/value E6 E5 (once again as written in a hex editor).

Good luck...

TheOrigin

Quote from: Mettyk25jigsaw on December 25, 2017, 04:38:56 AM
The first 2 bytes are telling you it's a normal event state, not a boss state or an item state, the third byte is the event no.---that is, what event must go off for this event to load the new data, eg 00 is zebes is awake, 0e zebes time bomb set, 0d is shaktool cleared a path etc.

The last 2 bytes are a pointer, you must copy $1A bytes starting from the room's level data pointer which is straight after E6 E5 (AS WRITTEN IN A HEX EDITOR) and paste it somewhere where there is free space in bank $8F, wherever you paste the $1a worth of data, well that's the pointer you must put down as the last 2 bytes and remember to reverse the pointer backwards and do not put it forwards. Also these five mentioned bytes you showed as an example must always go b4 the standard state pointer/value E6 E5 (once again as written in a hex editor).

Good luck...
OOOH Now I understand, thank you very much.
You facilitated my life in a 19.94% (reference), thank you  :grin: