FR: Build mohos over lvl1 mexes

FR: Build mohos over lvl1 mexes

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

espylaub
Posts: 205
Joined: 01 May 2006, 11:35

FR: Build mohos over lvl1 mexes

Post by espylaub »

Don't know if this has been discussed already, but it would be neat if you could give a con a build order (or several) for a mohomex on a metal patch that already has a lvl1 mex. The con would then automatically reclaim the lvl1 mex, build the moho/exploiter, move on. As it is, upgrading your mexes to mohos is a bit of a hassle, since you can't queue it up properly. Every moho has to be placed manually after the mex has been reclaimed.

Any way to implement this? And sorry if this is a mod thing and not an engine thing, in that case, feel free to move this to the mod section.
User avatar
Targ Collective
Posts: 202
Joined: 12 Nov 2005, 14:16

Post by Targ Collective »

It's an engine thing. Reclaimables are automatically reclaimed if they are in the way of a site. Buildings are in another category altogether.

I don't know if the engine even has the framework to support an If statement to do this. Perhaps a key to reclaim whatever structure is in the way of the site? That would be doable, just be careful! You'll end up reclaiming your factories if things are closely set and you're careless.
Hellspawn
Posts: 392
Joined: 24 Feb 2006, 11:54

Post by Hellspawn »

In bigger games I just delete those mexes and don't bother with reclaiming because it takes to much time. Idea is good :).
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

That aint exactly the bets thign todo

When a moho and a mex are togetehr you get just as much metal as a moho beign there, onylt he mex cotninues extractign just as much and the moho makes up the rest.

The thign is many people reclaim the mex and build a moho when they could build the moho next to the mex and then relcaim the mex afterwards, thus by reclaiming before they dotn have a mex producing metal while they're building their moho and loose out on resources...

So all this talk about mohos built ontop of mexes and autoreclaiming the mex is pointless unless extraction radii are too small.


That and it can be done easily with a groupAI.

Code: Select all

GiveOrder(){
    if command id is smaller than 0 it's a building{
        is it a metal extractor?{
            if so is ti being built ontop of another mex?{
                if extraction depth of new mex > extraction depth fo old mex{
                    reclaim old mex and start new mex construction.
                }
            }
        }
    }
}
That is all that'd be needed, the rest of the groupAI would have no code in it save the usual stuff.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Is there a "force build" key?

Post by Pxtl »

That would be handy and more general - a key you hold down while giving build orders that says "reclaim anything in the way". ALso useful for upgrading geotherms in AA.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

AF wrote: So all this talk about mohos built ontop of mexes and autoreclaiming the mex is pointless unless extraction radii are too small.
On many OTA-conversions, this is exactly the case. The mexx must be built directly on top of the metal.
User avatar
cyclerboy
Posts: 156
Joined: 04 May 2005, 06:38

Post by cyclerboy »

when you self-destruct mexs, there is no damage to units around them. so if its right in the middle of your base nothing well happen to a wind generator, for example, next to it. so i just self-destruct them instead of reclaiming
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

and waste the resources a mex can give you if you reclaim?
User avatar
Zenka
Posts: 1235
Joined: 05 Oct 2005, 15:29

Post by Zenka »

self-Ding mexes doesn't cause demage and doesn't take 5 sec of time.
This is in Xta and AA (maybe other mods as well) to help you with replacing mexes.
Most maps have a larger extraction range so you can place the moho next to the old mext.
The moho then produces the metal the normal mex couldn't provide. (so the sum of those two is equal to the moho alone).

I don't think that reclaiming the old mex is very efficient, it takes time and won't give a lot of metal.
espylaub
Posts: 205
Joined: 01 May 2006, 11:35

Post by espylaub »

Hmm, ok, learned a couple of new things here. Thanks :)
User avatar
wizard8873
Posts: 254
Joined: 21 Jan 2006, 02:42

Post by wizard8873 »

cyclerboy wrote:when you self-destruct mexs, there is no damage to units around them. so if its right in the middle of your base nothing well happen to a wind generator, for example, next to it. so i just self-destruct them instead of reclaiming
that can be done but where would your metal income come from if you did that? even if you self-d each one when the unit is ready to build on it, it doesn't take away the annoyance of micro-managing it. you're also loosing the resources you can get from them by reclaiming them.

@AF
on certain maps, Mars for example, build a mohomex next to a mex gives you more metal, by like .3-.5, then having the moho alone. i've rarely seen it on other maps though.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

what happens if you give a mex an "is feature" tag?
User avatar
Drone_Fragger
Posts: 1341
Joined: 04 Dec 2005, 15:49

Post by Drone_Fragger »

AF wrote:and waste the resources a mex can give you if you reclaim?
What, About 25-ish metal?
User avatar
FoeOfTheBee
Posts: 557
Joined: 12 May 2005, 18:26

Post by FoeOfTheBee »

mohos should just be doughnut-shaped
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

Need yardmaps for that.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

SinbadEV wrote:what happens if you give a mex an "is feature" tag?
Then it would be a feature, and just sit there without doing anything :P
Leaderz0rz
Posts: 100
Joined: 07 Feb 2006, 21:35

Post by Leaderz0rz »

mohos should go around regular mexs :D
User avatar
LOrDo
Posts: 1154
Joined: 27 Feb 2006, 00:21

Post by LOrDo »

Yes, oh god yes. This is one of the main reason I am so reluctant to upgrade to mohos in spring. I have to constantly click around there to reclaim and build. It dosn't have the "Set it and forget it" feel that the rest of springs building has.
User avatar
FizWizz
Posts: 1998
Joined: 17 Aug 2005, 11:42

Post by FizWizz »

Gnome wrote:Need yardmaps for that.
*gasp* the regular metal extractor can fit inside a moho, so the moho can have a hole in it's yardmap, genious. Or maybe it can't work that way, then the entire metal extractor would have to have its yardmap 'open,' huh? then units could walk through it, which would be weird...
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

*gasp* only factories have yardmaps in spring, genius.
Post Reply

Return to “Engine”