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)

Paul 06-25-2007 06:44 AM

.lvl files
 
Has anyone figured these out before? From what I can tell..

http://wiki.xentax.com/index.php/Odd...es_Oddysee_LVL

this information is only partly correct, because after ABEEL.PAL there is more 2048bytes of null padding..

After messing about with ABEBLOW.BAN I managed to make the "meat explosion" of abe/muds no longer display..

In short im trying to read/parse .lvl files in the hope of creating some basic level editor

Zozo the Zrilufet 06-25-2007 06:59 AM

:fuzconf:....:)Can't help you there.

TTChopper 06-25-2007 07:05 AM

Ou em zei (OMG). If you do it, I gonna call you God.

And I copy what Zozo said: Can't help you there.

Paul 06-25-2007 09:15 AM

Well "Game Extractor" can extract the files, but as i mentioend about that one with the extra padding.. it means it only extracts the first 3 or so files correctly..
The .CAM files seem to contain the background images and the objects in that screen, each image appears to be split in half and each images real size seems to be 320x240, I was hoping some one else had some info? I can't believe no ones made a level editor or anything working towards that in all these years
I guess i'll try to make a tool to edit the archives

Xavier 06-25-2007 11:14 AM

Keep digging :D

sorry to go slightly off topic but did you managed to extract some background pictures?

Gretin 06-25-2007 11:24 AM

I second the motion XD I've tried to do this myself, for the same reason, but didn't have much luck, but it sounds like you've already made more progress than me, so here's hoping that you succeed in what you're doing!

And that reminds me, I never did send you those background pictures I'd got from the game, did I Xavier?

Paul 06-25-2007 11:50 AM

:

()
Keep digging :D

sorry to go slightly off topic but did you managed to extract some background pictures?

not yet, although if the textel layout in the .cam files is simlar to 15bit ps1 tim files it shouldnt be too hard to get them hopfully, since i know the size and im assuming they're 15bit tim style ( pretty sure they are in the ps1 version since if you look in the frame buffer you can see they dont use palletes, which is actually werid )

I'll write a hack into my app to extract the files and see if all the others follow the "standard" layout of the first few, then i can take a proper look at the .cam files

If you pause the game you'll see somthing like R1P15C02 at the bottom, this is actually the .cam file name for that screen ;)
heres the ones in S1.LVL

R1P15C01.CAM
R1P15C02.CAM
R1P15C03.CAM
R1P15C04.CAM
R1P15C05.CAM
R1P15C06.CAM
R1P15C07.CAM
R1P15C08.CAM
R1P15C09.CAM
R1P15C10.CAM
R1P15C11.CAM
R1P15C12.CAM
R1P15C13.CAM
R1P15C14.CAM
R1P15C15.CAM
R1P15C16.CAM
R1P15C17.CAM
R1P15C18.CAM
R1P15C19.CAM
R1P15C20.CAM
R1P16C01.CAM
R1P16C02.CAM
R1P16C03.CAM
R1P16C04.CAM
R1P16C05.CAM
R1P16C06.CAM
R1P16C07.CAM
R1P16C09.CAM
R1P16C10.CAM
R1P18C01.CAM
R1P18C02.CAM
R1P18C03.CAM
R1P18C04.CAM
R1P18C05.CAM
R1P18C06.CAM
R1P18C07.CAM
R1P18C09.CAM
R1P18C20.CAM
R1P18C10.CAM
R1P18C11.CAM
R1P19C01.CAM
R1P19C02.CAM
R1P19C03.CAM
R1P20C01.CAM
R1P20C02.CAM
R1P20C03.CAM
R1P20C04.CAM
R1P20C05.CAM
R1P20C06.CAM

Xavier 06-25-2007 12:02 PM

Heh can't wait to see some results and get my hands on those backgrounds. :D
If it's too much work to extract them all I'd gladly help.

Paul 06-25-2007 02:42 PM

So I finaly figured the "extra" unknown file attributes out and wrote a proper file extractor for .lvl files. Here it is for anyone that wants it, bear in mind this is just a little console app so make sure you use the readme.txt and use the .bat file for ease of use!
Now to figure out how to parse those .cam files.. i'll do that another day prolly since im bored now :p

ParamiteSurprise 06-26-2007 09:47 AM

About the .ban files... they're just total gibberish like !@"PR{WEROFSDFIA0342-1}... i dont get their coding {OPENED WITH NOTEPAD}

Paul 06-26-2007 12:05 PM

using a hex editor instead of notepad might be a good idea ;)
also yeah still lot more work required to do anything with them, the only thing you'll notice is the file header, usally starts with "Anim" "Font" "Bits" .. there may be some more that I didnt see yet, and of course the string "End!" at the end of the file..

im going to make a proper lvl archive editor so i can edit some .cam files and put them back into the lvl file to see the effect, basicly i want to edit a lot of the NULL's in S1P01C01.CAM and see if that changes the first first screen with the copywrite and such on it to mainly white (since rgb 0,0,0 = black and ff,ff,ff = white), then try to find the start of the image that way I guess :|

if you're good at debugging you can edit a few things to view info, i.e force the gpu lib to think the graphic is invalid so it will print its dimensions like so:

---------------------------
E:\Abe\PSXEmu\LIBGPU.C : 621
---------------------------
LoadImage: BAD RECT (930 362 30 150 (IMPORTANT NUMBERS)) !!!
---------------------------
OK
---------------------------

edit:

oh btw those are the info for the LCDFONT.FNT.. so its at 930,363 in the vram and the image size is 30x150
but in the font file the width byte is 0x78, i figured out the algorithm to get the real size from this.

1. Shift right by 2
2. and with 0xFE

The width 0x96 seems to be left intact..

ZaxXx 06-27-2007 03:43 AM

Wow... only a few more days/weeks and there will be level editor :)

Paul 06-27-2007 06:42 AM

maybe not THAT fast since even if I figure everything out work and such usally gets in the way, anyhow im not sure how the .cam files work im guessing the actuall map data is some where else a .cam files are ONLY graphics data.
The first cam file seesm to contain the background image AND a font :s which is the font the main menu, pause menu and when you goto load etc.
However the bitmaps are not in the format I expected them to be in, im currently clueless as to how they work at the moment, since the header is tagged "Bits" maybe they're bitplanes or some such.. but anyway after screwing with the cam file I managed to edit up the first screen to an ugly mess, basicly keept editing bytes from 0x00 to 0xFF to try to find the start and end of the image data in the file which worked.

Chubfish 06-27-2007 09:58 AM

Well I'm impressed, even though I don't have a clue about level editing or anything. Keep it going!

Paul 06-27-2007 03:30 PM

im not exactly the master or anything myself, I just want to figure out how to display the images within .cam files for now, still made no progress really :/

Zerox 06-28-2007 10:55 AM

Maybe SligStorm could help somehow?

Wow, this seems awesome, I hope it goes well. If you could (and would be totallyt awesome), as well as getting backgrounds, maybe if you could get the sprites outta there...yeah. Self explanatory. HOW LONG WE HAVE NEEDED TEH SPRITES OF ABE AND SCRABS AND STUFF 8D

Xavier 06-28-2007 11:00 AM

personally I'd love to have the background pictures files :D

Paul 06-28-2007 12:59 PM

The sprites will be a lot harder to reverse by the looks of things, they're way diffrent than the cam files, those are in .ban files with a ton of other info.
Currently im just trying to get the background images from the cam files, only breakthrough ive had is that the image seems to be in 16x240 strips of data, seems rather werid to do that, maybe the psx LoadImage() function works faster that way, I know the 2048 thing was because of the cdrom read buffer size..

Zerox 06-29-2007 10:56 AM

If you do it someday, then...you're my Odd Godd. Seriously, it would be, like...yeah. Holy s*it. The fact you even know anything about getting the sprites out of there is amazing.

Paul 06-30-2007 01:09 PM

well assuming most of the backgrounds are the same I know how to read those now, maybe the fonts too but ive not had much time.. maybe I can write another small app to convert them all to bitmaps
I'll post it in here whenever its done, even if it can't read/convert all of them, a few is better than none I guess.

Paul 06-30-2007 07:25 PM

So here it is, its very buggy and will only work on abes oddsey .cam files, the exouddus ones are in some other format or somthing I didnt have time to look into it..
Use the extractor to get all of the .cam files, then run this and you'll get a nother copy of the files in bmp format, also note that the oringal resoultion here is 640x240, the game scales the height up to 480 but you can use some image editing package to do that or somthing..

Xavier 07-01-2007 02:12 AM

Wow it works!

You sir are a genius!

Zerox 07-01-2007 04:57 AM

Wow. I don't have the pc version, though. Show us what you can do with it, Xavier. I'm most interested. As in very. Yeah. Do it. Get back to work. Boiler.

Xavier 07-01-2007 05:06 AM

I extracted all the files in bmp format :)
here is another one...

I'm planning to upload all of them on TOL pretty soon :D with credit to Paul of cource

Paul 07-01-2007 05:32 AM

Only problem is that objects arnt part of the backgrounds because they're sprites, e.g trap doors, meat grinders and so on.
Thats the next thing i'll prolly try to do anyway, figure out .ban files and get the sprites.

Xavier 07-01-2007 05:42 AM

Honestly I like the screens better without the sprites, but it could be usefull to have them indeed :)

If you could do a CAM converter for AE that would be awesome!

Paul 07-01-2007 05:50 AM

I'll give that ago after/if I get sprites working, did you say you converted ALL of the cam background files? Because I didnt test it with all of them.. also another reason why i'll try abes exoduss later is because my install is broken and i dont have the cd anymore ( I have a courrpt exe from where I was messing with somthing and a couple of .lvl files ).

Xavier 07-01-2007 06:01 AM

I can send you some files back if you want, I have both CD at my home and working very well.


Anyway guys here is what you have been waiting for and thanks to Paul we've finally got it:

http://oddworldlibrary.net/archives/togg/SS2/

Paul 07-01-2007 07:13 AM

Don't worry about it Xavier, I'll buy a new copy of the cd when I get some cash together ;)

Zerox 07-01-2007 08:13 AM

Awesomes. And some more awesome. And even more awesome.

When/if hopefully you do manage to get the sprites out, I am so making a comic with these, all credit given to you, Paul.
Maybe a more informative name than merely Paul may help distinguish you there 8P

I'm highly surprised there aren't way more people posting here, either. I mean, come on. This is a huge revelation.

I wish there was something I could do other than sit here typing your praise, quite frankly 8P

Hmmm...also, would you ever think of trying to do AE? I'm just curious...it also seems rather odd that AE would have such different programming than AO in that respect.