Oddworld Forums

Oddworld Forums (http://www.oddworldforums.net/index.php)
-   Oddworld Mods & Hacks (http://www.oddworldforums.net/forumdisplay.php?f=24)
-   -   .lvl files (http://www.oddworldforums.net/showthread.php?t=15680)

Namida 02-22-2010 10:39 PM

That is a good example, but shouldn't decoding the PC files be a higher priority? (At least the sprites, so that even if not perfect and not compatible with the original game, some kind of editable remake is possible)

While there are sprite rips, they're all either low quality or missing some sprites (such as the ones earlier on this topic)...

ThibG 02-23-2010 02:10 AM

Namida, noone's trying to stop you from reverse-engineering the Anim format ;)

Ridg3 02-23-2010 03:25 AM

Was just looking through, Paul...you have some fantastic work done. I was just wondering if you could possibly round up all the tools (AO) in one zip folder for me please.

Namida 02-23-2010 03:49 AM

:

()
Namida, noone's trying to stop you from reverse-engineering the Anim format ;)

I'm not exactly known for being good with *graphic* formats... although I don't see why I can't give it a try. Any existing information, Paul? (Just a tip... I don't know C/C++. At all. I know the concepts of bits, bytes, hex editors, etc, and the general idea of programming, just not C specifically.)

ThibG 02-23-2010 04:03 AM

Namida, I, personnaly, am working with AE, PC version.
You can have a look at my tools and doc (http://hg.sitedethib.com/oddworld-formats/), and try to find how the Anim format works.
However, according to Paul (who've lost is work about this), there are several "types" of this format. I think that as well since UXB uses an external colour palette.
Sprites themselves could be simple bitmaps, use some RLE encoding, or even MDEC. Have fun :)

Paul 02-23-2010 09:47 AM

:

()
Was just looking through, Paul...you have some fantastic work done. I was just wondering if you could possibly round up all the tools (AO) in one zip folder for me please.

They're all in this thread somewhere ;) However I'd wait a few weeks until I update my GUI tool to replace cam images if thats what you're after...

As for the translation stuff that could be possible although I won't be doing that since my goal is a completely new engine based on ALIVE.

The reason I'm looking at the PS1 version is because the PC version is a horrible hacked up version of the PS1 code. Looks like they couldn't get MDEC decompression working in the first game so they just fudged it by using raw 16 bit images.

If anyone can understand the how the AO's VB sounds are constructed from the VH that would be cool, it looks like they kept the same as PS1 info but the stuff in the VB is not the same :(

If I had sounds and music I would start working on writing a new engine :)

Edit: Btw those "low quality sprites" are the real/actual sprites the game uses.

Also here is the path script for the first couple of screens:

------------ + R1P15C15

load_hosit_rocks
load_portals
load_mud
load_null_1
load_hosit_rocks
load_hosit_rocks
load_switch_bans
load_trap_bans
load_null_35
load_slig_bans
load_hosit_rocks
load_null_2
load_slig_bans2
load_slig_bans2_proxy
load_glow_bans
load_glow_bans
load_glow_bans
-----------------------------
load_null1
load_hosit_rocks
load_hosit_rocks
load_switch_bans
load_hosit_rocks
load_unknown_bans1
load_mud
load_unknown_Bans1
load_hosit_rocks
load_unknown8
load_switch_Bans
load_null_35
load_meat_saw
load_meat_saw
load_meat_saw
load_unknown_11
load_unknown_4
load_glow_bans
load_mud
---------------------------------- - R1P15C15 + R1P15C16

load_hosit_rocks
load_portals
load_mud
load_null_1
load_hosit_rocks
load_hosit_rocks
load_switch_Bans
load_trap_bans
load_null_35
load_slig_bans
load_hosit_rocks
load_null_2
load_slig_bans2
load_slig_bans2_proxy
load_glow_bans
load_glow_bans
load_glow_bans
----------------- - + R1P15C16

The names are functions, I've created these names myself by looking at what each function does.. can't see where its getting the placement info or linking up switches or anything either.

mlg man 02-24-2010 02:56 AM

If anyones interetested, i have a ton of values for exoddus and oddysee. By values i mean like x or y position of abe, scrab, paramite, mudokon, doors, levers, orbs. And so on... Its pretty handy, the values i found corrospond to the object on the current page, only. If you go to the next page, the program automaticly changes the address. Using pointers of course. I can even open any door. Change colors of all sprites, health, emotion (Muds), and size. Heres a bit of the file (For Cheat Engine, amazing program.), only some of the values, i have included. Its strange because scrabs, orbs, particles, and levers and doors use the same pointer. They probobly use some kind of identifier. Here is exoddus file. Still working on oddysee. Its funny, because all i have to do is change the pointers. Addresses for x and y are in the same offset. Goes to show how Exoddus was built on top of oddysee. What terrible coders.

ThibG 02-24-2010 07:41 AM

Paul, so you've been playing with the Path files? Could you document the structure you've understood so far? Have you checked if it's the same format in AE?

mlg man 02-26-2010 02:00 AM

ThibG, I was wondering how do you run the python scripts you made? How can i edit the fg1 files and stuff. It would be realy cool to know.

ThibG 02-26-2010 06:06 AM

mlg man, well, this is not really a set of scripts, but a python module to handle Oddworld files. The only script here is extract_files.py, which lets you:
1°) List the content of an Indx archive (./extract_files.py l file.lvl)
2°) Extract the content of an Indx archive (./extract_files.py x file.lvl)
3°) Rebuild an Indx archive from an existing one (./extract_files.py r file.lvl).
4°) Build a modified Indx archive from an existing one (./extract_files.py ir file.lvl). It'll bring a python console in order for you to alter the content of the archive (presented to you as python objects).

But in order for you to do interesting things with the oddworld_formats module, you'll need to know python (well, it really isn't an hard language, if you don't. Finding some tutorial around the web shouldn't be that hard).

Oh, and it needs python 3, not python 2.x, as it uses, along with other things, the bytes object to handle binary data.

Edit: the oddworld_formats module should be pretty well documented, but if you have any question, don't hesitate to ask ;)

Paul 02-26-2010 11:59 AM

:

()
Paul, so you've been playing with the Path files? Could you document the structure you've understood so far? Have you checked if it's the same format in AE?

Not sure if its the same, basically its:

1. Go to hard coded offset (always near the end of the path file names)
2. There will be a DWORD, add this to the start of the file
3. At this new location load the next DWORD
4. Add this DWORD to the start of the file
5. The data here is specific to whatever is at the offset identified by 3

By the way Anim files work in a similar way.

ThibG 02-26-2010 12:21 PM

You mean there is some sort of table to "function calls", where each cell is one DWORD long, and points to a function identifier followed by some arguments?

mlg man 02-26-2010 12:58 PM

I Dont know if this helps. But I downloaded the exoddus demo (I have the full game but wanted a smaller test file). and edited the path and changed every 00 01 (256) to 00 02 (512) Then it started screwing things up. Example: ledges were reveresed, doors were already open, doors would go to different locations. And every time you walking on to a ledge you would die. Its weird cause abe just freezes and dies.

Paul 02-28-2010 01:51 PM

:

()
You mean there is some sort of table to "function calls", where each cell is one DWORD long, and points to a function identifier followed by some arguments?

Yes, but also I think each DWord in the path relates to the index of the function pointer table. Also the func args appear to always be the same, I think its:

-an int that has a magic meaning, the game always checks it for 2 or 4.
-a pointer to the current file location in the path
-a pointer to a global class that contains all kinds of stuff

Werid thing is that load_mud wont appear to load any data from the file pointer for location / is it scrubber / native / etc.. it knows this info by checking members in the global class pointer.

So I assume at the level load it somehow prepopulates this information

Paul 03-04-2010 09:52 AM

If anyones trying to decode paths this is how the screen "array" is laid out in the first path.

http://i48.tinypic.com/4jp15h.jpg

When I get time I'm going to doc all the offsets and function calls for each screen in an attempt to figure the format out.

mlg man 03-10-2010 11:59 PM

picture is too small, have a bigger one?

Paul 03-13-2010 04:32 PM

Try this.

mlg man 03-22-2010 03:43 AM

Any progress with the .lvl editor program?

NovaMan 03-22-2010 12:56 PM

:

()
Any progress with the .lvl editor program?

Don't worry how long time it will take, it can take many years, who know?

Paul 03-22-2010 03:15 PM

:

()
Any progress with the .lvl editor program?

Nope I left it a while back, lost interest really and don't have a lot of free time.

Grieva 03-22-2010 04:17 PM

http://www.blogcdn.com/nintendo.joys...ooooooo_sm.jpg

Well, thats a shame :(

Paul 03-22-2010 04:40 PM

I'll prob make another version.. it will just be a long time before I come back around to it.

mlg man 03-24-2010 05:41 AM

it would help if you gave out the source code, i have been learning a bit of computer language and are just a beginner, i would like to help and learn from the code, it really interests me. Even if you just pm me a link to it, that would be cool. Only do so if you want to.

Jango 03-24-2010 07:50 AM

Yeah, it really is, a level editor would be amazing. :)

Very well done for giving it a go!

Jango 03-27-2010 05:01 AM

What is the problem with making a .lvl editor? How far have you got with making it? Why can't Oddworld Inhabitants make one?

MeechMunchie 03-27-2010 05:56 AM

Game code is complicated, and the A.L.I.V.E. engine in particular is very inflexible.

Not very far. We can swap backgrounds and edit object placement, screw up sounds and emulate some behaviours.

Because OWI barely exist any more.

Jango 03-27-2010 06:00 AM

Right, OK, I see.

Thanks for your reply.

EDIT: Why can't we get the game codes from OWI? Surely they don't care for them anymore with a 12 and-a-half year old game...

Varrok 03-27-2010 01:26 PM

Um... they DO care... publishing the source code is like... giving game for free...

Phylum 03-27-2010 04:12 PM

Also it would be, as stated several times in this thread and others, nearly pointless. The ALIVE engine has the versatility of a bread factory without those bread making things...

God I suck at metaphors today...

Jango 03-28-2010 04:46 AM

How come SligStorm got close to making a level editor five years ago then?

Surely a very simple level editor would not be so hard?