Object List file

Object List files are configuration files used in LEGO Rock Raiders for Windows to designate the starting locations of Rock Raiders, buildings, vehicles, creatures, building materials, spider webs, and the game camera within missions. They use the filename extension .ol, though they are essentially just text files. Each mission's Object List file is linked to in that mission's section in Lego.cfg using the property OListFile, and is by default located within that level's folder.

Formatting

Like other configuration files in LEGO Rock Raiders, Object List files are written with braced sections that are human-readable. The entirety of each file's data is contained within a Lego* {} section. Each listed object is then given its own section with a unique name. While the section name of an object can be anything, it's typically in the format Object# {}, using a sequential number in place of #, in order to keep track of the amount of objects used in the level. An Object List can have a maximum of 200 entries; going over this limit exceeds its memory pool, causing the level to crash[verify].

Object List files use the unique object TVCamera, which is not defined in Lego.cfg at all. This object is the game camera, and its position and facing angle determine where and what direction the player will be looking at upon the start of a level. If an Object List doesn't have a camera defined, one will be placed in the center of the map when the level loads.

If there are no Rock Raiders or buildings exposed at the start of the level, the level will load, but will softlock on the first page of the level's mission briefing.

Properties

Object List files have six properties that can be applied to each object's section. Only type, xPos, yPos, and heading are necessary. In the default game, driving is only used in Run The Gauntlet, and health is not used at all.

All numeric properties can use six decimal places, allowing for very precise placement. However, buildings will ignore these, reverting to being placed in the center of whichever block the main part of their construction is in, and facing whichever cardinal direction their designated angle is closest to.

Type

The type property is used to define what an object is. This can be set to any of the objects defined in the VehicleTypes {}, MiniFigureTypes {}, RockMonsterTypes {}, and BuildingTypes {} sections, and some in the MiscObjects {} section. For example, placing a Rock Raider in a level would require the property type Pilot.

The majority of objects from the MiscObjects {} section can't be placed with an Object List; doing so will either crash the game upon loading a level, or cause the game to close without an error message. Only the following objects from this section can be placed with an Object List:

  • Boulder - The model for the boulder thrown by monsters; since it gets its texture from whatever type of wall it was scooped out of, it will appear untextured
  • Pusher - The looping animation for the beam fired from a pusher beam
  • Freezer - The looping animation for the beam fired from a freezer beam
  • LaserShot - The looping animation for the beam fired from a laser beam
  • Crystal - An energy crystal
  • Dynamite - dynamite
  • Ore - A piece of ore
  • ProcessedOre - A building stud
  • Barrier - An unextended barrier
  • ElectricFence - An electric fence
  • SpiderWeb - A spider web
  • OohScary - An active sonic blaster. Strangely, an inactive Sonic Blaster can't be placed, unlike with dynamite.

xPos/yPos

The xPos and yPos properties set the position of an object in a level. Positions are based on the in-game blocks designated in the Terrain map, with each corner of a block being a whole number coordinate and (0,0) starting in the very top left corner of the map. Because coordinates are relative to blocks rather than based off of an absolute distance system, the actual distance between objects can change depending on what a level's BlockSize is set to; however, in the default game, it is always 40.

Heading

The heading property defines what direction an object is facing. Facing angle is measured in degrees in typical compass format, with 0 facing towards the top of the map, 90 facing to the right side, 180 facing towards the bottom, and 270 facing towards the left side. Values of 360 and onward can be used, but will be read as their coterminal equivalent below 360 degrees (e.g. 540=180).

Driving

The driving property allows an object to start the level driving another object. This property must be defined as the section name of the object intended to be driven. The position and heading of the object with this property will be ignored in favor of those of the driven object. If one of the objects is in a hidden cavern while the other is not or is in a separate hidden cavern, this property will be ignored entirely.

While this was intended to be used to force a Rock Raider into a vehicle, it can be applied to and point to any two objects. The results of doing this to other object types will usually be strange and sometimes result in game-crashing effects.

Health

The health property designates how much health a unit has at the start of a level. Health can be set to a value over 100, allowing units to take far more damage than should be possible; however, buildings will reset to a health of 100 when attacked by monsters or struck by thrown boulders. Likewise, health can be set to a negative number such as -1.0, which will cause that object to immediately be teleported out or destroyed when the level starts or when the cavern it's contained in is discovered. Strangely, setting an object's health to exactly 0.0 will cause this property to be ignored entirely.

Example setup

Here is an example of a complete Object List file:

Lego* {

	Object1 {
		type	Toolstation
		xPos	11.500000
		yPos	10.500000
		heading	180.000000
		health	50.000000
	}

	Object2 {
		type	Pilot
		xPos	12.500000
		yPos	11.500000
		heading	90.000000
		driving	Object3
	}

	Object3 {
		type	SmallDigger
		xPos	12.500000
		yPos	11.500000
		heading	90.000000
	}

	Object4 {
		type	TVCamera
		xPos	11.000000
		yPos	10.000000
		heading	45.000000
	}

}

Which generates a Tool Store facing south at (11.5,10.5) with only 50 health points instead of 100, a Rock Raider driving a Small Digger facing east at (12.5,11.5) on the block southeast of the Tool Store, and the camera facing northeast towards the Tool Store.

Modding

Object List files are not compiled and can easily be edited with even Notepad.