[Request] Gadget to disallow building mexes on non-metal
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
[Request] Gadget to disallow building mexes on non-metal
spots.
Can this be done? I would like it to work very similar to how placing geothermals works.
Don't worry about maps without proper metal spots, this is for evo and while any map will technically work, it is designed to be played on maps with specific spots, so I don't care if it doesn't work on maps without proper metal patches.
Can this be done? I would like it to work very similar to how placing geothermals works.
Don't worry about maps without proper metal spots, this is for evo and while any map will technically work, it is designed to be played on maps with specific spots, so I don't care if it doesn't work on maps without proper metal patches.
Re: [Request] Gadget to disallow building mexes on non-metal
You can just kill the build order if the ground metal value is below some value, so technically yes.
Getting it to gel nicely with normal building placement is another issue, while there is a function to test if a build position is valid, there isn't one to control how that is determined - that I am aware of, anyway.
Getting it to gel nicely with normal building placement is another issue, while there is a function to test if a build position is valid, there isn't one to control how that is determined - that I am aware of, anyway.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: [Request] Gadget to disallow building mexes on non-metal
I made it years ago in CA. Hasn't been used once.
http://trac.caspring.org/wiki/GameOptions#EasyMetal
http://trac.caspring.org/wiki/GameOptions#EasyMetal
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Request] Gadget to disallow building mexes on non-metal
It doesn't work and this appears in the infolog twice.
This:
Code: Select all
[ 0] Failed to load: easymetal2.lua ([string "LuaRules/Gadgets/easymetal2.lua"]:14: attempt to call global 'tobool' (a nil value))
Is nice because it tells you how it's supposed to work, but I don't know what to do to get it to work in the first place.Easy Metal ┬Â
Metal spots on the map are analyzed at the start of the game and flagged. The placement of mexes is restricted to only those spots, exactly the way geothermal plants are restricted. When building a mex, a snap-to lets you place it more easily on a flagged spot. This setting works well with the Area Mex widget.
The metalmap is replaced with a new one which shows a color-coded M and the name of whomever owns it.
Re: [Request] Gadget to disallow building mexes on non-metal
tobool is part of CA's utilities package, http://trac.caspring.org/browser/trunk/ ... tobool.lua
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Request] Gadget to disallow building mexes on non-metal
Added that file in the proper location. Still getting the same error in infolog.


- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: [Request] Gadget to disallow building mexes on non-metal
Wrong gadget anyway. Easymetal2 was intended to integrate an areamex into the game and also allow a simple right click to build a mex, but it failed miserably (mostly due to engine lacking features). It is very different from easymetal.lua (1) which is now in evorts.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Request] Gadget to disallow building mexes on non-metal
Thanks Car.
Btw to anyone else wanting to give this a go, it's in EvoRTS now and should work for just about any game that uses mex spots.
Btw to anyone else wanting to give this a go, it's in EvoRTS now and should work for just about any game that uses mex spots.
Re: [Request] Gadget to disallow building mexes on non-metal
The problem with "easy metal" is that it forces the player to build mexes always on the same places instead of giving him assistance to do so.
Re: [Request] Gadget to disallow building mexes on non-metal
I think thats ok. I would like ghosted structures on mex spots (appear when you select conbot) and you just right click to build.
I dont think that extra complexity of free placing extractors is worth it.
Currently its possible to place mexes around spot only because mappers make radius bigger to allow for mex and moho mex to go into same spot...
I dont think that extra complexity of free placing extractors is worth it.
Currently its possible to place mexes around spot only because mappers make radius bigger to allow for mex and moho mex to go into same spot...
Re: [Request] Gadget to disallow building mexes on non-metal
It's okay for mexspots maps, but it totally fails for maps with cloud metalmaps.Licho wrote:I think thats ok. I would like ghosted structures on mex spots (appear when you select conbot) and you just right click to build.
I dont think that extra complexity of free placing extractors is worth it.
Currently its possible to place mexes around spot only because mappers make radius bigger to allow for mex and moho mex to go into same spot...
Re: [Request] Gadget to disallow building mexes on non-metal
So how would I build a moho extractor or an armed extractor without reclaiming and loosing metal income?
Re: [Request] Gadget to disallow building mexes on non-metal
Its not for BA, request is for mods which don't have to think this way.
Re: [Request] Gadget to disallow building mexes on non-metal
I use BA only as an example because it has the necessary units that come to mind first.
Instead it should snap not to the actual location of the spot, but to within a range of the spot that covers it, which would be far more flexible and convenient
Instead it should snap not to the actual location of the spot, but to within a range of the spot that covers it, which would be far more flexible and convenient
Re: [Request] Gadget to disallow building mexes on non-metal
For BA.AF wrote:I use BA only as an example because it has the necessary units that come to mind first.
Instead it should snap not to the actual location of the spot, but to within a range of the spot that covers it, which would be far more flexible and convenient
It's irrelevant when you don't have different mexes or have upgradeable mexes or anything else altogether.
And coding for every eventuality leads to a convoluted mess (c.f. unit_morph.lua). Games should reuse gadgets, but they should do the customisation for themselves. It's impossible to plan for every eventuality.
Re: [Request] Gadget to disallow building mexes on non-metal
Have you ever played supreme commander and noticed that the extraction points for mass arent perfectly lined up leaving you with awkward gaps which are half the size of the smallest building footprint for raiders to slip through?
Its not purely a matter of moho vs non moho, there are advantages beyond having 2 extractors purely from a placement perspective.
Its not purely a matter of moho vs non moho, there are advantages beyond having 2 extractors purely from a placement perspective.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: [Request] Gadget to disallow building mexes on non-metal
It doesn't totally fail. Easymetal works on Smalldivide (original one with cloud metal) just fine.jK wrote:It's okay for mexspots maps, but it totally fails for maps with cloud metalmaps.
Good luck to you, feel free to modify easymetal and use it in whatever mod it is you're working on. I prefer it this way.AF wrote:Instead it should snap not to the actual location of the spot, but to within a range of the spot that covers it, which would be far more flexible and convenient
You know, like geothermals? No one seems to freak out over those.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: [Request] Gadget to disallow building mexes on non-metal
That's fine with me. Evo has it's own official maps, and because of the way Evo works, a feature like this is extremely important.jK wrote:It's okay for mexspots maps, but it totally fails for maps with cloud metalmaps.Licho wrote:I think thats ok. I would like ghosted structures on mex spots (appear when you select conbot) and you just right click to build.
I dont think that extra complexity of free placing extractors is worth it.
Currently its possible to place mexes around spot only because mappers make radius bigger to allow for mex and moho mex to go into same spot...
I might point out that the majority of maps which use clouds aren't very good. There are exceptions, but it is more or less the rule.
Re: [Request] Gadget to disallow building mexes on non-metal
Geothermals actually have a greater degree of freedom in that your only limitation is that the footprint covers the target, it doesn't snap to an exact position.
Cloudy metal maps in particular are a prime reason for changing it
Cloudy metal maps in particular are a prime reason for changing it