Area Mex - Page 5

Area Mex

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

mk_fg
Posts: 6
Joined: 07 Feb 2010, 07:40

Re: Area Mex

Post by mk_fg »

Forboding Angel wrote:
Sausage wrote:area mex gets stuck on 'loading luaui' on metal maps but I don't care because metal maps are gay.

My main problem is that I think it would be much better as a square. Is the any way I can edit it to make it a square or can somebody update it.
Actually, it already is a square, it was just made to like like a circle to be nice, but when you are dragging an area, it is actually a square.
Note that this might hold true for Area Mex, but Area Mex 2 has a circle:

Code: Select all

		for k, mex in pairs(mexes) do
			--if (mex.x > xmin) and (mex.x < xmax) and (mex.z > zmin) and (mex.z < zmax) then -- square area, should be faster
			if (Distance(cx,cz,mex.x,mex.z) < cr^2) then -- circle area, slower
				commands[#commands+1] = {x = mex.x, z = mex.z, d = Distance(aveX,aveZ,mex.x,mex.z)}
			end
		end
Anyway, tweaking this behavior is just a matter of changing these lines, I guess.
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Area Mex

Post by Tribulex »

Pako wrote:Of course I can't release it because the old noobs like Jazcash cry and feel mentally decayed when inexperienced players use automation to ease the game.
lol. i havent released a widget for years for similar reasons. plus that would give everyone an unfair disadvantage of not being able to control any of their units.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Area Mex

Post by Forboding Angel »

mk_fg wrote:lolcircle
Gotcha, didn't know that had changed.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Area Mex

Post by Google_Frog »

For propper square behaviour the CMD TYPE should be replaced with the rectangle one that area attack uses. The params would have to be handled differently with this change.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Area Mex

Post by Jazcash »

Could anybody get this working with water mexes? I would do it myself but I don't feel like learning another language just for that :P
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Area Mex

Post by Google_Frog »

Updated. Each builder can create multiple different mex types. When given an order the builders will check each type to see if it can be placed. I've added underwater mexes to the BA array so that builders will create underwater mexes if they can't make normal ones.
Forboding Angel wrote:
mk_fg wrote:lolcircle
Gotcha, didn't know that had changed.
Well I don't know how to upload to widget base. Area Mex seems to be attributed to Forb there and is probably out of date.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Area Mex

Post by Google_Frog »

Wow. I completely missed NTG's change, great job NTG. I was pretty busy around September/October/November. I've merged the version and created v2.1. I don't know how to update the downloader though so it's still a mess.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Area Mex

Post by Jazcash »

Google_Frog wrote:Wow. I completely missed NTG's change, great job NTG. I was pretty busy around September/October/November. I've merged the version and created v2.1. I don't know how to update the downloader though so it's still a mess.
Where's the download link? First post:
Last edited by Google_Frog on February 27th, 2009, 4:28 am, edited 5 times in total.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Area Mex

Post by Google_Frog »

I had trouble with spring files. The upload did not seem to change the file when I tested by downloading. They are now attached to the first post.

The last edited message is an interesting bug. I edited it a few minutes ago.

Edit: Spring files only works for the spring files mirror. Also it takes a while to update. Readded the link anyway.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Area Mex

Post by Jools »

CarRepairer wrote:
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)?
Areamex doesn't work with XTA.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Area Mex

Post by Google_Frog »

Jools wrote:Areamex doesn't work with XTA.
That's because xta uses logical unit def names instead of the obscure TA stuff.

Code: Select all

if Gname == 'EvoRTS' then
		Spring.Echo("Area Mex: Loaded for Evo")
		mexIds[UnitDefNames['tmex2'].id] = UnitDefNames['tmex2'].id 
		mexIds[UnitDefNames['emex2'].id] = UnitDefNames['emex2'].id 
	elseif Gname == '' then
		Spring.Echo("Area Mex: Loaded for EE")
		mexIds[UnitDefNames['urcmex2'].id] = UnitDefNames['urcmex2'].id 
		mexIds[UnitDefNames['alienmex'].id] = UnitDefNames['alienmex'].id 
		mexIds[UnitDefNames['gdmex2'].id] = UnitDefNames['gdmex2'].id 
	elseif Gname == 'BA' or Gname == 'nota' then
		Spring.Echo("Area Mex: Loaded for BA or NOTA")
		mexIds[UnitDefNames['armmex'].id] = UnitDefNames['armmex'].id 
		mexIds[UnitDefNames['cormex'].id] = UnitDefNames['cormex'].id 
		mexIds[UnitDefNames['armuwmex'].id] = UnitDefNames['armuwmex'].id 
		mexIds[UnitDefNames['coruwmex'].id] = UnitDefNames['coruwmex'].id 
	elseif Gname == 'ca' then
		Spring.Echo("Area Mex: Loaded for CA")
		mexIds[UnitDefNames['armmex'].id] = UnitDefNames['armmex'].id 
		mexIds[UnitDefNames['cormex'].id] = UnitDefNames['cormex'].id 
	elseif Gname == 'CA1f' then
		mexIds[UnitDefNames['cormex'].id] = UnitDefNames['cormex'].id 
	else
		Spring.Echo("Removed Area Mex")
		widgetHandler:RemoveWidget()
	end
In that bit add

Code: Select all

elseif Gname == (whatever xta's shortname is (it's in modinfo))then
       mexIds[UnitDefNames[(one of xta's mexes)].id] = UnitDefNames[(the same xta mex)].id 
    ... repeat for all mexes
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Area Mex

Post by Gota »

Horrible widgets...
This must be included with BA by default so newbies use it...the advantage is very big for those that have this.

Ba changed quite substantially without doing any internal changes just cause people made very powerful widgets that change gameplay..
don't know if its good or bad but it probably deserves some thought and attention.
Machete234
Posts: 642
Joined: 12 Feb 2010, 11:55

Re: Area Mex

Post by Machete234 »

Can this lead to spring crashes?
Im using iceui and areamex without a button, but in iceui there is a button for this.

After a while the game crashed.
I now removed it from the folder and test if it is areamex.

Is there a version without a button? or any version that doesnt crash the game.
Did areamex crash anybody elses game?
polemarque_
Posts: 3
Joined: 08 May 2010, 19:51

Re: Area Mex

Post by polemarque_ »

Hi guys,

i just try that widget with BA 7.12. It works fine but only if RED GUI is deactivated.
Any idea to fix that pb with RED gui.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Area Mex

Post by Regret »

polemarque_ wrote:Hi guys,

i just try that widget with BA 7.12. It works fine but only if RED GUI is deactivated.
Any idea to fix that pb with RED gui.
Not planning on adding support for cheats like AreaMex.
Gedanken
Posts: 121
Joined: 13 Oct 2008, 02:57

Re: Area Mex

Post by Gedanken »

It is hardly a cheat - just spamming mexes blindly with this widget won't improve your game - it will just create a whole bunch of unsupported mexes. Helpful, if that is what you want to do. It won't help you against a decent player who can spam a far more effective mex/radar/llt combination in a short span of time. It won't improve your micro - it will bridge a gap in your micro, poorly
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: Area Mex

Post by JohannesH »

Gedanken wrote:It is hardly a cheat - just spamming mexes blindly with this widget won't improve your game - it will just create a whole bunch of unsupported mexes. Helpful, if that is what you want to do. It won't help you against a decent player who can spam a far more effective mex/radar/llt combination in a short span of time. It won't improve your micro - it will bridge a gap in your micro, poorly
If it doesnt improve your game why do anyone use it
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Area Mex

Post by Jazcash »

Gedanken wrote:It is hardly a cheat - just spamming mexes blindly with this widget won't improve your game - it will just create a whole bunch of unsupported mexes. Helpful, if that is what you want to do. It won't help you against a decent player who can spam a far more effective mex/radar/llt combination in a short span of time. It won't improve your micro - it will bridge a gap in your micro, poorly
I beat BasiC 2-0 because of this beautiful widget. How dare you suggest it doesn't improve your game.
mk_fg
Posts: 6
Joined: 07 Feb 2010, 07:40

Re: Area Mex

Post by mk_fg »

polemarque_ wrote:Hi guys,

i just try that widget with BA 7.12. It works fine but only if RED GUI is deactivated.
Any idea to fix that pb with RED gui.
I've actually posted my solution to this a few msgs ago.
polemarque_
Posts: 3
Joined: 08 May 2010, 19:51

Re: Area Mex

Post by polemarque_ »

I've actually posted my solution to this a few msgs ago.
I mist it sorry.
But your "updated red" does not work with me (BAV7.12)

Code: Select all

Loading:  LuaUI/Widgets/gui_red_buildordermenu_mk2.lua
false
Error in Update(): [string "LuaUI/Widgets/gui_red_buildordermenu_mk2.lu..."]:107: attempt to index global 'Screen' (a nil value)
Removed widget: Red Build/Order Menu mk2
Post Reply

Return to “Lua Scripts”