Metal Extracting Factories
Moderator: Moderators
Metal Extracting Factories
I started making a game recently and stumbled upon the inability to make mex-factory hybrids. I couldn't come up with a better solution than spawning an invisible metal extractor inside and didn't find one in searches either.
Is there a different way to make factory mexes, without spawning extra units?
While I'm on the subject, what about mobile/deployable mexes?
Is there a different way to make factory mexes, without spawning extra units?
While I'm on the subject, what about mobile/deployable mexes?
Re: Metal Extracting Factories
Spawning mex-unit should be okay.
Just for completness, another way might be to use Spring.GetMetalAmount / Spring.GetMetalExtraction to read how much metal is in the ground under factory. Then use http://springrts.com/wiki/Lua_SyncedCtrl#Resources to give metal to player.
Just for completness, another way might be to use Spring.GetMetalAmount / Spring.GetMetalExtraction to read how much metal is in the ground under factory. Then use http://springrts.com/wiki/Lua_SyncedCtrl#Resources to give metal to player.
two examples: http://springrts.com/wiki/CollectionOfS ... ile_Mex.29While I'm on the subject, what about mobile/deployable mexes?
Re: Metal Extracting Factories
Awesome, thanks a lot!
Re: Metal Extracting Factories
I like this idea, but wouldn't it better to make mex/solar hybrids or mex/wind hybrids instead?
Whenever you spend metal you also need e.
Whenever you spend metal you also need e.
- Funkencool
- Posts: 542
- Joined: 02 Dec 2011, 22:31
Re: Metal Extracting Factories
You're makong a huge assumptiom of how he wants his game to play. How do know it will be anything like *A?NeonStorm wrote:I like this idea, but wouldn't it better to make mex/solar hybrids or mex/wind hybrids instead?
Whenever you spend metal you also need e.
Re: Metal Extracting Factories
I hit a weird problem.
Since setting the mex created sports where I couldn't select my factory, I tried using the same method used here (set the Y of the mex to math.huge) and it causes units around where that mex is to vanish. I tried printing out their position, and it's nan,nan,nan. Is that a bug or does math.huge create black holes?

Since you brought it up, my game will have something similar to StarCraft's basic/teching resources. Each faction will be able to extract their basic resource like you extract metal in TA, but will have to gather/dropoff their teching resource like StarCraft minerals.
So, to accomplish that, is there a way to make "flavours" of metal? I would like to make 2 kinds of extractable resources. Think along the lines of enabling green and blue on the metal map. Or maybe change the type of every other metal spot on the map when the game starts?
(gajop:fixed url)
Since setting the mex created sports where I couldn't select my factory, I tried using the same method used here (set the Y of the mex to math.huge) and it causes units around where that mex is to vanish. I tried printing out their position, and it's nan,nan,nan. Is that a bug or does math.huge create black holes?
You're making the assumption I'm a manFunkencool wrote:You're makong a huge assumptiom of how he wants his game to play. How do know it will be anything like *A?NeonStorm wrote:I like this idea, but wouldn't it better to make mex/solar hybrids or mex/wind hybrids instead?
Whenever you spend metal you also need e.

Since you brought it up, my game will have something similar to StarCraft's basic/teching resources. Each faction will be able to extract their basic resource like you extract metal in TA, but will have to gather/dropoff their teching resource like StarCraft minerals.
So, to accomplish that, is there a way to make "flavours" of metal? I would like to make 2 kinds of extractable resources. Think along the lines of enabling green and blue on the metal map. Or maybe change the type of every other metal spot on the map when the game starts?
(gajop:fixed url)
Re: Metal Extracting Factories
The mex was probally blocking the factory from getting clicked. With Spring.SetUnitNoSelect the mex is made unselectable but you can still mouse-over it and it "steals" clicks.Since setting the mex created sports where I couldn't select my factory
Solution: make mex supersmall or possible underground. Does not have to be -math.huge, just 100 below terrain.
There is only one metalmap.
The geothermal spots is maybe a bit like a second resource map, too.
But with Lua you could make as many resourcemaps as you want, in non-hacky ways.
Re: Metal Extracting Factories
I actually tried to set it to -100, for some reason it snaps right back up.knorke wrote: Does not have to be -math.huge, just 100 below terrain.
- Funkencool
- Posts: 542
- Joined: 02 Dec 2011, 22:31
Re: Metal Extracting Factories
ToucheNuclearo wrote: You're making the assumption I'm a man![]()
Re: Metal Extracting Factories
It sounds like you want a/multiple "geo" at each start position which gives you "gas" as your basic ressource and (maybe) has a unit limit of 1-3.So, to accomplish that, is there a way to make "flavours" of metal? I would like to make 2 kinds of extractable resources. Think along the lines of enabling green and blue on the metal map. Or maybe change the type of every other metal spot on the map when the game starts?
And mex spots everywhere else.
This works well as long as nobody conquer another one's or another possible start position and get 2x the ammount of ressources (I am thinking of FFA).
Zero-K converts the metal map to a list of build positions for mex - maybe you could make use of this gadget.
Do you want for the first ressource a gain related to game-time only?
And the more you pay for it with your second ressource (mex, not geos) or build power the more it will be "T2"?
Re: Metal Extracting Factories
- Crystal -> Use Brickcraft / Conflict Terra mineral gadget.
- Vespern -> Use Geovent.
Re: Metal Extracting Factories
I want to make an asymmetrical resource system.
And yes, I did check Conflict Terra for its collection script. I'll read into Brickcraft too, thanks :)
EDIT: lol my god that's awesome XD
- Race 1 will extract metal as its basic resource and eventually start mining gas with collectors as the player reaches T2.
- Race 2 will extract gas as a basic resource and eventually start mining metal for T2 using collectors.
I didn't quite understand the questionNeonStorm wrote:Do you want for the first ressource a gain related to game-time only?
Not sure I understood either, but I think yes - you can buy gas miners using metal, and you can upgrade your metal extraction capabilities using gas (and vice versa for the other race).NeonStorm wrote:And the more you pay for it with your second ressource (mex, not geos) or build power the more it will be "T2"?
And yes, I did check Conflict Terra for its collection script. I'll read into Brickcraft too, thanks :)
EDIT: lol my god that's awesome XD
Re: Metal Extracting Factories
You get 1 metal every second. Basic units like geos cost only metal.Nuclearo wrote:I didn't quite understand the questionNeonStorm wrote:Do you want for the first ressource a gain related to game-time only?
More advanced units cost metal, and are upgraded or stronger the more gass you spend.
But now I see what you are aiming for.
You have to spawn a lot of geos to make it balanced :)
Basically I meant that you can produce a basic unit with 1 metal, 0 gass, 1 constructor in 5 seconds _or_ an advanced version of it for 1 metal, 1 gass, 3 constructors in 5 seconds - with both: an investment (better factory or more time) and battle reward (gas).Nuclearo wrote:Not sure I understood either, but I think yesNeonStorm wrote:And the more you pay for it with your second ressource (mex, not geos) or build power the more it will be "T2"?
Now, an obsolete question, because you said that gas let you upgrade units - which makes it independent from build power.