Page 1 of 1

[utility]war3.un-hex - mass fix hex numbers in map code

Posted: July 8th, 2010, 4:07 pm
by YellowAfterlife
Image
Download
Update 1.0.1: fixed a tiny bug with line ending with symbol right after hex number.
This simple program serves its purpose - it converts all numbers in given code from hexademical (base 16) to 'normal' (base 10) system.
As you may already know, hexademical numbers are harder to read, and cause compilation errors when saving from world editor.
Code is replaced with 'smart' behaviour. It will not convert numbers withing strings, or mis-interpret numbers.
As you see, the 'interface' of the program is presented as 4 buttons:
» Proc. Field - convert all text from the left textbox and show the output in the right textbox.
» Proc. File - choose input and output files for processing.
This works much faster than field processing and does not have code length limitations.
Attention: this function uses stream processing. Do not choose the same file for input and output.
» About - show (un)important information about the author of the program.
» Exit - Quit the program.

Motivated by this topic
[spoiler="Technical information"]Created in VB2005.
101 line of code total.
4 Sub's, 1 function total.
No global variables were harmed while creating this program.
If you want source code, send me a PM Image[/spoiler]Have fun. If you found a bug \ have suggestion, tell me.

Re: [utility]war3.un-hex - mass fix hex numbers in map code

Posted: July 8th, 2010, 4:10 pm
by haxorico
Woot :D Thanks alot.
PS: I recommend you re-post it in tool section :)

Re: [utility]war3.un-hex - mass fix hex numbers in map code

Posted: July 9th, 2010, 5:54 am
by xYeta
Yeah good job yellow! That will save our time.

Re: [utility]war3.un-hex - mass fix hex numbers in map code

Posted: July 9th, 2010, 11:41 am
by Madara
oh awesome tho doubt il be using it a lot but doesnt hurt to have it around :P

Re: [utility]war3.un-hex - mass fix hex numbers in map code

Posted: August 10th, 2010, 2:51 am
by haxorico
Well I finaly got a chance to use it.. and it does fix the number yet it does alot of errors. "missing ).. syntax error" I can fix it sure.. but its the same as just fixing the hex number themselves.

Re: [utility]war3.un-hex - mass fix hex numbers in map code

Posted: August 10th, 2010, 3:02 am
by UndeadxAssassin
Meh, it never changed any parenthesis for me.

You could just not Vex Optimize your script ;).

Re: [utility]war3.un-hex - mass fix hex numbers in map code

Posted: August 11th, 2010, 9:57 am
by haxorico
As if I'm the on doing so :)
tough never mind I did it manually..

Re: [utility]war3.un-hex - mass fix hex numbers in map code

Posted: August 13th, 2010, 11:07 am
by YellowAfterlife
haxorico wrote:Well I finaly got a chance to use it.. and it does fix the number yet it does alot of errors. "missing ).. syntax error" I can fix it sure.. but its the same as just fixing the hex number themselves.

You should have downloaded the 1.0.1 from the main download (mirror is still 1.0.0, I believe).

Re: [utility]war3.un-hex - mass fix hex numbers in map code

Posted: September 12th, 2010, 12:01 am
by haxorico
Well, its the first time Ive had this problem.
when there is a constant variable it doesn't delete the letter. ex:

Code: Select all

globals
constant integer test = $A
endglobals

will turn into

Code: Select all

globals
constant integer test = 10A
endglobals

So it doe's delete the $ and converts to decimal digit, yet the hex character remains, but if its $FA it will be 250A. so F aint there anymore yet A is.

I made sure and re-downloaded the tool again (not attachment.. download link) and it says in the rar its 1.0.1.

Re: [utility]war3.un-hex - mass fix hex numbers in map code

Posted: February 14th, 2011, 3:54 am
by Deer
I think 1.0.1 have bug too ($A->10A)
My bad english sorry :(