Storing Death Information - Printable Version +- Las Venturas Playground (https://forum.sa-mp.nl) +-- Forum: Main Talk (https://forum.sa-mp.nl/forum-3.html) +--- Forum: Development (https://forum.sa-mp.nl/forum-16.html) +--- Thread: Storing Death Information (/thread-31459.html) |
Storing Death Information - Jay - 02-18-2014 With the 0.3z release I was thinking it would be a good idea to store death information in the database: killerProfileId (if any) victimProfileId deathReasonId - see http://wiki.sa-mp.com/wiki/Weapons - this can include the weapon used or the way the player died, eg drowned, splat, etc timestamp isLameKill - lame kills are defined as driveby shooting, carbomb killing or heli kills - this can just be a boolean. I think this would be really interesting data to store. This would make it possible in the future to monitor things like favourite weapons, favourite/worst victim, etc. It could unlock a lot of cool new features that could be added in the future like extra bonuses for killing worst enemies. MrBondt was concerned that this is a lot of data to store so perhaps we could use this thread to discuss it. EDIT: Maybe we could store the position of the death too EDIT2: And bodypart Re: Storing Death Information - cake - 02-18-2014 I really like your idea, especially because we can use this data to show awesome stuff on the player's website profile, like a map of San Andreas with kill spots, an image of a skin with hitmarkers and all the stuff you mentioned. But I am afraid once we start capturing this data nobody is going to do something with it. I would really like someone to assure me that we'll have the website support this data BEFORE we start capturing data, so that we can roll out an awesome feature for every registered player. If we don't prepare the site for this right now, than it will probably never happen. Maybe this is also the right moment to expand player profiles with achievements and all. We should really take this opportunity and get it all done at once I'm happy to help out. Trac ticket: http://trac.sa-mp.nl/lvp/ticket/1391 Re: Storing Death Information - Kase - 02-18-2014 It would be great to store this kind of information and build features upon this data, but I'm afraid it would really be too much to store every single death in the database, as hundreds (or thousands?) of them would be registered every single day. We maybe could keep a record of information for each player, for example the number of times a player has shot a certain body part. If we can handle the amount of data, then I'm all for it Re: Storing Death Information - cake - 02-18-2014 http://wiki.sa-mp.com/wiki/OnPlayerWeaponShot and http://wiki.sa-mp.com/wiki/OnPlayerGiveDamage So lets make a list what we want to save for each player: - Total bullets fired (for each weaponId) - Bullets hit (for each weaponId) - Amounts of hits for each bodypart Re: Storing Death Information - Jay - 02-18-2014 Maybe we should trial this. Set up a table and do it through a filterscript for a few weeks and monitor the amount of data. Obviously this information would only be stored for registered players so I don't think it would be that high. Re: Storing Death Information - MrBondt - 03-01-2014 While I've indeed expressed concern about the amount of data we're planning to store here, I don't think that should stop us from at least trying it out. Having said that, we have to compile a list of data we want to store before we can decide on what to show on the website or even implement in the gamemode. Now that I got the disclaimer out of the way, on to dreaming! Can we detect what weapon a player is holding while on foot? If so, we can determine how many kills per minute they make per weapon. This might be a good statistic to show which weapons a player is most skilled in. Something else I was thinking of: now that we can detect hits, we can determine who contributed to the kill. If two or more players wound a player (and he doesn't get healed in the meantime), award a kill assist to the players who didn't get the kill. This statistic can be stored, as well as giving some sort of other reward (a money reward or something). To stretch this even further, you could determine how much damage was done by each player and raise or lower the reward based on that. For statistic's sake, I don't see any added value in this though. For every registered player we'd register these extra statistics:
For data to show on the website I was thinking along the lines of:
Let me know what you think! Re: Storing Death Information - cake - 03-03-2014 (03-01-2014, 07:42 PM)MrBondt link Wrote: Can we detect what weapon a player is holding while on foot? If so, we can determine how many kills per minute they make per weapon. This might be a good statistic to show which weapons a player is most skilled in.http://wiki.sa-mp.com/wiki/GetPlayerWeapon (03-01-2014, 07:42 PM)MrBondt link Wrote: Something else I was thinking of: now that we can detect hits, we can determine who contributed to the kill. If two or more players wound a player (and he doesn't get healed in the meantime), award a kill assist to the players who didn't get the kill. This statistic can be stored, as well as giving some sort of other reward (a money reward or something). To stretch this even further, you could determine how much damage was done by each player and raise or lower the reward based on that. For statistic's sake, I don't see any added value in this though.I like this, wouldn't be too hard to setup: KillAssistHandler.pwn which checks OnPlayerDamage who contributed to the damage, returns a reward OnPlayerDeath or reset this contribution whenever a pickup concerning armour/health is picked up. Show a textdraw '+1 assist' or something and show this variable on the site next to kills. (03-01-2014, 07:42 PM)MrBondt link Wrote:Is lame kill could be split up to 'Is heli kill' and 'Is drive-by kill'. Furthermore I completely agree with everything you've said and listed, and I don't think it can be more accurate. We should not forget to use all these variables to improve karma! I heard Jay has already set-up a filterscript? Re: Storing Death Information - Jay - 03-03-2014 (03-03-2014, 02:55 PM)cake link Wrote: I heard Jay has already set-up a filterscript? Nope. I'm willing to do it though. Just need the table structure Re: Storing Death Information - Jay - 03-03-2014 For the first version of this perhaps we should just keep it simple. Quote:General statistics Detecting the number of bullets fired per weapon isn't as easy as it sounds. We'd have to constantly monitor the number of ammo remaining using GetPlayerAmmo when OnPlayerWeaponShot is called. The problem here however is that GetPlayerAmmo IIRC isn't always 100% accurate. I suggest we leave this one out for now and I'll do some asking around and look into this again later. So just a table that allows us to store this data will be sufficient for now: Quote:Kill registration However I suggest we rename weapon used to reasonId to conform with this: http://wiki.sa-mp.com/wiki/Weapons Eg for things like running a player over etc. EDIT: With regards to kill assists - are we allowing an unlimited number of people to be involved with a kill or only 1 person? With 1 person for example: the person who assists the most gets the stat. If this is the case an extra field can be added to the above list for the profile ID of the person who gets the assist. If not, we'd have to create a new table to list all the killers who assisted per death. Re: Storing Death Information - striker - 10-18-2015 https://github.com/LVPlayground/playground/issues/10 |