Page 3 of 7

Re: Area Mex

Posted: 04 May 2009, 19:45
by Ashnal
1v0ry_k1ng wrote:it does on comet

much as I love manually placing 9000 metal extractors
Apparently there are people who enjoy the task of placing tons of metal extractors. Regret is one of them.

Re: Area Mex

Posted: 22 May 2009, 19:36
by phi711
Hello :-)
I want try this widget but it don't run. :(
I download the file cmd_area_mex.lua , put it in the folder C:\Program Files\Spring\LuaUI\Widgets and after I write
bind ctrl+w areamex in the file uikeys.txt.
In the game : BA 6.92 I can't see a area when I press ctrl+w with my commander.

Do you have a idea ?
Thank you

Re: Area Mex

Posted: 22 May 2009, 20:08
by CarRepairer
phi711 wrote:Hello :-)
I want try this widget but it don't run. :(
I download the file cmd_area_mex.lua , put it in the folder C:\Program Files\Spring\LuaUI\Widgets and after I write
bind ctrl+w areamex in the file uikeys.txt.
In the game : BA 6.92 I can't see a area when I press ctrl+w with my commander.

Do you have a idea ?
Thank you
After you pressed ctrl-w, did you try to click and drag? You should see a gray circle as you drag.

Re: Area Mex

Posted: 22 May 2009, 20:38
by phi711
Yes I drag but I see nothing (not like when I press attack for example).

Re: Area Mex

Posted: 21 Jun 2009, 07:21
by jorenm
I hit my hotkey, and it gives the repair icon, then I click drag and it draws a grey circle, but when I release nothing happens.

Re: Area Mex

Posted: 21 Jun 2009, 08:30
by CarRepairer
jorenm wrote:I hit my hotkey, and it gives the repair icon, then I click drag and it draws a grey circle, but when I release nothing happens.
Did you do it over a metal spot(s)?

Re: Area Mex

Posted: 21 Jun 2009, 09:30
by jorenm
Did you do it over a metal spot(s)?
Uh, yes.

This was on my friends computer. I put it on my computer, and it doesn't even show the repair icon or let me drag a circle. I used /keydebug and it's bound to the right action.

Re: Area Mex

Posted: 03 Sep 2009, 05:35
by Gedanken
Will this ever be fixed for metal maps? It is indeed one of the handiest macro widgets out there, it is just a shame it doesn't work with metal maps (crashes at Loading LuaUI). I have tried the latest version and the no button version, but to no avail. (This is with BA btw)

Re: Area Mex

Posted: 03 Sep 2009, 09:37
by NTG
Gedanken wrote:Will this ever be fixed for metal maps? It is indeed one of the handiest macro widgets out there, it is just a shame it doesn't work with metal maps (crashes at Loading LuaUI).
you mean it crashes/blocks game or simply that widget unloads?
if first one, try the one i attached - you can run it on any map, but it may auto-remove if there are many metal spots because i lowered max metal spots value.
if that's the second option, open widget in any text editor, find line 285 (by default: if #metalData > 250000 then) and change the value... the higher value, the more maps it should support, but also the more spots, the longer it loads... perhaps it needs some new mex detecting algorithm - i haven't seen any PC capable of running areamex on SheerMetal (20x20, mex radius 2) with some reasonable loading speed :(

Re: Area Mex

Posted: 03 Sep 2009, 17:41
by CarRepairer
If you're talking about metal maps where the mex radius is minimal, it's useless. You wouldn't need it as you could drag out a grid of mexes.

If you're talking about a map like Azure Rampart (full metal but the mex radius is large), it does indeed work with it. I've used it.

Re: Area Mex

Posted: 03 Sep 2009, 21:47
by NTG
i mean the moment when i switch from normal map to huge metal map with small radius... it's pretty hard to choose proper value so script won't work for long (on default settings script loads few times longer than pathing - sometimes i'm missing forcing game part)... perhaps it's just a matter of selecting proper value so it works on most of metal maps and loads really fast - haven't got enough time for more than scratching one zero - now loads really fast and works as should on normal maps, but i haven't tested it on any metal map if it won't auto-disable.

Re: Area Mex

Posted: 04 Sep 2009, 14:49
by 1v0ry_k1ng
Ashnal wrote:
1v0ry_k1ng wrote:it does on comet

much as I love manually placing 9000 metal extractors
Apparently there are people who enjoy the task of placing tons of metal extractors. Regret is one of them.
I have no qualms with the sadomasochism of others

Re: Area Mex

Posted: 07 Sep 2009, 20:55
by Pako
NTG wrote:i mean the moment when i switch from normal map to huge metal map with small radius... it's pretty hard to choose proper value so script won't work for long (on default settings script loads few times longer than pathing - sometimes i'm missing forcing game part)... perhaps it's just a matter of selecting proper value so it works on most of metal maps and loads really fast - haven't got enough time for more than scratching one zero - now loads really fast and works as should on normal maps, but i haven't tested it on any metal map if it won't auto-disable.
I fixed that with following code:

if Spring.GetGameFrame()<10 and (string.find(string.lower(Game.mapName),"metal") or string.find(string.lower(Game.mapName),"speed")) then
Spring.Echo("<Mex Helper> Disabled Area Mex, 'metal' or 'speed' found in map name.")
else
AnalyzeMetalMap()
end

Re: Area Mex

Posted: 08 Sep 2009, 21:21
by Gedanken
Nice, yeah - needs a few more checks ofc 'dividing' and 'uberpwn' etc. Are you guys saying that it just takes a long time to load at "Loading LuaUI" on metal maps? I have never stuck around to see it load because I assumed it never would

Re: Area Mex

Posted: 08 Sep 2009, 23:21
by Google_Frog
I already stops if it detects too many metal 'patches' (very large on a metal map). Maybe you don't have the latest version.

Re: Area Mex

Posted: 09 Sep 2009, 00:41
by MidKnight
why isn't this in CA anymore? :|

Re: Area Mex

Posted: 09 Sep 2009, 08:51
by Google_Frog
MidKnight wrote:why isn't this in CA anymore? :|
Broke for some people.

Re: Area Mex

Posted: 09 Sep 2009, 22:33
by Gedanken
Google_Frog wrote:I already stops if it detects too many metal 'patches' (very large on a metal map). Maybe you don't have the latest version.
Yes I have latest as I said - guess it will just not work

Re: Area Mex

Posted: 11 Sep 2009, 15:15
by NTG
Pako wrote:I fixed that with following code:

if Spring.GetGameFrame()<10 and (string.find(string.lower(Game.mapName),"metal") or string.find(string.lower(Game.mapName),"speed")) then
Spring.Echo("<Mex Helper> Disabled Area Mex, 'metal' or 'speed' found in map name.")
else
AnalyzeMetalMap()
end
i have another idea- LUA got interface to handle files. if map got pretty much metal data (i guess range of values would be best here), it could simply save it to file after analysis and, on start/initializing of script, check if file exists - yes- load mexes positions from file, no- begin analysis... but your code should work nice too :)

[EDIT]
i guess i'm better and better - widget works almost perfectly now.
let's make example of SpeedMetal:
- 653 mex spots found
- loading without file - not less than 2-3 mins - later i left room
- loading with file - less than 1s
- cache file size - 20.3kB
- also, since data is cached, you can manually add some spots if script missed some (and you're maniac) - file saved in text mode

well, too bad i used writing in text mode - binary would be faster and would take half this HDD space... well, it's my first day with LUA :P

in first lines of script you should see:

Code: Select all

local maxMetalData = 2500000
local pathToSave = "LuaUI/Widgets/MetalMaps/" -- where to store mexmaps
first variable tells how much data script may process (default value * 10), second is the path to storage dir (WARNING: DIRECTORY MUST EXIST!!! well, i couldn't find any info about making directories)
i also added support for XTA

i'm waiting for your feedback :roll:

[EDIT]
thanks to SirMaverick i added creation of dir if it doesn't exist so you don't need to care about that warning any more.
hint from Regret about shipping it with LUA was good as well :)

[EDIT]
original script maker forgot to add EE as short name for Expand & Exterminate (strange, in previous versions it was) -- fixed

Re: Area Mex

Posted: 12 Sep 2009, 07:49
by NTG
screen for SpeedMetal + msg to bring topic back on top - on original phpBB editions of last post doesn't mark changes last post date :(

Image

PS: i was wondering why script makes so huge spaces between mexes - is there any minimal radius for analyser?