Jump to content
Mysteli

All About WRLs [Everything you see and do in the Worlds!] (Warning, Large Post)

Recommended Posts

Mysteli

Hi! Just thought I'd make a dump on my discovery with WRLs so far. They are located in \GAME DATA\SAVED WORLDS\

Index:
(N/A Means I haven't looked at that section yet)

  • Starting Position
  • Static Object & Golden Brick
  • Mobile Object, Bonus Pickup & Vortex
  • Award Display
  • Boulder Spitter
  • Map Marker
  • Ambient Lighting
  • Point Light
  • Directional Light (N/A atm)
  • Model And Spot Light
  • Checkpoints
  • Checkpoint Supervisor
  • The Pits
  • Weapon Pickup
  • AI Quad
  • AI Section
  • AI Supervisor (N/A atm)
  • Camera
  • Cinematic Camera
  • Cinematic Target (N/A atm)
  • Spinner
  • Spline
  • Spline Linker
  • Spline Skeleton (N/A atm)
  • Skeleton (N/A atm)
  • Land Patch
  • LEGO Terrain
  • Surface Manager (N/A atm)
  • Water Sheet
  • Foyer Hot Spot
  • Sea
  • Water Course (N/A atm)
  • Waterfall (N/A atm)
  • Steam Point
  • Kill Boxes
  • Kill Sphere
  • Sky Box
  • Clouds (N/A atm)
  • FlareCircle (N/A atm)
  • Sun Flare (N/A atm)
  • World Rain
  • World Snow
  • LEGO Stomper Mech
  • Firework
  • Layer Manager (N/A atm)
  • World Properties
  • Reverb Gateway (N/A atm)
  • Reverb Area (N/A atm)
  • Reverb Init (N/A atm)
  • Sound (Very Incomplete)
  • Minifig
  • Script Trigger
  • Wheel (N/A atm)
  • Thruster Mobile (N/A atm)

 

 

Layer List  

Spoiler

 

        All

        ---

        Static/Base Layer (Global) - 00 00

 


        Sandy Bay

        ---------
        Track 4         - 20 00

        Track 2         - 40 00

        Track 3         - 60 00

        Track 1         - 80 00

        Foyer           - A0 00

        Layer 6         - C0 00

        Layer 7         - E0 00

        Minifigs        - 00 01

        Trees           - 20 01

        AI Layer 4      - 40 01

        Battle          - 60 01

        Bonus           - 80 01

        Bonus Triggers  - A0 01

        Layer 14        - C0 01

        Layer 15        - E0 01

        Layer 16        - 00 02

        Layer 17        - 20 02

        Layer 18        - 40 02

        Layer 19        - 60 02


        Dino Island
        -----------

        Track 4         - 20 00

        Track 2         - 40 00

        Track 3         - 60 00

        Track 1         - 80 00

        Track 5         - A0 00

        Forrest         - C0 00

        Trees           - E0 00

        Bonus           - 00 01

        Battle          - 20 01

        Foyer           - 40 01

        BossScriptChal  - 60 01

        BossScriptWin   - 80 01

        BossScriptLose  - A0 01

        Explore         - C0 01

        Nice sky        - E0 01

        Bad sky         - 00 02

        Layer 17        - 20 02

        Layer 18        - 40 02

        Layer 19        - 60 02

        Layer 20        - 80 02

        Layer 21        - A0 02

        Layer 22        - C0 02

        Layer 23        - E0 02

        Layer 24        - 00 03

        Layer 25        - 20 03

        Layer 26        - 40 03

        Layer 27        - 60 03


        Mars
        ----

        Track 1            - 20 00

        Track 1 AI         - 40 00

        Track 2            - 60 00

        Track 2 AI         - 80 00

        Track 3            - A0 00

        Track 3 AI         - C0 00

        Track 4            - E0 00

        Track 4 AI         - 00 01

        Boss Track         - 20 01

        Boss Track AI      - 40 01

        Bonus 1            - 60 01

        Bonus 1 AI         - 80 01

        Bonus Game         - A0 01

        Bonus 2 AI         - C0 01

        Battle             - E0 01

        Layer 16           - 00 02

        Layer 17           - 20 02

        YouBeatBoss        - 40 02

        Layer 19           - 60 02

        foyer              - 80 02

        explore            - A0 02

        foyer ai           - C0 02

        Layer 23           - E0 02

        Layer 24           - 00 03

        Alien Script Stuff - 20 03

        Layer 26           - 40 03

        Layer 27           - 60 03


        Arctic
        ------

        Layer 1            - 20 00

        Layer 2            - 40 00

        Track 1            - 60 00

        Track 2            - 80 00

        Track 3            - A0 00

        Track 4            - C0 00

        Boss Track         - E0 00

        Layer 8            - 00 01

        Layer 9            - 20 01

        AI Track 1         - 40 01

        AI Track 2         - 60 01

        AI Track 3         - 80 01

        AI Track 4         - A0 01

        AI Boss Track      - C0 01

        Bonus1             - E0 01

        Explore            - 00 02

        Battle             - 20 02

        Reverb Areas       - 40 02

        Layer 19           - 60 02

        Foyer              - 80 02

        Layer 21           - A0 02

        Layer 27           - C0 02

        JayScriptStuff     - E0 02

        Layer 24           - 00 03

        Foyer AI           - 20 03

        Layer 26           - 40 03

        Layer 27           - 60 03


        Xalax
        ------

        Track 1                 - 20 00

        Track 1 AI              - 40 00

        Track 2                 - 60 00

        Track 2 AI              - 80 00

        Track 3                 - A0 00

        Track 3 AI              - C0 00

        Track 4                 - E0 00

        Track 4 AI              - 00 01

        Boss Track              - 20 01

        Boss Track AI           - 40 01

        Explore                 - 60 01

        Foyer AI                - 80 01

        Steam Points            - A0 01

        Stadia Killzones        - C0 01

        Track 1 Volcano Steam   - E0 01

        Bonus 1                 - 00 02

        Battle                  - 20 02

        Stadium Flares          - 40 02

        RR Challenge            - 60 02

        Foyer                   - 80 02

        End Movie               - A0 02

        Track 1 Lights          - C0 02

        Track 2 Lights          - E0 02

        Track 3 Lights          - 00 03

        Track 4 Lights          - 20 03

        Track 5 Lights          - 40 03

        SPOTLIGHTS              - 60 03

 

    Note, while 00 is global, for things like WorldProperties and Sea and whatnot, it can be overridden by simply having something for that layer there.

 


Rotation Reference:
R1 = Forward Backwards Tilt
R2 = ???
R3 = Side to side tilt
R4 = ???
https://en.wikipedia.org/wiki/Quaternion

 

 


Starting Positions (cRaceStartPos/cFoyerStartPos):

Description: The starting position of a vehicle, weather it be in a race, exploration, battle, or bonus.
The following list goes in chronological order of how they appear in the file.
78 Bytes in Length

 

These are offsets from the beginning of the section, header included.
Position:
Px = 58-5B
Py = 5C-5F
Pz = 60-63

Rotation:
R1 = 64-67
R2 = 68-6B
R3 = 6C-6F
R4 = 70-73
 


Static Objects (cGeneralStatic & cGoldenBrick):

Descriptions: 

Static: The majority of objects in the world that don't move when touched.

Golden Brick: The bricks that help you proceed though adventure mode. These are the ones that are not collected by winning races.

 


100 bytes long.
Layer = 24-27

 

Label = 28-3F

Binding = 40-57


Px = 58-5B
Py = 5C-5F
Pz = 60-63

R1: = 64-67

R2: = 68-6B

R3: = 6C-6F

R4: = 70-73

 

Collision Type (sound) = 7C-7F

 

Model Directory = 80-FF

 

 


Mobile Objects (cGeneralMobile/cBonusPickup/cBonusVortex):

Descriptions: 

Mobile:  The majority of objects in the world that move when touched;

Bonus Pickup: The pickups that are in the bonus game.

Bonus Vortex: What you touch in adventure mode to enter a bonus game.


Mobile Objects: 114 bytes long.

 

Layer = 24-27

 

Label = 28-3F

Binding = 40-57


X = 58-5B

Y = 5C-5f
Z = 60-63

 

R1 = 64-67

R2 = 68-6B

R3 = 6C-6F

R4 = 70-73

 

Collision Type (sound) = 7C-7F

 

82-83: Setting this to anything higher than 00 4A will make the player unable to push the object.


Model Directory = 90

 

Difficulty [Vortex Only] = 100-103

 

 


Award Display (cAwardDisplay):

Descriptions:  Basically a static object, but with two models. One model or the other gets shown based on win/lose conditions.


183 bytes long.
Layer = 24-27

 

Label = 28-3F

Binding = 40-57


Px = 58-5B
Py = 5C-5F
Pz = 60-63

R1: = 64-67

R2: = 68-6B

R3: = 6C-6F

R4: = 70-73

 

Collision Type (sound) = 7C-7F

 

Model Directory (Goal Incomplete) = 80-FF

 

Model Directory (Goal Completed) = 100-183

 

Fireworks (cFireWork):

Description:  Basically a simplified version of static objects. All fireworks coordinates seem to play follow the leader to the last firework entry that appears in the WRL.

 

63 bytes long
Layer = 24-27

 

Label = 28-3F

Binding = 40-57


Px = 58-5B
Py = 5C-5F
Pz = 60-63

 

64-67 = ???

 


Boulder Spitter (cBoulderSpitter)

Descriptions:  It spits out boulders. You know, like the craters on Mars or the Volcano area on Dino Island.
84 Bytes in length

 

XYZ = 68-73

Rotation = 64-83

Launch Power: 78-7B

?: 7C-7F

Frequency: = 80-83

 

 


Map Marker (cMapMarker):
6C Bytes in length

 

Layer: 24-27

 

XYZ...?: 58-63

 


Ambient Lighting (cAmbientLight):
5C Bytes in length

 

58-5A = RGB Values

(Last remaining following offset, #5B, is unknown, possibly alpha)
 


Point Light (cPointLight)

Length = A0

 

XYZ: 88-93

RGBS#1: 58-67

RGBS#2: 68-77

RGBS#3: 78-87

(S = Strength, defaults are 3E and 3F)

 

 


Dirrectional Light (cDirectionalLight)

Length = 94

 

RGB?#1: 64-73

RGB?#2: 74-83

RGB?#3: 84-93

 

 

 


Model And Spot Light (cModelAndSpotLight)

(Found on Xalax, those lights at the top of the area)

Length = 13C

 

Light XYZ: 68-73

Light Rotation: 74-83

 

Model Location: 88-93

Model Rotation: 94-A3

 

Model Path: BC-?

 

 


Checkpoints (cCheckPoint):
1C0 bytes long

 

Layer: 24-27

 

Label = 28-3F

[Posts] Visual Position:
X = 58-5B
Y = 5C-61
Z = 60-63

Visual Rotation: 64-73


Model Directory: 80-99 (unsure about 99)

(there are different types!)

ID:
100

4 bytes (offset) after the ID comes the 'next' checkpoint setting. This determines what checkpoint comes after that one.
4 bytes after this are alternate 'next' checkpoints, there can be up to three.

 

???:

114-117

 

Pass-Thru(?):

Bottom Left Corner:

X: 12C-12F

Y: 130-133

Z: 134-137

 

Top Left Corner:

X: 138-13B

Y: 13C-13F

Z: 140-143

 

Top Right Corner:

X: 144-147

Y: 148-14B

Z: 14C-14F


Bottom Right Corner:

X: 150-153

Y: 154-157

Z: 158-15B

 

???:

15C-1A3

 

??? (This part is vital nevertheless):

1A4-1A7

 

???

1A8-1AF


Arrow (yes, you can be a little bugger and missguide the player. :P):
X = 1B0-1B3
Y = 1B4-1B7
Z = 1B8-1BB

 

 


Checkpoint Supervisor (cCheckPointSupervisor):
11F bytes long

 

Layer: 24-27

 

Starting Lights Glow Appearance: 58 (at which checkpoint does it appear)

 

 


The Pits (cThePits)

Length is 104

 

Layer: 24-27

XYZ: 58-63

Rotation: 64-73

 

Directory: 80-FF

 

 


Weapon Pickup (cWeaponPickup)

Length is 104

 

Layer: 24-27

XYZ: 58-63

Rotation: 64-73

 

Directory: 80-FF

 


AI Supervisor (cAISupervisor):
FC in length

 


AI Quad (cAIQuad):
BC in length

 

Layer: 24-27

 

Label: 28-3F

Track Supervisor: 40-57

 

Bottom Left Corner:

X: 58-5B

Y: 5C-5F

Z: 60-63

 

Top Left Corner:

X: 64-67

Y: 68-6B

Z: 6C-6F

 

Top Right Corner:

X: 70-73

Y: 74-77

Z: 78-7B


Bottom Right Corner:

X: 7C-7F

Y: 80-83

Z: 84-87

 

Center:

X: 88-8B

Y: 8C-8F

Z: 90-93

 

Next quad?: 94-97
Alternate Next Quad?: 98-9B

 

 


AI Section (cAISection):

1C4 in length

Layer: 24-27

Label: 28-3F

Track Supervisor: 40-57

Next Section?: 58-5B
Alternate Next Section?: 5C-5F

???: 7C-7F

???: A0-A3

Point 1 Coordinate: A4-AF

Point 1 Unknowns: B0-C7

The last x is repeated 7 more times (each section being 24 bytes long).
Here is a guideline anyway.
Point 2: C8-EB
Point 3: EC-10F
Point 4: 110-133
Point 5: 134-157
Point 6: 158-17B
Point 7: 17C-19F
Point 8: 1A0-1C3
 


Camera (cCamera):
8C Bytes long


Untested:(when jumping to these positions they seemed logical)

XYZ Location: 70-7B

Rotations: 7C-8B

 

 


Cinematic Camera (cCinematicCamera):
78 Bytes long

 

Layer: 24-27

XYZ Location: 58-63

Rotations: 64-73


Spinner (cSpinner):
7F Bytes long

 

Label: 40-?

 

Layer: 24-27

Spin Speed: 64-67

 

 

 


Splines (cSpline):

X Bytes Long (Dependant on number of points)

 

Layer: 24-27

Label = 28-3F

Binding = 40-57

 

58-5B = ?

 

Ammount of Points: 5C-5F

 

60-63 = ?

 

64-67 = ?

 

For the remainder of the class it is just points. For every point this is the structure breakdown:

XYZ: 0-B
Rotations: C-1B
???: 1C-1F

 


Spline Linker (cSplineLinker):
Layer: 24-27
Label:  28-3F

Names are what is being linked together
Spline Name: 40-57
Spline Name 2(?): 58-6F
Object Name: 70-87


???: 88-8B
???: 8C-8F
???: 90-A7

 


Land Patches (cPatch)

(Use: Land patches, like the ice on Arctic for example)


XYZ: 58-63

Rotations: 64-73

(see static objects for more details on XYZ and Rotations)

 

 


Terrain (cLegoTerrain)

Description:  It's the terrain you drive on!

 

 

Length: 187

Layer: 24-27

Label: 28-3F

 

Px: 58-5B
Py: 5C-5F
Pz: 60-63

R1: 64-67
R2: 68-6B
R3: 6C-6F
R4: 70-73

 

Terrain Directory = 80-FF

???: 100-103

X Scale: 104-107
Y Scale: 108-10B
Z Scale: 10C-10F

Note: Changing scale seems to affect the world's edge boundaries


??? (Seems to crash when changed): 110-113 & 114-117

Textures X Scale: 120-123
Textures Y Scale: 124-127

??? (Usually alawys FF FF FF FF): 130-133

Some Kind Of Listing....?: 14C-???

 

 


Foyer Hot Spot (cFoyerHotSpot)
XYZ = 58-63

 

Spot #: 68-6B

 


Water Sheet (cWaterSheet)

1F8 long

 

Layer: 24-27

 

Texture Directory: 58-80

Reflection Texture Directory: D8-157

(leave blank if no reflection)

 

Location X: 158-15B

Location Y: 15C-15F

Location Z: 160-163

 

Rotation 1: 164-167

Rotation 2: 168-16B

Rotation 3: 16C-16F

Rotation 4: 170-173

 

 


The Sea (cSea)

 

Layer: 24-27

 

Label:  28-3F

 

Binding(?) = 40-57

 

 

Height: 170-173

 

Rise & Lower Magnitude: 174-177

 

Fade Out Distance: 178-17B

 

RGBS Tint: 17C-17F

(used for things like evening on Sandy Bay for example, S = Strength)

 

Material: 70-?

(can either be a .mip, although you refer to it as .tga or

.ifl which is a text file with a list of textures (aka animated))

 

Steam (cSteamPoint)

Layer: 24-27

(untested, but most likely)

Location: 58-6C

Rotation: 64-73

(untested, but most likely)

 

Colour: 74-77

 

(I believe there might be more to this section, but there will be a lot of trialing to do)

 

Kill Box (cKillBox)

6F in length

Layer = 24-27
 

Label = 28-3F

 

Binding(?) = 40-57

Location: 58-63

???: 64-67

Box Size: 68-6B

???: 6C-6F
 



Kill Sphere (cKillSphere)

67 in length

Layer = 24-27

 

Label = 28-3F

 

Binding(?) = 40-57


Location: 58-63

Sphere Size: 64-67

 

 

 


Sky Boxes (cSkyBox)

Length: 90

 

Layer: 24-27

 

Label:  28-3F

 

Binding(?) = 40-57

 

Model Directory: 58-?(D7?)

 

 


World Rain (cWorldRain)

Length: 5C

 

Layer: 24-27

 

 


World Snow (cWorldSnow)

Length: 60

 

Layer: 24-27

 

 

 


World Properties (cWorldProperties)

Length: 5C

 

Gravity: 5A-5B

(Default: -19 float)

 

 

 


Sounds (cSound)

Layer: 24-27

 

Label:  28-3F

 

Binding(?) = 40-57

 

Object of attachement: 58-6F(?)

(see label under objects)

 

Sound Path: 88-?

 

Fade In: 13C-13F

The point between the outter rim (max distance) and 100% volume.

http://i952.photobucket.com/albums/ae10/Segatendo/LR2/OMBGcSoundFADEIN_zpsvzhsz2to.png

 

Maximum Audible Distance: 140-143

 

 


Minifig (cMiniFig)

Length: 78

 

Layer: 24-27

 

Label:  28-3F

 

Binding(?) = 40-57

 

Minifigure: 58

(range: 00-36)

Spoiler

 

    00 - Alexa

    01 - Rocket Racer

    02 - Mike the Postman

    03 - Fireman Gavin

    04 - PC Bobby

    05 - Doctor Dave

    06 - Nurse Nikki

    07 - Fisherman

    08 - Workman Rob

    09 - Workman Fred

    0A - Workman Jon

    0B - Captain Geoff

    0C - Beach Babe 1

    0D - Beach Babe 2

    0E - Beach Babe 3

    0F - Beach Dude

    10 - Generic Male 1

    11 - Generic Male 2

    12 - Generic Male 3

    13 - Generic Female 1

    14 - Generic Female 2

    15 - Generic Female 3

    16 - Tony the Coastguard

    17 - ??? (Some Unused Mars Guy)

    18 - BB

    19 - Foreman Stu

    1A - Frosty

    1B - Chilly

    1C - Captain Ross

    1D - Crystal

    1E - Doc (Arctic)

    1F - Cosmo

    20 - Sparky

    21 - Slyboots

    22 - Achu

    23 - Morat

    24 - Bungo

    25 - Alexa (again!?)

    26 - Mike

    27 - Professor Voltage

    28 - Johnny Thunder

    29 - Pippin

    2A - Altair

    2B - Antares

    2C - Cassaopea

    2D - Riegel

    2E - Scientist

    2F - Vega

    30 - Duster

    31 - Snake

    32 - Ghost

    33 - Lightor

    34 - Warrior

    35 - Freeze

    36 - Chill

 

Location of minifig: 5C-67

Rotation of minifig: 68-77

 

 


Script Trigger (cScriptTrigger)

Length: 16C

 

Layer: 24-27

 

Label:  28-3F

 

Binding(?) = 40-57

 

Location of trigger: 58-63

 

Triggerable Distance: 64-67

 

Directory of 1st script: 68-E7

Directory of 2nd script: E8-167

 

???: 168-16B

 

 

O.T. Perhaps this info could be a start to someone making a tool?
Edited by Xir
Added note into cLegoTerrain

Share this post


Link to post
Share on other sites
JrMasterModelBuilder

This is some great info! Keep up the good work!

Share this post


Link to post
Share on other sites
WillKirkby

I think I've cracked some pretty sick stuff to do with the binary format of this file. Will update tomorrow. 

Basically:

struct wrl_file_t {
  char magic[4]; // 'R','C','2','W'
  int32 unknown; // always 0xB, maybe version?
  entity_t entities[]; // keep reading these until eof
}
struct entity_t{
  char type_id[28];
  int32 unknown1;
  int32 length;
  byte data[length];
  // data consists of: int32 unknown2, char name[48], and then (length - 52) bytes of actual payload data.
}

Share this post


Link to post
Share on other sites
JimbobJeffers

^ Man, that is puketastic. :D

 

This all looks very exciting, I can't wait to see how people play around with it.

Share this post


Link to post
Share on other sites
Mysteli

I would just like to state that I've made great progress on checkpoints. We are finally able to make 100% custom checkpoints.

Share this post


Link to post
Share on other sites
KevinVG207

I would just like to state that I've made great progress on checkpoints. We are finally able to make 100% custom checkpoints.

http://youtu.be/gWHhNUAjX3w

Awesome! I'm working on my own custom stuff. I'll try making some kind of program making this easy. But I need to find a way of editing HEX Files in Visual Studio 2014.

http://youtu.be/PDTYj1fWYCg

 

Tested some stuff. Thanks very much Xiron!

 

-Custom Intro Movie (Actually never looked at tutorials for that)

-Custom Menu Music (Thanks Xiron!)

-Custom Object placed (Once again, thanks Xiron!)

-Custom Grass Texture (You know who to thank by now)

 

:D

Share this post


Link to post
Share on other sites
Mysteli

Awesome! I'm working on my own custom stuff. I'll try making some kind of program making this easy. But I need to find a way of editing HEX Files in Visual Studio 2014.

Tested some stuff. Thanks very much Xiron!

No luck with figuring out how to do that at all huh? Well that's too bad. Maybe some programer around here knows how to go about doing this? Actually, before saying that, what language in VS2014 were you planning to write in?

 

Hehe, you're welcome! I knew not replying to this right away would pay off! :P

Share this post


Link to post
Share on other sites
Mysteli

1000 lines have been reached in the post! =D

 

Recent additions have been Fireworks, Terrain, and few other things that was too long ago to remember that I secretly added, plus some other misc changes have also been done.
 
As a milestone, have a fun little video I made on my recent experimenting with the Terrain.
https://www.youtube.com/watch?v=BspitN8JFak

Share this post


Link to post
Share on other sites
Shadowblaze

As a milestone, have a fun little video I made on my recent expirimenting with the Terrain.

 

Haha, nice video! Too bad the occlusion messes with the rendering. What happens if you delete the occlusion data?

Share this post


Link to post
Share on other sites
Mysteli

What happens if you delete the occlusion data?

Well I tried it on both the broken terrarin, and the unmodifed terrain, and both produce the same result: Nothing. Not even a crash. I would say the file does nothing, but then when I put the file from another world into the folder stuff happens, so I can't say that.

Share this post


Link to post
Share on other sites
Mysteli

Random fact noted: If a OBMGcLegoTerrain is in the world the game has a hard limit of 518 (or -518 if opposite side) in each direction of the map except vertical before it automatically kills (respawns) you. Meaning you can go [-]517.9999 and you won't respawn, but [-]518 or higher and you will. These numbers are in float. 517.9999 in Little Endian hexadecimal (what LR2 uses) is FE7F0144, and 518 is 00800144.

What I'm not sure about yet is if these boundary numbers are set in the file itself, or if the game automatically detects if a terrain is in play. I've gone and checked both a TerraData.tdf, the LegoTerrain in the WRL, as well as LR2's executable and I found no traces of the 517.9999 or 518 values in LR2's Little Endian terms. For extra noting all worlds are the same dimensions.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.