Author Topic: [invalid] 3.10.0-dev 4808.30d3626: bugs with shared resource caps  (Read 947 times)

ctz

  • Summoner
  • **
  • Posts: 46
  • aka cathaur, formerly lyra
    • View Profile
Shared resources were introduced here.

There are bugs in the implementation that are visible when one player is a net consumer (negative resources) and for another is a net producer (positive resources).

The bugs are most visible when the producer reaches the shared resource cap.  For example, one faction, a producer, might have 4000/2000 gold when total storage is 4000, (2000 for each faction), while the other faction, a consumer, might have -3900 gold.  The combined gold of the two factions only 100, but now, the producer cannot store any more gold; the only way for the team to get more gold is for the faction with negative gold to produce some.  This kind of situation might occur when players agree to handle different roles (e.g. resources/combat), or when one player is a human and the other is CPU.

Now destroy the producer's storage building.  The team's storage capacity decreases by 2000.  However, the producer now has 0/0 gold--it decreased from 4000/2000!  The consumer still has -3900 gold, so the team now has -3900 gold.  The consumer now has to make up the gold debt before anything else can happen.

Desired behaviour:
There should be no resource cap per player; it should be possible for two players to respectively have, for example, 10000/2000 and -9999/2000, for a team total of 1/4000.
The individual resource count/cap should only be the net produced/consumed, which is just some possibly interesting information; it should have no effect on the game.  Only the team total resource count/cap should matter.
When storage capacity is destroyed and it is necessary to cap the team's resources, it should only be decreased to the team's total storage cap; the deducted amount can be subtracted from the destroyed player's resource count, if it is necessary to keep track of that, but again, the individual resource counts should have no effect.

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Re: 3.10.0-dev 4808.30d3626: bugs with shared resource caps
« Reply #1 on: 15 November 2014, 01:05:38 »
This is not a bug as is working as it was designed to work. The basic concept when this was added is to allow pooling the resources for use to the team, but each member stil lcan only produce to his faction's maximum. The - #'s can occur and means the team has to 'make up' for the loss.

Thanks

 

anything