Guides‎ > ‎zzromtool‎ > ‎

Adding Objects and Actors

If you haven't read the intro yet, start there.

This guide builds upon principles established in the Adding Scenes example. Please read it before attempting this one.

The following will be covered
  • Adding objects
  • Adding actors
  • Working with an actor's conf.txt
Resources required
Please use a clean rom, for the sake of reducing potential user errors. Some steps may vary if you've already added content to the game.

Preparation

First, update scene 38 with the assets provided in the .zip. This is a map that contains two actors, one of which does not yet exist. Because it contains a non-existent actor, you won't be able to test in-game without following the next steps first.

Adding objects

If you open the object folder of a clean rom dump, you'll find that the folder names range from 0 to 401. This is the game's standard limit. We're going to be adding a new object. Copy the folder 402 from the object folder in the provided .zip to your rom's object folder.

Our new object is 402 (decimal), or 0x0192 (hexadecimal).

Adding actors

The same rules apply from the object example above, but in the actor folder instead and the folder 471 from the .zip.

Working with an actor's conf.txt

Let's launch Notepad++ and open the conf.txt in actor/471 and confirm that the primary object dependency matches the object folder we placed it in.

Initialization
    Type    0x01
    Room    0x00
    Flags   0x00000000
    Object  402
Allocation        0x00000000
Reserve           0x00000000
VRAM              0x80B959D0

Object is 402, just like where we placed it, so everything checks out. If we placed it in another folder, like 403, we would change it to that. Keep in mind you would also have to update the .zmap to reflect this change, which is beyond the scope of this guide.

Please refer to the zzromtool manual for a more in-depth explanation of how conf.txt works.

Finishing up

Now build the rom and go to the Know-It-All Brothers' House. If everything worked out properly, you'll see a crate and a barrel. The crate can be destroyed by rolling into it, and the barrel can be destroyed with bombs. And we didn't have to replace any existing objects/actors. Fun!