PDA

View Full Version : Mod tool: *.meg unpacker (w/ source code)


eaterofpies
01-19-2006, 09:27 PM
http://dedibox.geezas.com/~pies/EAWUnpack.TXT

something ive hacked together while exploring the .meg format

please post any feedback here

its probably not very reliable but ive managed to extract all the files from the demo with it successfully and sorry the source codes a mess but as i say it was hacked together while i was trying to work out the file format.

edit: software has been removed Sorry i guess youll have to wait for the full game

Jeff
01-19-2006, 09:46 PM
Awesome! This should make editing those files far easier, great job :thumbsup: but **** if I know what those files do :p

And welcome to EaW.net :)

robotsonic
01-19-2006, 09:53 PM
you, my son, are a genius.

well done :)

Slocket
01-19-2006, 10:23 PM
Nice tool. You can also hex edit using plain old wordpad. I changed the Imperial capitla ships to be more 'tough'. You can alter the Health points of the hardpoint weapons (even change the type of weapon and FX).

Refire rates, strength, ...I wanted the Imperial Ships to last longer for a challenge.

Seems you can change the foddy Camera default distance and angles to get a better view in land battle mode. It would seem we could change alot via mods. I would like to acheive a more long drawn out fire fight for the demo, the stack it is just too quick a easy to destroy each other.

Juggernaut1985
01-19-2006, 10:25 PM
I tried using it but it gave me a 75 error.

What should the path to the megafile be? I tried C:\Program Files\LucasArts\Star Wars Empire at War Demo\GameData\Data

robotsonic
01-19-2006, 10:40 PM
What should the path to the megafile be? I tried C:\Program Files\LucasArts\Star Wars Empire at War Demo\GameData\Data


depends what you're looking to extract.

C:\Program Files\LucasArts\Star Wars Empire at War Demo\GameData\Data\Config.meg

that's one. just look for the .meg/megafiles

Juggernaut1985
01-19-2006, 11:02 PM
I see, thanks.

Tyler_Durden
01-19-2006, 11:39 PM
Is it possible to unpack sounds from the game? There's this one sound that I have been trying to rip for some time now for my Jedi Academy lightsaber sounds that have basically been a WIP for over 4 years.

AoErat
01-20-2006, 02:20 AM
Impressive, thanks for posting this. Now all we need is a repacker. :)

(TAG)Rebel_Stri
01-20-2006, 02:21 AM
What do we get with that?

eaterofpies
01-20-2006, 05:40 AM
Glad you like it . . . it makes things a tad easier than hex editing your way through stuff

If anyone can id those 4 bytes i say are unknown in the readme ill have a go at a handy dandy repacker. I spent ~ 6 hrs yesterday trying to work out what they were and I can tell you that theyre not crc32s or sum32s or adler32s or one of about 4/5 other 32 bit checksums.
one thing i did notice is that they increase the further you get through the file list but not by any regular ammount and theyre not size related as they go well over 4000000 in a 11k file

and yes you can yank the sounds and music out with this. Played the one labled empire at war.mp3 completely at random the 1st time it worked properly. . . was awesome! :)

chr0n1x
01-20-2006, 06:36 AM
So is it possible to edit the files unpacked or do we have to wait for a repacker to edit the files by themselves?

eaterofpies
01-20-2006, 06:41 AM
most games allow you to use files that arent packed and will use them in preferance to files that are packed. . . I havent had a chance to test it. I was busy writing tools.

and another packer was removed from the lucasarts forum so this may disappear . . . i would advise people to save the links somewhere

chr0n1x
01-20-2006, 06:50 AM
Yeah, I tried the files by themselves with the config.meg file removed and the game loaded, but nothing showed up in the campaign list or tutorial list.

eaterofpies
01-20-2006, 06:53 AM
sorry dude. looks like we really need that repacker.

until someone works out those 4 damn bytes theres not much that can be done

eaterofpies
01-20-2006, 07:05 AM
woops i was just informed of this in the lucasarts forum

Except as may be permitted by applicable law, you may not decompile, reverse engineer, disassemble or otherwise reduce the Demo or its components to a human-perceivable form. You may not rent, modify, add or delete components or files, or create new levels or derivative works based upon the Demo in whole or in part.

from the licence agreement

the executable and source files have now been pulled the readme is there in a modified format for informational purposes only

chr0n1x
01-20-2006, 07:41 AM
[Retyped]
Okay, I have figured out how to solve the filesize and character encoding limitations, its so simple.
Get an extractor, then extract Config.meg to the Data directory, thats the one where config.meg resides. Then simply edit the extracted files, you dont have to use a hex editor or anything, just notepad. :)
It works and I have given myself more cash, and a VSD to test.
The game takes teh extracted files over the config.meg, and since the filesize limit was in teh .meg file, it works now.

Sithman1138
01-20-2006, 08:04 AM
WoW!! Thanks! You guys should post a tutorial for this. On how to do everything.

OverlordAngelus
01-20-2006, 08:42 AM
Nice work! So now we just need to look through the files and figure out which ones do what :)

Junmap
01-20-2006, 08:59 AM
[Retyped]
Okay, I ahve figured out how to solve the filesize and character encoding limitations, its so simple.
Get an extractor, then extract Config.meg to the Data directory, thats the one where config.meg resides. Then simply edit the extracted files, you dont have to use a hex editor or anything, just notepad. :)
It works and I have given myself more cash, and a VSD to test.
The game takes teh extracted files over the config.meg, and since the filesize limit was in teh .meg file, it works now.


do u have a link to an extractor? I have to say that i never heard from these .meg files before ^^

chr0n1x
01-20-2006, 09:01 AM
www.ethersoft.net/EmpireAtWar/Kaelic's MEG Extractor.zip
This one does it for me, extracts all files, the only ones you need are in the XML directory, the others are encoded LUA files, we get nothing out of them.

Just drag the .meg file onto the icon of the extractor, make sure it is on your desktop or in the Data dir, you dont need every file in teh folder, just the modded ones.
My no-intro mod:
http://chr0n1x.no-ip.info/eawnointro.rar

eaterofpies
01-20-2006, 09:04 AM
I did write an extractor but unfortunately I have been informed that its against the licence agreement of the demo to modify the game so the extractor has been removed from public distribution until the full game has been released

sorry but theres not much i can do about that

DarthParametric
01-20-2006, 09:30 AM
Get an extractor, then extract Config.meg to the Data directory, thats the one where config.meg resides. The game takes teh extracted files over the config.meg
Yes, that's a pretty standard arrangement. It's common practice for most games of recent years to keep their data files in some sort of archive (e.g. PAK, PK3, BIG, etc). Any extracted files (in the correct directory structure) will override the originals.

A more fruitful discussion at this point would be which XML files contain entries worth modding (e.g. starting credits, build lists, etc.).

Lol, just noticed. Almost two years before my first post.

chr0n1x
01-20-2006, 09:41 AM
Starting credits are in Campaign_singleplayer.xml search for demo campaign, there will be a starting credit option below, however it seems the game automatically reverts to 40,000 credits when you build something. You can also edit the starting units in the same place, however don't try to put in Darth Vader as he seems to crash the game when entering a space battle, will try him on ground tomorrow. Build-Lists, well I don't know where they are, all you can really do is modify your tech level to allow mon cals and other ships to build, but you still cannot build the "Not Buildable in Demo" ships, thats locked by the exe file, and REALLY breaches the EULA if you edit that.
Remember, if you wanna enable mon cals for yourself, you need to change the Initial build locked option to no in the Mon cals file: spaceunitscapital.xml

If you want to use the disabled for demo untis, you can always add them to your starting forces. The Marauder if I remeber off the top of my head is Marauder_Cruiser

DarthParametric
01-20-2006, 10:00 AM
Starting credits are in Campaign_singleplayer.xml search for demo campaign, there will be a starting credit option below

Hmmm....all I'm getting in CAMPAIGNS_SINGLEPLAYER.XML is a list of other XML files between <Story_Mode_Plots> tags. Nothing else. Wonder if they weren't extracted properly? I did try using Kaelic's tool, but I get the "application configuration is incorrect" error that others have reported.

OverlordAngelus
01-20-2006, 10:39 AM
I think I've just got the AI working on the galactic map :D

chr0n1x
01-20-2006, 11:12 AM
Yeah its nice to have the AI build more ships, but make sure you have a space map for planets that dont have one, like tatooine, otherwise it won't work. Plus I think someone mentioned that when using the only avaliable space map, the AI wont expand to other planets, not sure if this is true though.
What did you do to get it, I changed the "None" option in the Demo Campaign Empire player to "BasicEmpirePlayer", that worked.

eaterofpies
01-20-2006, 11:53 AM
can someone who has managed to get Kaelic's unpacker to run (i get the not configured error) please compare the output of my unpacker to it to check that the files are being extracted propely? specifically the output of the configs.meg

eaterofpies
01-20-2006, 07:33 PM
woops the file nameing part of my software was wrong i have worked out the bug but there wont be any public releases until the full game is out (unless someone from Lucasarts says somewhere "we dont mind you modding the demo"

For now this is just a warning not to use my software due to major buggage

Slocket
01-20-2006, 08:06 PM
Just rename the files.. ;)

I just use a hex editor. I do not think that is 'human readable' for most people. LOL

LucasArts should be happy. I though they wanted people to be able to mod their game.

eaterofpies
01-20-2006, 08:20 PM
yeah i think its to stop people making TCs and just using them with the demo so not making lucasarts any money.

any way i hopefully this month ill have time to do a rewrite of the code in a proper language (ie not vb). it will probably end up being java

what i really want to do is post in the dev chat on monday on the LA forums and ask what those bytes do (that i havent managed to id in the text file) and what the devs think of people modding the demo . . . but im on my way to work at that time :(