Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#221 closed defect (fixed)

Resource counters went negative

Reported by: Jan Wassenberg Owned by:
Priority: Nice to Have Milestone:
Component: Core engine Keywords:
Cc: Anton Galitch, dacian Patch:

Description (last modified by Michael D. Hafer)

In an 1v1 game of Oasis, the stone resource counter was observed to be -1. After starting at 100 and building two houses (50 stone each), it should have been zero (and probably was). After a while of further play - without any harvesting of stone - the resource counter was shown as "-1". Failed to duplicate this in SP, so it's probably related to network transmission of the value.

Change History (7)

in reply to:  description comment:1 by Michael D. Hafer, 15 years ago

Description: modified (diff)

Replying to jan:

In an 1v1 game of Oasis, the stone resource counter was observed to be -1. After starting at 100 and building two houses (50 stone each), it should have been zero (and probably was). After a while of further play - without any harvesting of stone - the resource counter was shown as "-1". Failed to duplicate this in SP, so it's probably related to network transmission of the value.

Unverified: Could also possibly have to do with the "looting" feature. If one of your units was killed, it is possible the "loot" from his death was taking from your stockpile. I believe by default (in one of the parent files), "loot" is set at 1 for each resource. But of course your idea about network transmission might be correct.

This will take some verification (testing).

comment:2 by Jan Wassenberg, 15 years ago

Good call! Confirmed, Philip and I saw this in a network game today. (There was a probably unrelated desync issue, possibly because I starting giving orders when my host session started but while Philip's machine was still loading.) Anyway, exactly when my riders and also inf spearmen were killed, the -1 (per death) was deducted. So: we'd just need ensure resources are positive before allowing looting.

in reply to:  2 comment:3 by Michael D. Hafer, 15 years ago

Replying to jan:

Good call! Confirmed, Philip and I saw this in a network game today. (There was a probably unrelated desync issue, possibly because I starting giving orders when my host session started but while Philip's machine was still loading.) Anyway, exactly when my riders and also inf spearmen were killed, the -1 (per death) was deducted. So: we'd just need ensure resources are positive before allowing looting.

I don't think we should penalize the attacking player (the one that killed the enemy unit) by taking away the loot, just because the player who owns the killed/dead unit doesn't have enough resources. The resources were invested into the unit upon training, so I say the loot gained should not come from the stockpile at all.

comment:4 by Jan Wassenberg, 15 years ago

That makes sense. We (Philip,Anton,Jan) talked about this in the meeting and agree that the resources would already have been invested and that the player whose unit died doesn't need to be punished further. So: it'd be fine to just reward the player who killed a unit with loot without actually subtracting it from another player.

comment:5 by Anton Galitch, 15 years ago

I commited a fix yesterday, that has to be confirmed if it really fixes this or not.

comment:6 by Jan Wassenberg, 15 years ago

Resolution: fixed
Status: newclosed

Indeed; we tested during the meeting :)

comment:7 by (none), 14 years ago

Milestone: Open Source Release

Milestone Open Source Release deleted

Note: See TracTickets for help on using tickets.