Jump to content

Home

LUA Scripts: Any tools to unpack them?


Slocket

Recommended Posts

I can see some interesting stuff in the LUA script strings. They seem to be packed like the .meg files were.

 

Anyone know how to unpack them into usable form?

 

I tried LuaDec and such, but no luck. The files are not encrypted, so why waste the time to pack them? They are not very big. It would be fun to alter the behavior.

 

I seen where the AI is limited in building an attack fleet for ISD or MonCal Capital ships to only 2 and other limits on Frigates Corvette. We can change alot.

Link to comment
Share on other sites

They can be decompiled with luadec, it's a matter of fixing/updating luadec.

 

From what I can tell:

 

- Petro started with Lua 5.02

- They upgraded to one of the work versions of Lua 5.1 but didn't completely upgrade everything, so remnants of 5.02 exist.

 

My current guess is that the work version that they are using of 5.1 is Lua 5.1 (work 4) -- As their scripts are missing two new opcodes that were added in Lua 5.1 (work5).

 

[edit]

 

After taking a quick look, the "missing" opcodes are OP_MOD and OP_SIZ.

Link to comment
Share on other sites

Have you meet with success in decompiling the LUA scripts?

 

The LUA version I had gave me a invalid signature error.

 

The files are not encrypted, but compiled. A computer machine can read the bytes and make sense of them. I learned Op Code decades ago. All machines talk in that in the end. C+ and such are just high level languages, but in the end, the machine op code is the closest to human understandable form (with a big grain of salt!).

 

So it is just a matter of getting the program (or any generic decompiler) LuaDec to recognize the slight variance in the operator set. Fun stuff..LOL It is not the original source code, but it is very nice to have! I wonder if the game EXE can read our own custom LUA scripts based upon the structure of the original ones?

 

Version 5.0.2 Beta 4 I used. 2-16-2005 release

 

Do I need to use an newer version?

 

EDIT: hey, the newest version is 5.1 --I did not see that. Does it work? You cna make custom changes to recognize those two OP commands.

 

'...the new operators (# and %)..' difference between 5.0 and 5.1. No wonder it would not decompile using the older LuaDec.

 

Where can you get the newest version? Lua is an open free source language, so maybe someone does not like their work decompiled and used over?

Link to comment
Share on other sites

They didn't use the release version of 5.1, like I said, I *think* they started with Lua 5.02, then partially upgraded to one of the Lua 5.1 work versions, before the % and # operators were added.

 

I've gotten past many problems but still have not gotten to a point where decompilation is possible.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...