Add basic gameplay metrics

PR link: Add very gameplay metrics by beck-thompson · Pull Request #38238 · space-wizards/space-station-14 · GitHub

----- Description -----

This PR will add a basic system for recording metrics about how players interact with the game! The idea would be to start logging everything that we would want to track, e.g uplink purchases, objective completion rates, cargo orders etc…

Right now, I just added a few basic examples (Unfortunately, stuff like objective completion rates and ore mining require some fixes before they can be easily added in a way that makes sense) but it’s extremely easy to add more of these where necessary.

----- Discussion about the implementation -----

Now everyone agrees that having this kind of data is important, the main issue is exactly how we should implement it :laughing:!

This implementation is very simple, it really just plops all the data into a table. The alternative that I’ve seen discussed is some kind of streaming service (Like Loki or Prometheus). From my (limited) understanding, for the kind of metrics we use it would either be some kind of new system or piggyback on Loki log system (I don’t think Prometheus is the right tool).

I’m going to lay out the pros and cons from what I understand.

Pros of the basic logging system:

  • The implementation is dead simple, the actual core logic is maybe ~100 lines mostly in one file. Setting up a good streaming system would require more logic and would be complex. This will make it very easy for forks who (from what I see) rarely understand how to do more advanced grafana stuff (if they even have it enabled at all).
  • The system is complete, and can work right now! Because of the aforementioned complexity of the streaming system, I don’t see something like that getting merged within 6 months, even if we started working on it now.

Cons of the basic logging system:

  • It isn’t the fully “right” way of doing it, the streaming system would be the best implementation. I’m not well versed enough to know exactly what the benefits of the other system are, but it would make sense to do it from a design perspective.

Finally, I think some kind of metrics system is pretty important! Just today there was a big discussion about the hypereutactic blade which could have had a lot more nuance if we had more stats besides just purchase rate. Same can also be said with even more advanced stuff like salvage balance! Also just to be super clear: am not attached to this PR in particular, I spent a decent amount of time on it but if its not the right choice, its not the right choice and I’m totally fine to close it (I also learned a lot so its already a win in my book :laughing:). I just think a system like this would make a lot of arguments just go away and put the game in a lot healthier of a state!

1 Like

This could be a good first step to having crewmov green texts such as science completing all research in a shift or med saving a quota of crew in a shift. I look forward to what we can do with these logs and think it would be personally intresting to see my own logs.

I don’t see why this is in Development > PR Reviews ? Shouldn’t technical reviews be kept on GitHub?

When it came up in discord, there was disagreement on how exactly it should be done and I thought this would be the best place to talk about it - if you think this should be on github that’s also fine just let me know and I can close it