Pages: 1
Posted on 01-22-12, 11:21 pm
Banned for being a complete idiot.

Karma: 529
Posts: 671/987
Since: 07-09-11
Some of you may have heard of ClassID Tool, or the rewrite of  Dirbaio's Changing ClassIDs of Sprites.

Now most people here probably don't know what a Class is, or how it's related to a Sprite. It wasn't your falt, it just wasn't explained on here. As far as I know,  Dirbaio and people who learned from him are the only ones who explained it to others.

Now first, let's clarify what a Sprite is. By observing NSMBe, it seems like a Sprite is the game object (a Goomba, Koopa, and such), and where it will be located when it is located on a map.

But this is only half correct.

A Sprite is not the actual object, but a link to a Class. It also defines where the Class will be spawned in a level.
A ClassID is the actual game object (like a Goomba, Koopa, and such).

What ClassID the Sprite will link to is defined in a table in the Overlay0. ClassID Tool and the tutorial (links above) tell you how to modify the table.

So for example:
ClassID 83 is the Goomba. And by default, it is linked to Sprite 148.
ClassID 94 is the Koopa. And by default, it is linked to Sprite 149.

So if you modify Sprite 149 to ClassID 83, ALL Koopas in the game will become Goombas.
If you modify ALL Sprites to ClassID 83, absolutely all objects will become Goombas.

Now you understand ClassIDs and Sprites, you may ask "What is the use for modifying the ClassID a Sprite links to?!"

Well, there are many ClassIDs which are unused, and do very interesting stuff.
For example, ClassID 31, which is the Item Spawning Class, is not link to any Sprite. (However, ClassID 240 creates a ClassID 31 in the game.) If you change for example Sprite 1 to link to ClassID 31, then you can directly spawn items!

Well that wraps up this lecture. Hope you gained 5+ Knowledge Points!

(BTW: There was a really old thread that briefly explained ClassIDs here.)
Posted on 01-24-12, 11:00 am
Porcupo
Did you win the game?

Karma: 211
Posts: 208/322
Since: 06-28-11
Nice

This needs to be added to the tutorial thread... (If it hasn't been already)
Posted on 01-27-12, 06:06 pm
☭ coffee and cream


Karma: 10415
Posts: 186/2768
Since: 06-26-11
This is nice knowledge to have. If we get to understand the class vtables, what each function does and such, it'll make ASM hacking easier for sure.

So if you modify Sprite 149 to ClassID 83, ALL Koopas in the game will become Goombas.
If you modify ALL Sprites to ClassID 83, absolutely all objects will become Goombas.

Reminds me of some AR code based SM64DS hacks that modify the game's sprite->class table, like this one
_________________________
Kuribo64 - RH-fucking-cafe - Kafuka

zrghij
Pages: 1