Food
Posted: 29 Jul 2006, 17:43
Since it has been mentioned that Unit Limits and Supply Based Limmiting are completely different things... Here, I'm making a new thread.
Issues to address:
More generic resources:
Generic Resources must not conflict with the current resource system, so the first thing to do would be to impliment the current resources with a new system.
I would put the primary information into the the gamedata folder, I would like it to go in the sidedata file, but it can be it's own file or whatever.
CostType=-1 no buildtime for this resource type, so something that costs 100 metal and 100 energy, but 5000 of this resource type will take the same amount of time to construct as a unit with just the 100M 100E cost.
CostType=0 means begin construction and wait for resources,
CostType=1 don't build unless resources are currently held, these resources would have to be instantly condumed by the contructed unit and released if the unit is destroyed... basically supply.
Storage=-1 : no max, centally stored
Storage=0 : standard "have to have NameStorage=value" on units, centrally stored
Storage=1 : unit specific storage (magic points/ammo), units with storage will have have a way to produce this in order to not be empty, unless you had a way for another unit to induce it (repair pad, temple proximity, script command).
This would allow implementation of pretty much any Xcraft/AOE/other RTS resource system or supply system.
Technically you could impliment an individual unit limit system with this, but as smoth keeps pointing out, it's not ideal for that purpose.
Example Implimentations to follow:
Then basically you would have a series of units, a gaia controlled unit that would start with X gold, it would load a gathering unit and remove a minegold from itself and provide a unit of minegold to a loaded gold gathering unit and repeat until the unit's storage was filled, a series of gold gathering units that would have some kind of "gold gathering AI" path created for them, and a base unit that would load, remove MineGold and add NormalGold to the central store.
Issues to address:
More generic resources:
Generic Resources must not conflict with the current resource system, so the first thing to do would be to impliment the current resources with a new system.
I would put the primary information into the the gamedata folder, I would like it to go in the sidedata file, but it can be it's own file or whatever.
Code: Select all
[Resources]
{
[Resource1]
{
name=Energy;//The name called by UseX, MakeX, ExtractsX
maxvalue=0;//0=no max
Display=0;// -1=hide, 0 bar, 1 numbers only
Colour1=0.5 1.0 0.5;
Colour2=0.0 0.0 0.0;
Wind=1.0;
Tidal=1.0;
Solar=1.0;
Thermal=1.0;
CostType=0;
Storage=0;
}
[Resource2]
{
name=Metal;
maxvalue=0;
GroundMetal=1.0;
Colour1=0.5 0.5 0.5;
Colour2=0.0 0.0 0.0;
Display=0;
Storage=0;//
}
}
CostType=0 means begin construction and wait for resources,
CostType=1 don't build unless resources are currently held, these resources would have to be instantly condumed by the contructed unit and released if the unit is destroyed... basically supply.
Storage=-1 : no max, centally stored
Storage=0 : standard "have to have NameStorage=value" on units, centrally stored
Storage=1 : unit specific storage (magic points/ammo), units with storage will have have a way to produce this in order to not be empty, unless you had a way for another unit to induce it (repair pad, temple proximity, script command).
This would allow implementation of pretty much any Xcraft/AOE/other RTS resource system or supply system.
Technically you could impliment an individual unit limit system with this, but as smoth keeps pointing out, it's not ideal for that purpose.
Example Implimentations to follow:
Code: Select all
[Resources]
{
[Resource3] //don't want to overide orriginal resources
{
name=Gold;
maxvalue=0;
Colour1=0.7 0.7 0.0;
Colour2=0.1 0.1 0.0;
Display=1;//display as numbers
Storage=-1;//store centally with no max
}
[Resource4]
{
name=MineGold;
maxvalue=0;
Colour1=0.7 0.7 0.0;
Colour2=0.1 0.1 0.0;
Display=1;// display as number
Storage=1;// each unit carries it's own gold, would check by selecting
}
}