Metal Extracting Factories

Metal Extracting Factories

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
Nuclearo
Posts: 5
Joined: 28 Jul 2013, 10:52

Metal Extracting Factories

Post by Nuclearo »

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?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Metal Extracting Factories

Post by knorke »

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.
While I'm on the subject, what about mobile/deployable mexes?
two examples: http://springrts.com/wiki/CollectionOfS ... ile_Mex.29
Nuclearo
Posts: 5
Joined: 28 Jul 2013, 10:52

Re: Metal Extracting Factories

Post by Nuclearo »

Awesome, thanks a lot!
User avatar
NeonStorm
Posts: 173
Joined: 23 May 2012, 18:36

Re: Metal Extracting Factories

Post by NeonStorm »

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.
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: Metal Extracting Factories

Post by Funkencool »

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.
You're makong a huge assumptiom of how he wants his game to play. How do know it will be anything like *A?
Nuclearo
Posts: 5
Joined: 28 Jul 2013, 10:52

Re: Metal Extracting Factories

Post by Nuclearo »

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?
Funkencool wrote:
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.
You're makong a huge assumptiom of how he wants his game to play. How do know it will be anything like *A?
You're making the assumption I'm a man :P
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)
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Metal Extracting Factories

Post by knorke »

Since setting the mex created sports where I couldn't select my factory
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.
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.
Nuclearo
Posts: 5
Joined: 28 Jul 2013, 10:52

Re: Metal Extracting Factories

Post by Nuclearo »

knorke wrote: Does not have to be -math.huge, just 100 below terrain.
I actually tried to set it to -100, for some reason it snaps right back up.
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: Metal Extracting Factories

Post by Funkencool »

Nuclearo wrote: You're making the assumption I'm a man :P
Touche
User avatar
NeonStorm
Posts: 173
Joined: 23 May 2012, 18:36

Re: Metal Extracting Factories

Post by NeonStorm »

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?
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.
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"?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Metal Extracting Factories

Post by zwzsg »

You now have one metal map too many.
Nuclearo
Posts: 5
Joined: 28 Jul 2013, 10:52

Re: Metal Extracting Factories

Post by Nuclearo »

I want to make an asymmetrical resource system.
  • 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.
Spawning extra geos in start locations and possibly around the map sounds like a good way at it.
NeonStorm wrote:Do you want for the first ressource a gain related to game-time only?
I didn't quite understand the question
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"?
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).

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
User avatar
NeonStorm
Posts: 173
Joined: 23 May 2012, 18:36

Re: Metal Extracting Factories

Post by NeonStorm »

Nuclearo wrote:
NeonStorm wrote:Do you want for the first ressource a gain related to game-time only?
I didn't quite understand the question
You get 1 metal every second. Basic units like geos cost only metal.
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 :)
Nuclearo wrote:
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"?
Not sure I understood either, but I think yes
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).

Now, an obsolete question, because you said that gas let you upgrade units - which makes it independent from build power.
Post Reply

Return to “Game Development”