MegaGlest Forum

MegaGlest => Bug reports => Closed bug reports => Topic started by: filux on 18 December 2014, 19:47:40

Title: [fixed]v.3.10.0-beta shared resources, killed our cpu, human stuck with debt
Post by: filux on 18 December 2014, 19:47:40
When cpu in my team was killed (completely) then I stuck with "team debt" and I couldn't build or produce anything.

(http://i61.tinypic.com/wjxq3b.png)

... also cpu is stealing a bit to much, somewhere should be added some limit for this.

Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: titi on 19 December 2014, 13:23:30
 :P
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: softcoder on 20 December 2014, 03:12:07
I'm not sure what really to do here. Setting to 0 would make unfair as team mates on a losing team make big debt on purpose while team is being destroyed and then would not have to pay it back. I think we just leave it like the way it is or suggest a faire compromise.
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: filux on 20 December 2014, 06:36:57
In my opinion I just should have the ability to pay off the debt (min. 190+, full 2190 for "clear situation"), it wasn't possible because I had maximum 2000/2000, it was a limit and I couldn't get more.
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: titi on 20 December 2014, 20:33:29
I think the resource of the dying faction must be given to the teammates ( if their faction supports if ).

for example gold:
4 players in the team
faction 1 2 3 use resource gold faction 4 is a non gold faction.

example1:
State:
Team has 200 gold,
dying faction1 has -8000 gold.

Now faction 1 dies:
this means faction 2 and 3 inherit -4000 gold each.
Faction 4 is not effected.



example2:
State:
Team has 2000 gold,
dying faction1 has 8000 gold.

Now faction 1 dies:
this means faction 2 and 3 inherit 4000 gold each. But ... if they cannot store this amount of gold its lost!
Faction 4 is not effected.
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: titi on 22 December 2014, 00:31:15
I know its not too easy to do, but filux can you prepare a savegame that will show this trouble (with CPU teammates) ?
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: filux on 24 December 2014, 06:35:56
Example save game (http://s000.tinyupload.com/index.php?file_id=90361895598298632281) with "stuck status", [Rev: 4985.2ec8dd9].
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: titi on 30 December 2014, 00:50:41
we don't have the map "face_off"
pleas upload it so we can test.
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: filux on 30 December 2014, 07:06:30
face-off.mgm (http://s000.tinyupload.com/index.php?file_id=02378926747634495548) map
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: softcoder on 30 December 2014, 21:52:49
Ok fixed in git, when the players units are all dead, the teams resources will not include anything related to dead players.
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: titi_son on 1 January 2015, 16:15:34
I think this must be fix by using the storage of the whole team as max storage.
So filux would be able to mine more gold even though his storage is full already.
This is not only negative for the left players because if the cpu had 2000 wood they can keep it (aslong as the team has enough storage)
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: softcoder on 2 January 2015, 00:31:32
Why dont you explain the problem with the current fix? What is wrong?
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: titi_son on 2 January 2015, 01:47:16
Why dont you explain the problem with the current fix? What is wrong?
As i posted i didn't knew about the bug either.
EDIT:I removed your fix for this problem in the pull request.

My idea to fix this Problem is to share the resource storage of a team too. By this the team still keeps the debts, but can pay for it. Another benefit is that we don't need to to calculate a death state of a faction.

Here is how filux save game starts
(http://i.imgur.com/utqr03v.png)

How much gold you can store is now calculated on a team basis. This means you can have more gold in your faction than you can store in your faction.

(http://i.imgur.com/tbyl7yo.png)

By this the debts can be paid back.

(http://i.imgur.com/Tyrbgtj.png)

Pull Request: https://github.com/MegaGlest/megaglest-source/pull/44 (https://github.com/MegaGlest/megaglest-source/pull/44)
EDIT2:Sry i made a really dump mistake  :confused: Now it's working
Title: Re: v.3.10.0-beta [5b82859] shared resources, killed our cpu, human stuck with debt
Post by: titi on 14 January 2015, 09:42:23
This is fixed now