Food

Food

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Food

Post by SinbadEV »

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.

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=-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:

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
      }
  }
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.
Last edited by SinbadEV on 29 Jul 2006, 17:58, edited 1 time in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Oh yes it is, in the unit limit thread we've figured out that ti can be manipulated by giving units negative values, enabling a groups size to be made smaller to fit more in it, aka something similair to houses and population size in AoE..

maxvalue, CostType and Storage may need a little reworking.

Code: Select all

[Resources] 
{ 
    [energy] 
    { 
         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;
         image=energy.jpg;
         Wind=1.0; 
         Tidal=1.0; 
         Solar=1.0; 
         Thermal=1.0; 
         CostType=0; 
          Storage=0;//-1=no max, centally stored 
      } 
      [metal] 
      { 
          name=Metal; 
          maxvalue=0; 
          GroundMetal=1.0; 
          Colour1=0.5 0.5 0.5; 
          Colour2=0.0 0.0 0.0;
          image=metal.jpg;
          Display=0; 
          Storage=0;// 
      } 
  }
here, in the units tags would be energycost and metalcost, whereas in your previous example they'd be Resource1cost etc, this allows for longwinded names for resources with spaces in them without longwinded possibly parser breaking names in FBI's.

Also there's the consideration of moving the unit resource values into a seperate TDF file so they're all in one place, like build menus.

Also for the Starcraft or AoE style resource showing just numbers there should be an image=; tag for the icon next to the numbers and another value saying icon+text text or icon in the tag you specified controlling it.

Also instead of -1, 0, and 1, try 0, 1, and 2.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Post by SinbadEV »

AF wrote:Oh yes it is, in the unit limit thread we've figured out that ti can be manipulated by giving units negative values, enabling a groups size to be made smaller to fit more in it, aka something similair to houses and population size in AoE.
Is that saying that a more dynamic resource system would also effectively solve the unit limits issue?

AF wrote:Also for the Starcraft or AoE style resource showing just numbers there should be an image=; tag for the icon next to the numbers and another value saying icon+text text or icon in the tag you specified controlling it.
that's a valid point, I was assuming that the skin would impliment those features... but having defaults is good too... less work for skinners/makes it so modders don't have to make a custom skin to handle a new resource.

As for the -1/0/other I was working from the -1 means not applicable or unseen, 0 is the default value and 1 or greater are general options... I don't think I should be the one to decide the final format as I only know enough about modding and mapping to talk in generic terms.
Last edited by SinbadEV on 29 Jul 2006, 18:23, edited 1 time in total.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

yes. aka a resource call unit limit with no resource producers, yet units produce their cost when they die.

Also the global and per player limits of the unit limits thread could be applied to generic resources., and could even be expanded by the inclusion of storage, bringing in another thing into the fold, and squishing a bug request where soemone said they'd want a modder defined default starting storage.
Post Reply

Return to “Feature Requests”