dcpc Posted January 12, 2015 Report Share Posted January 12, 2015 I'm trying to create a player state vector that is updated every 20 or 30 seconds and collects data such as the number of each resource and numbers of units of each class to be stored in a vector as a game goes on.It would look something like this:time wood metal food stone melee horse skirmisher ... etc0 300 300 300 300 5 1 3 ...30 120 450 60 420 12 5 7 ..With a new string being added on to the end every 30 seconds with the players information at the time of collecting it as the game is played. However, I'm having a lot of difficulty finding where in the code this kind of data is stored, or how it is accessed. I've looked through the save game functions and found out about the component manager and serializer and and how component classes has serialize methods, but none of these components seem to have anything about the data relating to a players resources or unit numbers.Does anyone have any insight on how to accomplish this task? More specifically what files handle real time player's resource and unit information?Thank you. Quote Link to comment Share on other sites More sharing options...
agentx Posted January 12, 2015 Report Share Posted January 12, 2015 Have a look at the charts mod thread: http://www.wildfiregames.com/forum/index.php?showtopic=18763&hl=chartsand the StatistiksTracker: http://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/components/StatisticsTracker.jsShould give you an idea where to grab the data and may even help to connect your code to the game. There is quite a wealth of data available. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.