Jump to content

Gdb


SeppleBebo
 Share

Recommended Posts

  • 1 month later...

*insert Yahoo! name being said from their old commercials* Very good work! You are one step closer to cracking the (race track) code! Keep up the good work!

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Youtube brought me here.

I want to say thats completely amazing. Origamiguy has done an awesome job on craking the GDB files. I have been playing this game from my childhood and never thought that someday it would be moddable. I want to thank all of the members here for keeping the game alive. :)

Link to comment
Share on other sites

On iPod right now can't talk much.

Even though all GDB can be read now, you haven't all of them. You forgot the demo.

The intros on the demo on not avi files. They are actually 3d models that the game renders on each load. The audio are run ( rather vox) files that are the same as everything else. I opened the demo .JAM and there are folders inside it with the same names as the intro audio. I opened some GDB files with the viewer and they opened but didn't look good at all. I think there are even RR and VV models in there too. I opened VV but I couldn't find her. I think this would be cool to mod too. Yes it's the demo but if we can view (and perhaps mod) the full version, then we should be able to mid the demo. If you don't already have it here is a link:

http://www.fileplanet.com/34632/30000/fileinfo/Lego-Racers

That is just a self extracting exe. You don't have to install it. Just follow the lr FAQ on here and it will work. I've done that myself. Of course you can install it if you want. I'm just thinking that if you uninstall one of them it breaker the other. At least that's what happened to me.

Link to comment
Share on other sites

  • 11 months later...

Just to pull a topic out of it's death...

I'm new to this forums and I must say i'm impressed at how far you guy's are in cracking the games code.

Since I'm an computer science student and have quite some experience with c#, i might be able to help origami guy on GDB files. I've actually been able to reconstruct the PWB layout myself, with help of origamiguy his documentation.

Fact is that I'm missing the documentation for the GDB files. I do have the bytes of the file, but i see no pattern in it or what byte means what.

Hopefully I can help!

Link to comment
Share on other sites

I've actually been able to reconstruct the PWB layout myself, with help of origamiguy his documentation.

I'm sorry, does that mean, you've written a reconverter for the PWB files?

Link to comment
Share on other sites

I've actually been able to reconstruct the PWB layout myself, with help of origamiguy his documentation.

I'm sorry, does that mean, you've written a reconverter for the PWB files?

Oh no don't take me wrong! I was talking about opening a pwb via a byte stream, recognizing the pattern in a pwb file, and being able to see how power up blocks possibly could be added. I have not in fact added block (tho i think this is pretty easy and if im right has been done by origmaiguy already)

Link to comment
Share on other sites

Welcome to RRU! I'm le717, a starting programmer (and when I say starting, I mean just starting. :P) I envy your avatar. I was planning on buying that guy the other day, but the store was sold out. ;P

I found the GDB documentation link, but origamiguy said a while back that it is outdated. You'll need to ask him for the most recent info. However, I'll link it anyway. ;)

http://will.loadingchunks.net/rru/lr1/gdb/

Oh no don't take me wrong! I was talking about opening a pwb via a byte stream, recognizing the pattern in a pwb file, and being able to see how power up blocks possibly could be added. I have not in fact added block (tho i think this is pretty easy and if im right has been done by origmaiguy already)

I believe it is possible. Cyrem, our mighty founder, has written a PWB Converter using the PWB documentation, but it currently has a bug, and because origami has a Universal Recompiler in his head, it has never been fixed. If you feel up to it, you might be able to use that to help you with the PWB files. ;)

Link to comment
Share on other sites

Hey le717! I put much time into finding a over the top awesome avatar which fits the occasion! I found this one ;)

Anyways, at the moment I'm exploring the possibilities of a simple tool to add power up blocks to the game. I'll get back on this asap!

The documentation of the GDB is very welcome and I'll most certainly take a look into that when I'm done with the blocks tool!

  • Like 3
Link to comment
Share on other sites

Anyways, at the moment I'm exploring the possibilities of a simple tool to add power up blocks to the game.

That sounds great, thank you! :) Will said tool also include the possibility of changing the colour of power up bricks already existing?

Link to comment
Share on other sites

Anyways, at the moment I'm exploring the possibilities of a simple tool to add power up blocks to the game.

That sounds great, thank you! :) Will said tool also include the possibility of changing the colour of power up bricks already existing?

when the tool primarily works, this will be very simple to implement yes

Link to comment
Share on other sites

As le717 rightly pointed out, that documentation is horribly out of date. I'll document my current understanding soon. I'll cover the generic binary structure used by a lot of the game files, as well as the specifics of GDB. I'm in the middle of exam and assignment stress, so give me a week or so :)

Link to comment
Share on other sites

Will this result in the ability for someone to create a converter which converts the track into a editable model file (ex. 3ds, obj, x etc.) and back? Would be great if we can add more details to the track.

Link to comment
Share on other sites

As le717 rightly pointed out, that documentation is horribly out of date. I'll document my current understanding soon. I'll cover the generic binary structure used by a lot of the game files, as well as the specifics of GDB. I'm in the middle of exam and assignment stress, so give me a week or so :)

Great! I'll hang on :)

Will this result in the ability for someone to create a converter which converts the track into a editable model file (ex. 3ds, obj, x etc.) and back? Would be great if we can add more details to the track.

Almost everything is possible, the question is whether or not converting it to a 3D model is the best solution. I have absolutely no clue of how a 3ds file is structured, so I would need to learn that first...

Link to comment
Share on other sites

JrMasterModelBuilder

As le717 rightly pointed out, that documentation is horribly out of date. I'll document my current understanding soon. I'll cover the generic binary structure used by a lot of the game files, as well as the specifics of GDB. I'm in the middle of exam and assignment stress, so give me a week or so :)

Great! I'll hang on :)

Will this result in the ability for someone to create a converter which converts the track into a editable model file (ex. 3ds, obj, x etc.) and back? Would be great if we can add more details to the track.

Almost everything is possible, the question is whether or not converting it to a 3D model is the best solution. I have absolutely no clue of how a 3ds file is structured, so I would need to learn that first...

There's an SDK of some kind that comes with 3DSMax, but I'd recommend using an easier and more open format like OBJ.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...
polipo100

Quasi tutto è possibile, la questione è se convertirlo in un modello 3D è la soluzione migliore. Non ho assolutamente idea di come un file 3ds è strutturato, quindi avrei bisogno di sapere che prima ...

 

3ds max export also .ase file, i think that is easier convert that kind of extension!

 

i used .ase file to convert levels for another game

Link to comment
Share on other sites

  • 4 months later...

Guys, can we change a gdb without using the binary editor of origamiguy? With like a visual editor, uh?

I'm pretty sure the GDB files are coded a lot differently to 3D object files, so probably not :/

Link to comment
Share on other sites

  • 7 months later...

Will Kirkby! You still around on this forums?

 

Did you ever get around of creating a save method for GDB files? ;)

Link to comment
Share on other sites

  • 5 months later...

I had a little play around with the GDB files today and have some research to document. Some may already be known and some may not, I'm just putting down everything I discovered. Before I continue, I'd like to give a big thanks to WillKirkby - who no LR modder here can thank enough - for his >Binary File Editor.

 

 


 

1. Jumbo Racers

 

Of all the various GDB part files I went through, both in GAMEDATA and MENUDATA, every one has a scale variable near the top. Based on the files I've examined this number is always 0.015625. That is the scale LEGO Racers uses, for its figures and their individual parts at least. To clarify: this is a scale, not a size, which is why all parts and figures use it no matter their size.

 

I played around with this is a little, bumping up the values to 0.2.

 

gallery_5738_275_105070.png

 

gallery_5738_275_11170.png

 

The figures don't count for hit testing; they pass right through ceilings and such. Hence the hitbox for a racer doesn't count its driver, only the car.

 

Also, this could be quite handy for people testing out custom textures or (hopefully in future) models, as I found when trying out things later.

 

 


 

2. High-Poly Models

 

I'm sure this is a long-desired feature. I attempted to replace Captain Redbeard's in-game head with a menu head, and this resulted in the following:

 

gallery_5738_275_94865.png

 

Unfortunately, however, I also discovered that the developers were rather lazy (or clever, depending on how you look at it).

 

gallery_5738_275_67437.png

 

The menu models don't have backs. That, or I made a pretty big mistake. So I guess high-poly models will require a little more work.

 

 


 

3. GDB Sections

 

Here's some notes I wrote down on the GDB files. They may or may not be clear as they are brief notes I made to myself.


[135]
^This is how many entries there are in the following section. A single entry can contain multiple lines, e.g. in the K_2A section one entry has nine lines:
(float)-31.3431
(float)62.04894
(float)-0.922284
(float)0.977
(float)0.023
(byte)119
(byte)119
(byte)119
(byte)255
If the number in square brackets does not match the amount of entries in the following section, the game will load fine but crash when entering the specific race. Note that in the Indices section three bytes make one entry.
 
BONE ID
This is just guesswork based on a few tests, but I think that the following Bone IDs relate to the following parts:
0 - Legs
1 - Front chest
2 - Left Arm
3 - Right Arm
5 - Hat, possibly head too
 
Each segment is arranged as follows:
k_32    // Bone ID
(ushort)3
k_31    // Vertices Range
(byte)0
(ushort)91
(ushort)20
k_2D    // Indices Range
(ushort)67
(ushort)24
The ushort variables in the Vertices and Indices Ranges use two numbers - the first is the first entry number to use (see above), and the second is the number of entries to use after it. It's not the first and last entries to use.

 

 

One modding request for LEGO Racers has often been to change individual parts of an opponent racer. Here are my initial attempts to copy Rocket Racer's entire GDB over to Redbeard's while maintaining textures and such.
 
Vertices Only - Messed up. Very messed up.

gallery_5738_275_135168.png

 
Vertices and Indices - There's some form in it now. Except Redbeard has a huge spike out of his head and a beak (which I believe to be the legs).

gallery_5738_275_71659.png

 
All Three - Voila! Rocket Racer with Redbeard's textures.

gallery_5738_275_83506.png

 
Of course, the final part of that is pretty much the same as simply renaming RRPELVIS.GDB to CRPELVIS.GDB. I was just playing around, and this also showed me that it might be possible to edit individual parts.
 
 

 
4. Modding Individual Parts
 
The final step! Here I tried to copy across Rocket Racer's helmet alone. The results:
 

gallery_5738_275_45007.png

 
Not quite there, but from the back it looks better. I must have missed out some entries or something, or perhaps didn't do all the Bones. But it shows that it is definitely possible to edit - and even create from scratch - individual parts of a racer. You could easily have a standard Rocket Racer with a storm cloud flying above his head. However, with the current method of modification being restricted to text-based editing, this is very difficult.
 
 

 
And there you have it! A little documentation of my GDB experiments today. As usual, I completely forgot about eating lunch as I got so wrapped up in this. I best be off.
  • Like 3
Link to comment
Share on other sites

 

Unfortunately, however, I also discovered that the developers were rather lazy (or clever, depending on how you look at it).

 

gallery_5738_275_67437.png

 

The menu models don't have backs. That, or I made a pretty big mistake. So I guess high-poly models will require a little more work.

 

 

Thats purposeful and the modellers were being clever. The Modellers knew that the Player wouldn't look behind the Menu's high Poly models and saved space by not including a behind to the model.

 

Other than that this is showing real progression in modding for LR

Link to comment
Share on other sites

Wow, those are some awesome discoveries you have made, Jimbob. Great job. :D

 

Thats purposeful and the modellers were being clever. The Modellers knew that the Player wouldn't look behind the Menu's high Poly models and saved space by not including a behind to the model.

 

Or, they just didn't want to waiste their time on something no one will be able to see in the game. That's why Jimbob wrote "depending on how you look at it". ;P

Link to comment
Share on other sites

 Share

×
×
  • 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.