Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3016 closed defect (fixed)

[PATCH] Add some player statistics to the basic simulation state

Reported by: agentx Owned by: Itms
Priority: Must Have Milestone: Alpha 18
Component: UI & Simulation Keywords:
Cc: Patch:

Description

sharedAI.playersData[playerid].statistics used to have an array of useful information:

buildingsConstructed buildingsLost buildingsLostValue civCentresBuilt enemyBuildingsDestroyed enemyBuildingsDestroyedValue enemyCivCentresDestroyed enemyUnitsKilled enemyUnitsKilledValue percentMapExplored resourcesBought resourcesGathered resourcesSold resourcesUsed tradeIncome treasuresCollected tributesReceived tributesSent unitsLost unitsLostValue unitsTrained

Please make this data available again.

Attachments (1)

api_fix.patch (3.5 KB ) - added by Itms 9 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Itms, 9 years ago

This was changed because some data in this array is expensive to compute (not much, but still).

All this data is available at the end of the game, do you need it before? If yes, in which situation?

Note: If you want to access it directly from the simulation, you can call GuiInterface.GetExtendedSimulationState().

comment:2 by Itms, 9 years ago

Component: AIUI & Simulation
Keywords: review patch added
Summary: Regression: Player statistics missing in bot API (build 16214)[PATCH] Add some player statistics to the basic simulation state

Hi agentx, this is a patch I wrote to modify the API. Could you apply it and test it to see if it suits your needs? (no recompilation is needed) If it does then I will commit it.

by Itms, 9 years ago

Attachment: api_fix.patch added

comment:3 by agentx, 9 years ago

Cc: agentx.cgn@… added

comment:4 by agentx, 9 years ago

Sorry Itms, forgot to cc myself. Will test today.

comment:5 by agentx, 9 years ago

Perfect! Thanks.

comment:6 by Itms, 9 years ago

Owner: set to Itms
Resolution: fixed
Status: newclosed

In 16264:

Add back some data to the basic simulation state, works around r16071.

Fixes #3016.

comment:7 by Itms, 9 years ago

Cc: agentx.cgn@… removed
Keywords: review patch removed
Note: See TracTickets for help on using tickets.