Originally posted by Yoshimaster96I have a question.
I want to replace the shell model with the Yoshi model. I have this:
Beginning at 0x21BD3C:
00 06 00 00 \\ Load shell
11 01 00 01 \\ Load (OR) (for Koopa shell) 0x????????
1B 00 00 55 \\ Change to model ID 55 (aka Yoshi model)
30 00 00 00 00 1E FE 70 FF CE 03 E8 03 E8 00 C8 00 00 00 00 \\ Load gravity
27 26 00 00 05 02 41 E8 \\ Load animation (copied from Yoshi) 0x????????
28 00 00 00 \\ Animate
08 00 00 00 \\ Begin loop
0C 00 00 00 80 2B D6 80 \\ Call function (for Koopa shell) 0x????????
09 00 00 00 \\ End
So I tried the shell in Snowman's land, but the game crashed.
I figured Model 0x55 is not defined.
So, where are the models for the bank that contains the Koopa shell defined? Also, is there a way to translate from segment and offset to ROM address, because it seems to be different for every segment, and I had to trace to different documents to find what values to change.
The model ID for shell is 0xBE, so maybe I can define the shell model as:
Geometry
17 0C 00 (bank, 1 byte) (start of geometry data, 4 bytes) (end of geometry data, 4 bytes)
Polygon and Textures
17 0C 00 (bank, 1 byte) (start of polygon and texture data, 4 bytes) (end of polygon and texture data, 4 bytes)
notice, that yoshi is only available in castle grounds, since his data is never loaded except their (when being in theoriginal game)
so in this case, model ID 0x55 might point to something, that is not a geo layout (which would crash the game) or the segmented animation pointer doesn't point to an animation, which would also crash the game. but your code should do perfectly well in castle grounds.
btw, with 0x17 level script commands, you can't define model IDs, you can just load data. if you'd copy the 17 0C 00 0C and the 17 0C 00 05 command from castle grounds and also the 0x22 command, that defines model id 0x55, you'd be able to get this in other levels too. only problemw ould be, that someof the other 0C objects wouldn't work in that level anymore.