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
}
}