And of course, I want one too.
I tried looking for a Lua decompiler last month and found 2 that didn't work on lua code compiled without debugging info (like is the case with the SWBF2 lua code).
I had no idea why one didn't exist. Lua seems like such a simple language.
I started looking into a paper called "A no Frills introduction to Lua 51 VM Instruction set" today to try to see if it would bee all that difficult to write one.
I got about 2 pages in and the author mentions that luac has a 'listing mode'. I tried out this listing mode and was quite surprised at just how easy the output is to understand.
Here is an example:
Using that output, it seems like a lua decompiler would be 'not so hard'. I incorporated this view to a tool I've been using to figure out the .lvl files.
Download the SWBF2_Tool.0.51.zip file.
https://github.com/BAD-AL/SWBF2_Xbox_mo ... t/releases
**EDIT**
IT assumes that you have the mod tools located at:
"C:\BF2_ModTools\"
**EDIT**
Updated:
https://github.com/BAD-AL/SWBF2_Xbox_mo ... s/tag/0.52