Scenery Object Index in MML

Have a question, suggestion, or comment about Aleph One's features and functionality (Lua, MML, the engine itself, etc)? Post such topics here.

Scenery Object Index in MML

Post Nov 8th '13, 02:37

Hi,

I've run into some confusion as to how to correctly utilise MML to replace a scenery object with a 3D model. I can get it to work, but it's more by trial and error.

I'm replacing the "security monitor" scenery object of the water texture set.

Here's my Lua, which spawns the object:

Code: Select all
Scenery.new(x, y, height, polygon, "security monitor")


This works fantastically. If I look at the MML guide that was included with Aleph One, I see that "security monitor" has the index of 24, so I try:

Code: Select all
Scenery.new(x, y, height, polygon, 24)


This work fantastically as well.

Now, I try and add a model using MML. Knowing that the ID is 24 and the texture set is water, I try:

Code: Select all
      <model coll="22"
         seq="24"
         file="Models/marathon.obj"
         type="obj"
         scale="1"
         x_rot="0"
         y_rot="90"
         z_rot="0"
         x_shift="0"
         y_shift="0"
         z_shift="0"
         side="1">
      
         <skin   
            clut="-1"
            normal_image="Skins/marathon.png"
         />
         
      </model>


seq="24" doesn't work, even though the index is correct based against what's specified in the MML guide (plus my Lua script works). However, if I change it to seq="16", it works!

Can someone explain the logic here? It took me a while to figure this out, but I still can't spot the pattern, and it's making it difficult to replace objects in other texture sets.
User avatar

heliomass
Montréal, QC

Post Nov 8th '13, 03:53

The first is the index of the scenery definition in the game world. The second is the sequence ID in the shapes file. Open ShapeFusion, check the sequences in the water scenery collection, and you'll see how it lines up.
User avatar

treellama
Pittsburgh

Post Nov 8th '13, 17:32

Thanks, makes perfect sense now :)
User avatar

heliomass
Montréal, QC


Return to Aleph One Discussion



Who is online

Users browsing this forum: No registered users

cron