Reverse Engineering Lugaru assets

The place to discuss all things Lugaru.
User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Thu May 29, 2008 10:08 am

Just uploaded X2Solid.0.2.zip. I fixed the texture mapping.

ZIP comment:

Code: Select all

X2Solid converter bytecode v0.2 2008-05-29 rudel_ic

Converts specific .X files
to David Rosen's .SOLID format,
as featured in
Lugaru - The Rabbit's Foot (c) Wolfire Software.

You need Java to use this.

Changes: UV mapping has been fixed, read the forums for detailed instructions (URL below)

Windows users:
You can drag 'n drop multiple .X files onto the batch file
DRAG_X_FILES_HERE.bat
if the batch file and .class files are in the same directory.

Do NOT rename DRAG_X_FILES_HERE.bat, as tempted as you may be.

Whitespace in paths and filenames is not a problem.

Command line invocation:
java -cp . X2Solid INPUT_FILENAME

If the INPUT_FILENAME contains whitespace, you need to use double quotes.

For detailed instructions, consult http://wolfire.com/forums

Thanks: David, zip, Makrond, Count Roland
Available at http://lugaruspace.50megs.com/tools

Edit: You can find the detailed instructions for the UV mapping quirky workaround here.

Have fun!

Nuky
Plutonium Handler
Posts: 732
Joined: Mon Aug 15, 2005 5:34 am

Post by Nuky » Sun Jun 01, 2008 2:41 am

Wow. Just wow. I didn't expect something to happen this quick!

This is interesting. I may have to re-plan the whole campaign, now. ;P
Definitely worth a try some time. Awesome, guys! =D
(No, seriously: Awesome!)


(Oh, and Roland, that's probably your browser that automatically opens all downloads. The extractor itself is mostly UI-less and automatic. =P)

WingedWolf93
Posts: 110
Joined: Tue Jan 15, 2008 10:59 am

Post by WingedWolf93 » Mon Jun 02, 2008 5:19 am

Hey, i was thinking that Lugaru actually someday may have a level editor.
That would actually make the editing much more easier. Could that be possible?

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Mon Jun 02, 2008 8:20 am

It's not impossible.
You just have to find out what data a level consists of, then figure out which data is where in a level file and how it's represented.
Then you can generate such data.

It's just very difficult.

I've thought about this for some time and I've already taken some steps towards cracking the level file structure, but this is all pretty premature at this point.

Think about it though: Everything that can be unique to a level has to be saved in it.
That includes all objects' locations, rotations, sizes, character placement, clothing, weaponry, paths, sky coloring, ...
My way to analyze it so far has been gathering data that is saved for a level.
There's lots to do beyond that, so it's a long way to go. I may not get anywhere with it.

Also, this is just a hobby. That didn't stop me from figuring out the .solid file structure, but since the level file structure is that much more complicated, I can't make any promises at all. So I won't.

But I'm not the only person with internet access that cracks proprietary binary formats. Maybe someone else with more experience steps in.

Nuky
Plutonium Handler
Posts: 732
Joined: Mon Aug 15, 2005 5:34 am

Post by Nuky » Mon Jun 02, 2008 10:59 am

Does that mean each level could have its own set of (refered) objects? Such as hacking the level file to point to something.solid instead of box.solid?

Think it would crash if you'd have more objects in it, though? =P

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Mon Jun 02, 2008 11:12 am

My guess is a level doesn't contain references to solid filenames, but instead indices pointing to solid structures in an array or something like that. Then you wouldn't be able to have a solid set for each level.
This guess is based on the observation that there are no solid model strings in a level file.

But clothing textures are referenced by their path, apparently, so you at least would be able to make clothing textures for each level.

Nuky
Plutonium Handler
Posts: 732
Joined: Mon Aug 15, 2005 5:34 am

Post by Nuky » Mon Jun 02, 2008 2:38 pm

Well, that's already possible. =P

zip
lugaruguru
Posts: 1820
Joined: Mon Jan 26, 2004 12:39 pm
Location: USA, Missouri
Contact:

Post by zip » Tue Jun 03, 2008 5:05 pm

AFAIK the map just uses the index of each object type, each index is hard coded to load a specific .solid, but.. obviously nothing is stopping you from changing the content of that file as long as you keep the name the same.

There was a level editor under way. We were able to change most of the global level settings(NPC hostility, sky color) and I think a few things about the player. For a brief period I believe we were able to load and modify objects(obviously the main attraction) but then the map format changed and we were unable to continue.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Thu Jun 26, 2008 11:40 pm

I am thinking of releasing the source code for X2Solid. Doing so would require further work though (see below).

The sourcecode would end up as an open source SourceForge project so that anybody could improve or enhance it.

But I need to know whether or not people will participate. If there's no interest, there's no need for this.

Releasing the sourcecode as open source means
- polishing the code
- commenting the code
- providing dev and user documentation
- project administration
- setting up all the SourceForge jazz
- other stuff I haven't thought of

I'm kind of busy in general, but these basic things I can do.

Hit me with your thoughts about this.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Reverse Engineering Lugaru assets

Post by rudel_ic » Sat Oct 18, 2008 11:40 pm

It may be possible to modify wolves / rabbits easily after all. I made a mistake with charset encoding which lead to the false assumption that importing Ws/Rs straight-forward doesn't work.

Look at this sucker:
Image

That's the directly-imported Body.solid from the Lugaru Models folder.

I'm in the process of enabling X export of imported .solids - once that is done, you can modify Turner in Blender and other programs that support the X format.

The tool you can see there is a modding tool for Lugaru 1. There are diverse things I want to implement, but I'll keep the list of planned features to myself for the time being.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Reverse Engineering Lugaru assets

Post by rudel_ic » Sun Oct 19, 2008 12:39 am

Image

Download Blender project with Turner in it (zipped): http://lugaruspace.50megs.com/blends/

Turner (c) Wolfire Software!

Edit: Exporting this one from Blender to X and then converting it to solid doesn't work right now, so there's some trick to it that I haven't figured out yet. The game runs, but Turner is invisible.
Possible candidates: Scale issues, CW/CCW confusion, indexing mixup.

User avatar
Jendraz
Posts: 640
Joined: Mon Nov 12, 2007 6:55 pm
Location: Los Angeles
Contact:

Re: Reverse Engineering Lugaru assets

Post by Jendraz » Sun Oct 19, 2008 1:31 am

Very cool. This is past me though.

User avatar
Count Roland
Posts: 2937
Joined: Tue Sep 25, 2007 11:15 pm
Location: Galapagos Islands, rodeoin some turtles.
Contact:

Re: Reverse Engineering Lugaru assets

Post by Count Roland » Sun Oct 19, 2008 3:30 am

wow I was totally wondering when the next update was coming along and than, bam!

User avatar
Lotus Wolf
Posts: 2218
Joined: Sun Aug 31, 2008 6:03 pm

Re: Reverse Engineering Lugaru assets

Post by Lotus Wolf » Sun Oct 19, 2008 12:02 pm

Have you tried enlarging them in-game, using the console, and Proportions <# # #>? That would at least tell you if it was a size issue.

Just trying to be helpful. :)

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Re: Reverse Engineering Lugaru assets

Post by rudel_ic » Sun Oct 19, 2008 5:40 pm

There's something else that causes this. The scale is wrong anyway, but that's not why the mesh is invisible. In fact, it is not too small, but too big.

This one will have to wait though. There are more interesting and rewarding things to do.

Post Reply