Lua editing and manila editing:the book of secrets

rotastrain

Senior Member
Apr 18, 2009
1,515
4
0
Pune
Hey people,
Many people were pm'ing me n asking me to write tutorials on how to edit manila files n write lua.
As its a very less known topic im one of the few people who knows how to write it and edit it.
I will try to explain the basics first n then the advanced stuff

WHAT WE DO
---
To be frank
manila editing is complicated.Not cause its hard but cause it need a lot of imagination
UnLike other languages that uses graphics like flash or vb or whatever lua and manila editing DOES NOT give you a visual workspace
You have to image what you write in real time and so it needs a lot of trial /error

THE BASICS

What we need
1>m9editor

the files we want to work on

1>As the basics i would like to explain how the background for all tabs mod was made

1.we have a file called 5c9aa261_manila.

for me this is the most important file that a developer needs
in manila this is a file that controls backgrounds
1>For example it runs on every tab and executes its functions on every tab
It is the shadow of tf3d
So anything that you want in the background in every tab or u want to be seen in every tab u put here


So by common sense the slider and the background are in this file

Now what we do for the bgfor all mod

STEP 1

1>Make a png file size 512 X 512
Manila cant take a image of any size.Therea re fixed sizes.i personally always use the size 512 X 512

So now we have a image named lets say sample.png

STEP 2
copy the file 5c9aa261_manila from the windoes folder and open it in m9editor
doubl click it

NOw the hard part ;)

the structure of a manila file was something that took me loads of thinking to figure out

a basic structure
Group (named whatever)
--FIle in group(top most layer)--this is what is seen right on top
--File in group(second layer)--this is what is seen underneath the upper file
and so on a and so forth

LUA
lua files are action script that are recognised by the tf3d
usually lua files are either of two types
1>binaries(damn its just a name nothing more)
using the search button you can search for "binary"
click on it and you will see code in it underneath

2>files that we ad..they always end in .lua ..so using search search for ".lua" and you will find it


Lua is scanned through by tf3d when u start it the first time
lua is usually at the top of the file

so for example lets write a little lua

Code:
money=function()
rotastrainsdonations=whatpeopledonated
if rotastrainsdonations>200$ then
   title.String="rotastrainsrich"
else
   title.String="need smore donations"
end
end
slider.onPress:money


this is seen by tf3d
whenever you will press the slider this function will be called
and it will display what the function does!!



So when u move around in the file you will see groups and files in them..

if you understand this much its enough to make whatever the hell u want

ok now getting back to what we want to do

Step 3
Searching for the existing background
images are always .qtc files
So search for ".qtc"
you will come to a file called "backgroundlevel1..blahblahblah.qtc"
now that we found it we need to place the file we want on top of it..so thats its seen in right on top and in every tab

so how to make a file that we want?heres secret no1
1>copy any qtc file thats existing by right clicking its entry ..for example the file now is
"backgroundlevel1..blahblahblah.qtc"
right click copy
now right click on the entry again
click paste below
so now we have two entries of the same name

Group
--backgroundlevel1..blahblahblah.qtc
--backgroundlevel1..blahblahblah.qtc

change the top entries name
---change this name to whatever you want--for example firstbg

so now we have two entries
--firstbg.qtc
--backgroundlevel1..blahblahblah.qtc

now click ok
move your mouse over the entry
a small popup will appear
with a name like gftfgrh455_manila
thats the name of your file
Write it down somewhere
Click save
owerwrite

Step 4
now we need a qtc file to put ur image in
just take any _manila file from the windeos foler which is a image file
For example the file that i have used in my panoramic background mod
i will attach that here
paste it in the same place as the 5c9aa261_manila file
open it in m9editor
right click it
save as png
open the png file
paste your image in
save
open m9editor
right click the qtc file
load from png
rename the file to what we got earlier "gftfgrh455_manila"

done

Now paste both these files in ur widows folder
and walla
bgforall tabs in a second

This is a basic thing to do

Next step will be to integrate images with lua..
!!

Cheers
Rotastrain
 
Last edited:

Angelusz

Senior Member
Nov 16, 2008
1,306
10
0
Nijmegen
Thanks for this basic guide Rotas, I read it and it's interesting!
I know how to code, I haven't used LUA yet, but I'll learn that.
Before I can do this though, I feel like I need a better understanding of the directory structure in manila files.

Do I understand correctly that a manila file (mode9) is basically a library of LUA functions?
Can you tell us some more about the directory structure and how you find certain things? For instance, what if I'd want to change something in the "All Programs" menu of the start button programs menu - where would I need to look, and how do I look for it?
 

rotastrain

Senior Member
Apr 18, 2009
1,515
4
0
Pune
Ok
First about the manila file structure

the file structure is like this

-------LUA files come here at the top of the file..----
Its usually under -scene

this controls everything that is underneath it

Now after thats over
we add all the graphics

so the lua on top controls all the graphics below..thats the main part.

the lua is executed like this
1>---first file
2>---second file
3>---third file

to find something i first copy all the files from ur windows folder to ur pc..open it in m9editor..the names come on the side..
then use imagination ;)

thats y its hard..caus its too unstructured..

now the 'all programs' is not a page.
it is generated by lua that we cant decompile..
so dnt think changing it is possible..but if we can decompile n read thru the shjitn find a few variables tweaking them in a sepearte lua file is possible
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone