Page 1 of 3

Level code documentation

PostPosted: January 15th, 2011, 7:03 pm
by sirknightingfail
I made this topic to discuss level code for last legacy
This is how it is laid out.
XsizexYsize~Foreground tiles~Foreground Items~background tiles~background items~Level name~Music#~Far background, close Background~Gravity direction~
item code: show
The item code looks like this:
ItemId(:link if there is one), x-position, y-position, other statistics (this will be mentioned later in the item statistics section (when it comes))
Each item is separated by a |

statistics(help is appreciated on this. incomplete as of now): show
This is the stats section. all Item info is in here. the moving block and planet codes go same as the tiles, but for a grid of the size defined, also, each ID is separated by a period in the planet and moving block codes. Custom paths are written in the form x&y;x&y;x&y;...(it end with a semicolon) where the first set is the first point of the path where the center of the object is considered 0,0 and up is negative, while down is positive




Tiles
tile code: show
Tiles are done so that all spaces are defined.
The tiles code is like this:
TileId of tile 1Tile Id of tile 2 Tile Id of tile 3 Tile ID of tile 4... where in a 2x2 grid, it is set up like this:
tile1 tile3
tile2 tile4

3x3 is like this
tile1 tile4 tile7
tile2 tile5 tile8
tile3 tile6 tile9

And so forth...

Shortening the code length(this does not work with planets or moving blocks):
If you have x of the same tile one after the other in the code, (This does not work with planets)you can make that section of the code like this:
TileId*x*
For Example: if I have a 3x3 grid with full grass tiles on the bottom,( the code for full grass tiles are 2K), the code(based on the first part) would be this:
002K002K002K
Problem is, this would confuse the designer, so we change it to this:
0*2*2K0*2*2K0*2*2K

A good Item and tile id list can be found here: http://runouw.com/forums/viewtopic.php?f=53&t=42110
My list of old tile ids: show
legend:
Tile coverage: (this is the second capitalized letter before the colon)
F|full tile
UR| slant that goes up and right
UL| slant that goes up and left
H| bottom half filled only
Dungeon tile's letters afte symbolize which corner it is turning into a stair
Castle Background window goes across 123 then next line 456 then next line 789
Tile types(i made shorthands. these have nothing to do with the code)
G |grass
Di|dirt
S|Snow
M|Mountain
W|Wood
C|Castle
CB| Castle Background
D|Dungeon
Ids
Blank: 0(100)
GF: 2K (101)
GUR: 2L (102)
GUL: 2M (103)
GH: 2N (104)
DiF: 2O (105)
DiUR: 2P (106)
DiUL: 2Q (107)
DiH: 2R (108)
CaveF: 2W (113)
CaveUR: 2X (114)
CaveUL: 2Y (115)
CaveH: 2Z (116)
SF: 2[ (117)
SUR: 2\ (118)
SUL: 2] (119)
SH: 2^ (120)
MF: 2_ (121)
MUR: 2’ (122)
MUL: 2a (123)
MH: 2b (124)
WF: 2c (125)
WUR: 2d (126)
WUL: 2e (127)
Lava: 3c (200)
CF: 3e (202)
CH: 3f (203)
CUR (F): 3g (204)
CUL (F): 3h (205)
CUR (L): 3i (206)
CUL (L): 3j (207)
CbF: 4K (251)
CbW1: 4L (252)
CbW2: 4M (253)
CbW3: 4N (254)
CbW4: 4O (255)
CbW5: 4P (256)
CbW6: 4Q (257)
CbW7: 4R (258)
CbW8: 4S (259)
CbW9: 4T (260)
CbRailing left: 4U (261)
CbRailing middle: 4V (262)
CbRailing right: 4W (263)
CbPillar bottom: 4X (264)
CbPillar top-middle: 4Y (265)
DF: 5d (351)
D BL: 5e (352)
DBR: 5f (353)
DUR: 5g (354)
DUL: 5h (355)
Dungeon background: 6K (401)
The numbers in parentheses are for switches, moving blocks, and planets.

I shall post more on this later.
Please comment if you have more info.

Re: Level code documentation

PostPosted: January 16th, 2011, 1:32 am
by StarF
Nice discovery, with this Suyo will probably do a level code document of this game aswell.

Re: Level code documentation

PostPosted: January 16th, 2011, 4:13 am
by Suyo
Oh really will I

Well, let's see, if I am bored enough (and school stops eating 75% of my free time) I might do that.

Re: Level code documentation

PostPosted: January 16th, 2011, 3:04 pm
by AwesomeJRFD
the code for an empty tile is 1.100

Re: Level code documentation

PostPosted: January 17th, 2011, 11:42 am
by sirknightingfail
actually, it is 0.
I believe you are talking about a moving block or planet's code

Re: Level code documentation

PostPosted: January 17th, 2011, 1:14 pm
by AwesomeJRFD
sirknightingfail wrote:actually, it is 0.
I believe you are talking about a moving block or planet's code

Yes. And the Change Tile effect for triggers.

And the tiles placement is the same as in the SM63 level code.

Re: Level code documentation

PostPosted: January 19th, 2011, 4:18 pm
by sirknightingfail
AwesomeJRFD wrote:And the tiles placement is the same as in the SM63 level code.

I knew that already, I was just thinking of a good way to explain it

I am currently working on the planet, moving block, and the switch codes.
If anyone wants to help, PM me, do not post it on the Forum
( it might not get viewed by the majority of the people who see this forum

P.S. I am temporarily locking the topic until I finish

Newer Level code documentation...

PostPosted: January 19th, 2011, 5:12 pm
by sirknightingfail
-Reserved for links to other helpful last legacy things-

Re: Level code documentation

PostPosted: January 19th, 2011, 6:02 pm
by Blablob
I think we can keep these two topics together; they're related to the same subject right?

Re: Level code documentation

PostPosted: January 20th, 2011, 7:08 am
by Megar
Hang on....

So, can we make our own tiles using what we know?