Opened 11 years ago
Closed 3 years ago
#8 closed enhancement (fixed)
Add player position logging/drawing
Reported by: | Christian Illy | Owned by: | Christian Illy |
---|---|---|---|
Priority: | minor | Component: | Server fixes |
Keywords: | Cc: |
Description
Log positions of players to a DB (time, steamid?, nick, position). Could be used on a website to interactively follow players.
Alternatively simply draw positions in a file like in this script.
Attachments (1)
Change History (8)
by , 11 years ago
comment:1 by , 11 years ago
lp-output:
<counter>. id=<entityid>, <nickname>, pos=(-1418.5, 61.0, 104.5), rot=(0.0, 0.0, 0.0), remote=True, health=100, <steam guid64>
Total of <num players> in the game
comment:2 by , 10 years ago
In general I would prefer database logging to be more flexible.
For this idea it would be also good to be able to store other file values like players.xml and similar in the database (configuration parameter).
comment:3 by , 10 years ago
Disadvantage of a real DB: another dependency ;)
Depending on the system it might even draw in quite a lot stuff. Configurable storage backend would probably be the best solution but also the one requiring the most work.
Maybe the easiest way is to have another "hook" that is called on a regular base (like once a minute) getting passed the currently logged in players and their coordinates. This way dumping everything to a DB of choice would be quite easy. And I could provide simple hooks for MySQL.
comment:4 by , 10 years ago
If you don't want another dependency, the second way with a "hook" would be good enough.
Everyone is able to use the data like they want to.
I would say the best approach would be a cronjob similar system but we have to consider the telnet issues some players reported or trying to use another data source.
comment:5 by , 10 years ago
Component: | → Scripts |
---|---|
Owner: | set to |
comment:6 by , 7 years ago
Component: | Scripts → Server fixes |
---|---|
Status: | new → accepted |
This would actually belong in the mod and is definitely planned for when a DB is added.
From https://gist.github.com/oberhamsi/10415802