Guide to sequenced textures in LEGO Rock Raiders

This modding guide for the 1999 video game LEGO Rock Raiders details how to add sequenced textures to models in the game.
What are sequenced textures?
In the Windows version of LEGO Rock Raiders, sequenced textures are textures that are animated in-game using a series of bitmap files. Sequenced textures can be used in any object that uses LightWave Scene files for animations. In the original game they are mostly used only for particle effects, such as steam, dust, and lava smoke.[1]
Sequenced textures must consist of a series of BMP files ending in numbers. They should be sequential (test if they have to be) and should usually start at 1, though they don't have to (but method 2 will be needed). Numbers are usually padded 2–4 places in the base game (eg. example0001.bmp is 4 places); in practice 2 places should be enough except for very long sequences.
Where sequenced textures can be used
Sequenced textures can be used on the following objects in LEGO Rock Raiders, grouped by their entry blocks in the Main LEGO Config File:
- All objects that use AE files:
MiniFigureTypes {}
– Rock Raider minifigures. Only one type is in the final game, though it is possible to add more.BuildingTypes {}
– Rock Raider buildings. Many of these make extensive use of sequenced textures for steam effects.VehicleTypes {}
– Rock Raider vehicles, though not their upgrade parts; see below.RockMonsterTypes {}
– Creatures such as the Rock Monster, Slimy Slug, and Small Spider.- Certain
MiscObjects {}
entries:Barrier
,Dynamite
,IceCube
,OohScary
,Pillar
(unused),SpiderWeb
.
- All Chief animations found under
Advisor {}
andAdvisorPositions640x480 {}
(or for other resolutions,AdvisorPositionsWxH {}
). - Most
MiscObjects {}
entries:BirdScarer
,BoulderExplode
,BoulderExplodeIce
,ElectricFenceStud
,Explosion
,Freezer
,FreezerHit
,LazerHit
,LavaErosionSmoke1
,LavaErosionSmoke2
,LavaErosionSmoke3
,LavaErosionSmoke4
,LaserShot
,LongElectricFenceBeam
,MiniTeleportUp
,PathDust
,Pusher
,PusherHit
,RechargeSparkle
,ShortElectricFenceBeam
,SmashPath
,UpgradeEffect
. - Lava smoke, which is defined in the game's executable file for some reason.
Sequenced textures can not be used for:
UpgradeTypes {}
– All upgrades for vehicles and buildings are LWO files added on top of the main object, and are not tied to any LWS files. (Confirm LWS upgrades can't be used?)- Certain
MiscObjects {}
entries:Boulder
,Crystal
,ElectricFence
,Ore
,ProcessedOre
. (verify that LWS files can't be used for these) - World
Textures {}
– These are applied to flat walls generated by the game engine. Walls and floors can use models in Eye/Shoulder view, but not animations. - All interface images, though FLIC files can be used in certain instances.
Specifications
The following requirements:[1]
- The texture files must be 8-bit per pixel (8bpp) BMP files, like all textures in the game.
- The texture file names must end with numbers. The first texture in the sequence should be numbered 1, though starting with 0 or a later number is possible using method 2. The numbers should be padded to the same number of digits for all textures in the sequence; eg.
0001
being 4 digits. Numbers are usually padded 2–4 digits in the base game; in practice 2 digits should be enough except for very long sequences. - The LightWave Object file using the sequenced texture must specify it as such. The LWO should link to the first file in the sequence and contain " (sequence)" immediately after the file path.
- The LightWave Object file using the sequenced texture must be used in a LightWave Scene animation file. The LWS should be the same number of frames in length as the sequenced texture, or a number of frames in length that is divisible by the number of frames in the sequenced texture, to ensure that the texture loops properly. As mentioned above, not all objects use animations, particularly upgrade models and certain misc. objects.
Using LightWave 3D 5
This section of the guide details how to create a sequenced texture using LightWave 3D 5. Version 5 was first released in 1995 and was updated to version 5.5 in 1997 and version 5.6 in 1998;[2] one or both of the latter two versions were used in the development of LEGO Rock Raiders. For this guide LightWave 3D 5.6 is being used; this version will still run on Windows 10, but users may find its interface difficult compared to later versions. The LightWave file formats changed starting in version 6; these later versions can still save LightWave 5 objects and 5.6 scenes, and can view sequenced textures, but will not properly save sequenced textures in the version 5 LWO format (verify this). To get around this, either save your model without sequenced textures and then load it into LightWave 5, or follow the hex editing section below.
In LightWave Modeler (write this out)
Using a hex editor
The cheating method.[1] Sequences added using this method will not display properly in LightWave, as they are missing other details usually applied to sequenced textures; however, Rock Raiders only looks for the flag marking a texture as sequenced and does not care about any other sequence properties.
There are three types of values that need to be edited, two of which will have multiple entries to be edited if multiple sequenced textures are used in the same LWO file. Each of these values is stored as a four-byte ASCII word followed by a hexadecimal number of a certain length. These values are:[1]
FORM
– a four-byte value found near the beginning of the LWO file, defining the length of the entire file.SURF
– a four-byte value used to define the length of each surface entry in the LWO file, with one value for every surface.TIMG
– a two-byte value used to define the length of each texture file path in the LWO file, with one value for every texture.
Add 11 (0x0B
in hexadecimal) to each of these values. For multiple sequenced textures, you will need to add 11 to each SURF
and TIMG
value assigned to the entries in question, and then add 11 multiplied by the number of sequences to FORM
. (eg. 3 sequenced textures would be 33 extra bytes, or 0x21
in hexadecimal.)
Alternatively, you can avoid most of the above by initially setting the file name of the first BMP in the sequence to have 11 extra characters. After the texture has been applied to the model, you can open the LWO file and delete the extra characters to make space for the " (sequence)" flag, without the file length being affected. Another option is to simply add " (sequence)" to the BMP file name before adding it to the LWO; then edit the LWO to move the placement of .bmp
.
- Example: rename the first file in the sequence
abc
from abc001.bmp to abc001 (sequence).bmp, then once the LWO file has been saved edit the texture's entry to now readabc001.bmp (sequence)
.
Be sure to rename the BMP to remove " (sequence)" or any other extra charaters before adding the files to the game.
References
- ↑ 1.0 1.1 1.2 1.3 Sokol, Alan (December 20, 2017) [October 14, 2017]. "Animated Textures on Models". Rock Raiders United. Archived from the original on November 13, 2024.
- ↑ Scott, Dean A.; Vost, Ben (11 September 2024) [2002]. "LightWave History: All the versions of LightWave - so far". LightWave 3D. LightWave Digital. Archived from the original on 26 November 2024. Retrieved 30 November 2024.