Page 1 of 2

decompiling.

Posted: Mon Sep 27, 2010 8:35 pm
by jdee/barc
Is it possible to decompile the shell.lvl? and if so how?

Re: decompiling.

Posted: Mon Sep 27, 2010 8:56 pm
by Lozza
No I don't think so. You have to make it yourself.

Re: decompiling.

Posted: Mon Sep 27, 2010 9:16 pm
by jdee/barc
but, how would you make it if there are no files for it in the modtools?

Re: decompiling.

Posted: Mon Sep 27, 2010 11:53 pm
by Lozza
The visualmunge will munge world/sides/sounds/loadscreens so you can only make side shell.lvl (like repshell or impshell), I may be wrong though. Sorry mate, maybe someone else may know the full answer.

EDIT: In the modtools/assets folder there is a folder called shell, maybe if you copy that into your data source folder it can be munged and edited.

Re: decompiling.

Posted: Tue Sep 28, 2010 3:51 am
by giftheck
The BF1 mod tools do not come with visualmunge. Nor do they come with any shell.lvl assets. Sorry, but you'd have to make a new shell.lvl yourself. If BattleBelk still modded he might have been able to help with certain things by creating a shell.lvl tool (we cracked mission.lvl, core.lvl and common.lvl) but he doesn't mod any more so we don't know what to do really.

Re: decompiling.

Posted: Tue Sep 28, 2010 5:05 am
by Lozza
Hmmm I was just assuming, I'm gonna go download the bf1modtools now, I thought they were the same engine and setup. Just with different assets... :?

Re: decompiling.

Posted: Tue Sep 28, 2010 5:09 am
by giftheck
Nope, the BF1 tools do not have much of the actual assets used for making the original core.lvl, mission.lvl, common.lvl and shell.lvl. We have had to decompile the .LVL files to get the munged files and then replace what we can with the mod tools and reinject them into the LVL files.

If we could know what was in shell.lvl we would have had 6 units by now.

Re: decompiling.

Posted: Tue Sep 28, 2010 5:16 am
by Lozza
ggctuk wrote:Nope, the BF1 tools do not have much of the actual assets used for making the original core.lvl, mission.lvl, common.lvl and shell.lvl. We have had to decompile the .LVL files to get the munged files and then replace what we can with the mod tools and reinject them into the LVL files.

If we could know what was in shell.lvl we would have had 6 units by now.
Sounds confusing. :yes:

Re: decompiling.

Posted: Tue Sep 28, 2010 7:58 am
by ANDEWEGET
Side note:
Unless my memory fails Belk once said that textures are compressed to .dds format and then stored exactly like this in the .lvl file. So extracting textures with a hex editor should be possible(same way he got the common.lvl etc textures from?). Its definitely possible to replace munged textures in a .lvl files with others(this way you can change the blue loading screen if i remember right).

Re: decompiling.

Posted: Tue Sep 28, 2010 8:08 am
by Teancum
ggctuk wrote:If we could know what was in shell.lvl we would have had 6 units by now.
Incorrect -- the unit count is a hard-coded value. Psych0fred has six units in his screenshots because he was a developer, and thus took a screenshot of a forked version of the game during development.

Shell.lvl isn't anything exciting to be honest. I've asked for and received a handful of scripts hoping to be able to do additional "eras" in SWBF1, but the fact is that it was hard coded. No Old Republic era no "Hero Assault era"... so many things are just hard coded, probably for time's sake. About the only thing you can do is add maps right into SWBF1's missionlist.lua, but that's pointless since addon maps add themselves. I suppose it would be useful if someone wanted to port their mods to PS2/Xbox (which technically is possible), but as someone who's been there with SWBF2, there's no debugging on those machines, and it's super tough to get the quality Pandemic had and still fit it into memory.

I do, however, have the files needed to make custom load screen like the SWBF1 screens. Well - at least enough to do it with some files ripped from other load.lvl files, but doing a SWBF1-style load screen is totally possible. However getting it all set up so people can actually do it will be a major chore -- that's why I haven't tackled it yet.

Re: decompiling.

Posted: Tue Sep 28, 2010 2:32 pm
by giftheck
BattleBelk had six units at one point too but either way it was broken.

It would have been nice to have had the BF1 engine code since it's obsolete, or an extension to the engine which would allow us to do additional scripting.

Re: decompiling.

Posted: Tue Sep 28, 2010 2:40 pm
by Teancum
Shoot, just to have the Zero engine code in general would be awesome. A melding of the best of SWBF1 and SWBF2 would be exactly what's needed. I'd start with SWBF2's code, then bring back the classic SWBF1 elements like prone and a better HUD, fixing bugs as well. Then I'd make the SWBF1/SWBF2-unique features selectable as options locally, or on a dedicated server.

Oh, to dream. But it'll never happen now that Pandemic is dissolved, even if we could buy the source or they were cool enough to release it, it's lost to the effects of the economy now.

Re: decompiling.

Posted: Tue Sep 28, 2010 3:58 pm
by jdee/barc
ok there is a little utility called lvl extractor 006 by a guy named luck3y (not posting link as links on gametoast have a hard time working, just search up .lvl extractor). I extracted shell lvl and got about 350 files, but only lub files (not lua) and dds files. how do you open them?

wait... was psych0fred one of the creators of SWBF?

Re: decompiling.

Posted: Tue Sep 28, 2010 4:04 pm
by giftheck
Funny, psych0fred's signature says he did not. But he knew quite a bit about the engine that nobody else has done.

LUB files are siomply renamed .script files. You cannot open and edit them because they will be filled with gibberish mainly. You can get a vague idea of what they put into them though, if you crossreferenced it against a list of LUA commands from the BF1 executeable.

Re: decompiling.

Posted: Tue Sep 28, 2010 4:45 pm
by jdee/barc
LUB files are siomply renamed .script files
and script files are compiled lua files?

Re: decompiling.

Posted: Wed Sep 29, 2010 6:20 am
by giftheck
Exactly. So unless you know a way to reverse-engineer the munge application to create a demunger (possible, I've seen decompilation done to Tomb Raider's .DAT script files and they are full of gibberish compiled) then they're useless.

Re: decompiling.

Posted: Wed Sep 29, 2010 5:02 pm
by jdee/barc
I can't think of a way.
Incorrect -- the unit count is a hard-coded value. Psych0fred has six units in his screenshots because he was a developer, and thus took a screenshot of a forked version of the game during development.
does that mean that the unit count is hardcoded into the actual battlefront.exe, or is it in one of the many required lvl files?

Re: decompiling.

Posted: Wed Sep 29, 2010 8:25 pm
by Teancum
jdee/barc wrote:I can't think of a way.
Incorrect -- the unit count is a hard-coded value. Psych0fred has six units in his screenshots because he was a developer, and thus took a screenshot of a forked version of the game during development.
does that mean that the unit count is hardcoded into the actual battlefront.exe, or is it in one of the many required lvl files?
The executable.

Re: decompiling.

Posted: Thu Sep 30, 2010 4:32 am
by giftheck
It's entirely possible for somebody to come up with a patcher for it if they were to research the executable and find out which part does what. However I believe that would fall under the EULA rules for modifying the game's code. Although technically with main game mods we're doing it anyway, but we're not actually doing anything to the executable application.

Re: decompiling.

Posted: Thu Sep 30, 2010 12:16 pm
by mswf
I don“t know which rule says this; but I've learnt this much in my time on gametoast; You can mod pretty much any file, but you may not modify/patch/hex-edit the .exe file, because that seems to directly become illegal.