script optimisation question

Status
Not open for further replies.
Level 9
Joined
Aug 15, 2007
Messages
261
the jass looks like this to a not optimised script

button udg_P1Red = null
button udg_P2Blue = null
button udg_P10LB = null

the way that it saves it whit vextorian slk

button V=null
button E=null
button X=null

a long time ago i was able to make it


button button015 = null
button button016 = null
button button017 = null


how can i do it like the last one i am unable to remember.....
 

Deleted member 219079

D

Deleted member 219079

"udg_" (user defined global) - prefix is implicitly added to variables declared via the GUI variables dialog (Ctrl + B). You should enable JassHelper to be able to define globals freely in your script, like this:
JASS:
globals
    integer myInteger = 0
endglobals

function PrintMyInteger takes nothing returns nothing
    call BJDebugMsg("myInteger = " + I2S(myInteger))
endfunction

Note that you should strive for readability in your variable naming scheme, not for performance. Such optimization is done with tools like Vexorian optimizer.
 
Level 9
Joined
Aug 15, 2007
Messages
261
the f dude pls read before posting i sayed that im using Vexorian optimizer
and that i want the names to be converted as the 3-d way whit an optimiser and that a long time ago i knew how to and now i cant remember all it gives me is the second one
allso there was no jasshelper back in the day.....
 

Deleted member 219079

D

Deleted member 219079

I'm at a loss with your indecipherable English. I thought you were asking for how to create non-udg-prefixed variables by hand, without optimizer.

Wait for someone else to answer.
 
Level 9
Joined
Aug 15, 2007
Messages
261
ORIGINAL
button udg_P1Red = null
button udg_P2Blue = null
button udg_P10LB = null

+ Vexorian optimizer 5.0 =
button V=null
button E=null
button X=null


4 eyers ago = WANNED RESULT
button button015 = null
button button016 = null
button button017 = null

HOW TO GET WANNED RESULT?????
 
Level 9
Joined
Aug 15, 2007
Messages
261
I have never found a need to use an optimizer so I do not know.

But isn't the point of an optimizer to be used before a public release? meaning it is not meant to be read by the creator?
So why does it matter?

thanks for the spam post i need help to do it not to be spamed....
at least thats what im asking for if someone knows....
looks like Rmpq can do it but it messes up the triggers....
 
Maybe it's really just older verstion/settings, or maybe an other tool. I remember your wanted result, too, but don't remember where it came from.
What is the reason you dislike current result? It might be: less letters -> faster, but as Chaosy said it doesn't seem very relevant for modder, as he doesn't work with converted code.
 
Level 9
Joined
Aug 15, 2007
Messages
261
it does when you wanna propect your map....

well basicly i wanna edit an old map which i made and lost the backup to adding new triggers to it and i want them to look the same ,and another problem gets in the way the wts file have eaten the texts on the new triggers,allso i remember there was a way to reverse it but i dont remember the program name so im doing it manualy.

I just hate forgetting but it has been 4 eyers since i last touched wc3....
 
Last edited:
Even it's maybe much work I probably would rewrite the scripts to all use proper names and then they're align with proper new variable names, too. Making them align with some output from a script optimizer seems not worth it.

If script was optimized you anyways maybe need to rewrite the codes, or? I mean it probably changed some more of the syntax. In the end it might be really best to rewrite everything, or to use existing systems.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Tried messing around with the obfuscation settings?

The renaming of variables and functions is part of the script obfuscation. There are some setting to change this behaviour such as the dictionary to use and such. It is possible that old versions had a different algorithm which is why it cannot be recreated anymore.
 
Status
Not open for further replies.
Top