FORUMS
Remove All Ads from XDA
Post Reply Email Thread
Hi!

This package contains lots of useful tools for Manila3D Lua5.1 editing. You can find here a compiler a decompiler, a small script repository at post #3 and ExtLua, which provides developers the possibility to extend M3D's functionality.

Also check m9editor which is a really great application to edit mode9 files by 6Fg8!
And check Manila kitchen project which hosts the decompiled scripts with a LUA IDE and everything ready to go.
You might want to try out mode9 converter too.

ChangeLog

LuaDec 2.0
  • Finds out where locals are
  • Read more here

LuaDec 1.9
  • Some changes regarding LDS(2) strings and for loops (it's still a bit unstable)
  • LuaDec has a new option to disassemble instead of decompile
  • The provided lua package (lua, luac and luadec) is now unicode compilant, it will read and write the unicode variants of the scripts instead of the ascii variants.
  • Read more here

LuaDec 1.0
  • Added LDS2 support to both luadec and luac
  • Fixed OP_TFORLOOP handling
  • Read more here

LuaDec Beta6
  • Improved luadecguesser with fast mode
  • Fixed a crashing when encountering boolean values
  • Increases happy face rate in XDA-developers forum
  • Read more here

LuaDec Beta5
  • Improved luadecguesser
  • Read more here

luaDec Beta4
  • Upvalue handling
  • Added a brute-force local variable searcher application
  • Read more here

luaDec Beta3
  • Generic for loop handling
  • Improved local variable handling
  • Read more here

ExtLua 0.1
  • Initial release
  • Read more here

luaDec Beta2
  • Less crashing
  • More decompiling
  • Read more here

LuaDec Beta1
  • Decompiling simpler scripts and recompiling them will result in a semantically identical compiled lua script!
  • Numeric for loops are fixed, they should work fine
  • Complex boolean expressions and conditional statements will make luadec crash
  • Only works with ascii files. Don't forget to convert the lua files to ascii then back to unicode

Good to know
  • Luadec will output a "-- Lua5.1" or "-- Warning" comment to lines, where you should check the output.
  • If luadec crashes try running it with the "-d" parameter to acquire as much information as you can.
  • Compile your lua files with the "-s" parameter set.
  • It was compiled with Visual C++ 2008, so you might need the MSVC++ 2008 redistributables too.
  • Valid Numbers are in range from -32768.0 to 32767.0. Numbers not in this range will be cropped by the compiler.
  • There is a decompilation tutorial starting here

DL link: http://winmo.sztupy.hu/luadec.html

I start a repository at post #3 for them, but you can just look at the decompiled rhodium2 scripts too.
6th February 2009, 05:23 PM |#2  
udK's Avatar
Retired Forum Moderator
Flag Switzerland
Thanks Meter: 1,078
 
Donate to Me
More
Does not work for me.
6th February 2009, 05:37 PM |#3  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 879
 
Donate to Me
More
Useful snippets of code
Succesfully decompiled scripts

All rhodium and rhodium2 scripts:
http://winmo.sztupy.hu/manilakitchen.html

Run an application:

Code:
Shell_NavigateTo(command,parameters)
Add an eventhandler to an event: (thx D-MAN666)

Code:
object.EventName:connect(functionRef, scopeRef);
object.EventName:disconnect(functionRef, scopeRef);
Where events can be: onPress, onRelease, onReleaseOutside

Example (from 4aefb03d_manila):

Code:
require("hitfeedback")
OnPhotoTouchPress = function(loc_0)
   gnPhotoTouchPressY = loc_0._ymouse
   Camera3DHitFeedback:Press()
end
PhotoHitTarget.onPress:connect(OnPhotoTouchPress)
6th February 2009, 07:19 PM |#4  
udK's Avatar
Retired Forum Moderator
Flag Switzerland
Thanks Meter: 1,078
 
Donate to Me
More
Quote:
Originally Posted by sztupy

More detail please... no output? crash ? missing dlls?

It simply return "cannot execute this file", tested on XP and Win7 beta
6th February 2009, 07:22 PM |#5  
utopykzebulon's Avatar
Senior Member
Flag Grenoble
Thanks Meter: 517
 
Donate to Me
More
do you have to do something first at manila files?
for me say bad headers!

@udk : i'm running on win 7 beta too and it's working in CMD...
6th February 2009, 07:49 PM |#6  
udK's Avatar
Retired Forum Moderator
Flag Switzerland
Thanks Meter: 1,078
 
Donate to Me
More
Quote:
Originally Posted by utopykzebulon

@udk : i'm running on win 7 beta too and it's working in CMD...

That's strange, maybe I miss some files.
7th February 2009, 11:21 AM |#7  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 879
 
Donate to Me
More
Quote:
Originally Posted by utopykzebulon

do you have to do something first at manila files?
for me say bad headers!

@udk : i'm running on win 7 beta too and it's working in CMD...

did you unicode2ansi them?
7th February 2009, 11:16 AM |#8  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 879
 
Donate to Me
More
Quote:
Originally Posted by udK

It simply return "cannot execute this file", tested on XP and Win7 beta

Do you have the MS Visual C++ 2008 redistributables? (MSVCR9 and MSVCP9)
7th March 2009, 08:36 PM |#9  
smotrs's Avatar
Senior Member
Flag So. Calif.
Thanks Meter: 0
 
More
Can you think of any reason why luadec (version 6 and now 7) with the -l option wouldn't output anything?

I tried it with and without the -l option. With the -l option just prints the following,
Code:
C:\Documents and Settings\user1\My Documents\My Software\Mobile Software\lua51_tf3d_beta_6>luadec -l ;;0,11,32;;0,17,38;;;;;;;5;;0,3,6,16,26;0,34;14,35;;;;;;;49,100,221;;0,0,223;;;;21,29;;;;;;;;;;;;;;;19;;0,0,5;8;;;;; .\27a13690_hd\27a13690_manila.luac
-- Decompiled using luadec 0.7 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;0,11,32;;0,17,38;;;;;;;5;;0,3,6,16,26;0,34;14,35;;;;;;;49,100,221;;0,0,223;;;;21,29;;;;;;;;;;;;;;;19;;0,0,5;8;;;;; .\27a13690_hd\27a13690_manila.luac
without the -l it outputs the decompile fine, but not as helpful.

Also, I tried it with the version 5 and it works fine with the -l option. So I re-downloaded version 6 tried it again and installed the version 7 both with the same results when it comes to the -l option.
7th March 2009, 08:47 PM |#10  
sztupy's Avatar
OP Inactive Recognized Developer
Flag London
Thanks Meter: 879
 
Donate to Me
More
Quote:
Originally Posted by smotrs

Can you think of any reason why luadec (version 6 and now 7) with the -l option wouldn't output anything?

I tried it with and without the -l option. With the -l option just prints the following,

Code:
C:\Documents and Settings\user1\My Documents\My Software\Mobile Software\lua51_tf3d_beta_6>luadec -l ;;0,11,32;;0,17,38;;;;;;;5;;0,3,6,16,26;0,34;14,35;;;;;;;49,100,221;;0,0,223;;;;21,29;;;;;;;;;;;;;;;19;;0,0,5;8;;;;; .\27a13690_hd\27a13690_manila.luac
-- Decompiled using luadec 0.7 by sztupy (http://winmo.sztupy.hu)
-- Command line was: -l ;;0,11,32;;0,17,38;;;;;;;5;;0,3,6,16,26;0,34;14,35;;;;;;;49,100,221;;0,0,223;;;;21,29;;;;;;;;;;;;;;;19;;0,0,5;8;;;;; .\27a13690_hd\27a13690_manila.luac
without the -l it outputs the decompile fine, but not as helpful.

Also, I tried it with the version 5 and it works fine with the -l option. So I re-downloaded version 6 tried it again and installed the version 7 both with the same results when it comes to the -l option.

It looks like it crashed. Does it output anything with -d option set?
Post Reply Subscribe to Thread

Tags
lua, manila, mod, tf3d, touchflo

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes