MegaGlest Forum
Modding and game content creation => Mods => Topic started by: Y on 21 August 2016, 22:02:12
-
Hi!
I have a question:
Can I create a building that produces a certain resource over time, as consumable resources, but that is consumed instantly, as static/tech/tileset resources?
Like having a building named mine producing iron, 10 per minute for example, but if I builded a unit that costs 100 iron, they are removed from the iron stock and not changing the flow to -90 iron/minute (as does food in Megapack).
I have unfortunately not found an answer on the forum, I missed a post on this?
Thanks!
-
There isn't a building like this, but it is a valid idea for late game play.
-
I rephrase my question:
Is it possible to spend the stock of a consumable resource without changing the flow?
-
So you want something that produces non consumable resources ?
Update:
Sadly there is nothing told in the wiki about it, but as far as I remember something like this was done in some mods.
You can look at the military mod ( mod center ) which uses a pump to get Oil. And the there is one of the VBROS mods which uses a pond which poduces "fish".
Maybe not exactly what you want but amybe it helps. BTW if this is not implemented yet and is needed write a feature request here in the forum. ( please detailed with a possible xml example)
-
Precisely the opposite!
I want a resource that is produced and stock over time as food, but that I can spend as wood / stone / gold.
-
Gold stone wood are non consumable resources, so we talk about the same :)
( btw see my update above )
And if you find out how to do it, PLEASE update the wiki!
-
haha yeah I just understand your point of view.
That's it, I want a resource that is produced as a consumable, but that spend as a normal, hence the ambiguity :)
Ok, I'll watch the military mod, the oil resource seems to be a perfect example of what I wish!
Thanks!
-
Ok, that doesn't really work in enemy and allies .....
BUT:
My son already implemented this but its still a pull request at the moment: https://github.com/MegaGlest/megaglest-source/pull/64
As Resource it uses "produced" instead of static.
Syntax would be like this:
<resource>
<image path="images/housing.bmp"/>
<type value="produced">
<interval value="1"/>
</type>
</resource>
Would this be useful for you?
-
The current pull request does not fully work as expected, but we are working on it now.
-
Ok, cool :) !
Because I think that such resources is quite common in games.
I'm working on a custom factions editor, and I imagine factions having specific resources, where you can build a custom production building, like a pump for modern factions, or farm for medieval factions.
Each faction choosing the name of the resource (and its image), and the name of the production building (and its 3d model).