Miscreated

Miscreated

27 ratings
PVP/PVE Stats
   
Award
Favorite
Favorited
Unfavorite
Mods: Admin
File Size
Posted
Updated
5.475 KB
3 Oct, 2019 @ 10:15pm
20 Sep, 2021 @ 1:01pm
12 Change Notes ( view )

Subscribe to download
PVP/PVE Stats

Description
A script to count and store PVP/PVE statistics.

IMPORTANT
This mod needs [ModResource] MisDB in order to work and persist data. Add the mod Id '1841357578' before the PVP/PVE stats id to make sure the scripts are loaded properly.

----------------------------------------------------------------------

Features
- This mod gives the server the ability to store all players PVP statistics, such as kills, headshots, deaths and suicides.

- Stores the server session data (meaning that it'll store player statistics until the server is restarted), good for those custom PVP maps that restarts when someone reaches X amount of kills.

- Also stores the global stats for each player, which persist through server restarts, so the player can check their all-time statistics.

- As of v1.1, PVE statistics are also accounted (mutants and wildlife kills and player deaths by said entities).

- Provides an all-time top 10 player, mutant and wildlife killer list.

- Displays global messages (the ones on top) when a player kills another one, when a player headshots another one and when a player suicides (tested this on fall death, haven't tested on other situations yet).

- Includes a rank system that is basically a copy of the official Discord ranking system with a bunch of new ranks.

- As of v1.1, server owners have the ability to make configurations for this mod, details are provided in the Notes section.

Chat commands
- !kc score: To check your server session PVP score.
- !kc stats: To check your global persisted PVP data.
- !kc top10: To check the server's top 10 player killers.
- !kc mscore: To check your server session PVE score.
- !kc mstats: To check your global persisted PVE data.
- !kc mtop10: To check the server's top 10 mutant killers.
- !kc atop10: To check the server's top 10 wildlife hunters.

Notes
- A suicide counts as 1 point for the player's suicide stat and a -1 point for the kill stat.

- Sometimes !kc stats and !kc mstats may not work, just try again.

ABOUT THIS MOD CONFIGURATION (FOR SERVER OWNERS)
- In order to make these configs work, the server has to be started at least ONCE after installing this mod or updating it to v1.1. This is necessary to generate the file with the default configs.

- There's 4 configurations:

* kc_pvp_pve_toggler: Which enables PVP, PVE or ALL scoring and storing of statistics. 1 enables PVP (and !kc score, !kc stats, !kc top10 commands), 2 enables PVE (and !kc mscore, !kc mstats, !kc mtop10, !kc atop10 commands), 3 enables everything.

IMPORTANT NOTE: I've tested almost all the current AI for PVE stats (except pigs and roosters, let me know if they work or not), but I cannot guarantee this feature is fully functional due to the limitations on capturing killing AI events, so the default configuration for this is 1 (PVP).

IMPORTANT NOTE 2: If the server has custom modded AI, PVE stats wont work if the mutant or animal class name is different than the ones the vanilla game provides. I'm trying to figure out a configurable option for server owners to add their own class names which will have some extra requirements.

* kc_global_notifications: Determines if the player kill/suicide messages are global or just for the parties involved (local so to speak). 1 for global (default), 0 for local.

* kc_subtract_kills: Determines if a suicide death can subtract a kill from the player's stats. 1 for yes (default), 0 for no.

* kc_force_topten_refresh: Forces an up-to-date top 10 load each time a player types any of the top10 commands, so a restart isn't needed to update the charts. 1 is enabled, 0 is disabled (default).

IMPORTANT NOTE: I can't give you a fair estimation of the server performance impact if this config is enabled, have in mind that the tables have to be sorted each time a player uses the commands, so for me it's kinda a gray area and I'm not sure how the server will behave or perform when this is being called multiple times in short time spans AND when the player list grows a considerable amount.

- Once the server was started at least once, you will find a file called 'ConfigCollection' in your server directory like so:

'your_server_root_folder/KillCounterDB/KillCounterData/ConfigCollection'

Open it with any decent text editor (sublime text, notepad++, visual studio code, etc) and you will see stuff like:

"kc_global_notifications":1.......

Just change the number after the : to the number option you wish to be applied on your server.
Make sure to only use the number options provided or the mod will probably either fail or use the default values.
To see your changes in action you need to restart the server after saving the file.

How to use this mod:
To enable this mod on your server add '1841357578' then '1879915972' to your steam_ugc in the hosting.cfg like:

steam_ugc=1841357578,1879915972

If you are running multiple mods make sure to add a comma after each modID. Example:

steam_ugc=workshopid1,1841357578,1879915972,workshopid4
27 Comments
Cuartas  [author] 10 May @ 1:27pm 
I didn't explain "you had to" because you don't have to, the instructions clearly say:

ABOUT THIS MOD CONFIGURATION (FOR SERVER OWNERS)
- In order to make these configs work, the server has to be started at least ONCE after installing this mod or updating it to v1.1. This is necessary to generate the file with the default configs.

In technical terms, misDB which is the other mod the PVP stats mod requires, will try to reach for a file with a name I set, if such file is not found in your server it will generate it, then add the 4 configuration variables to it, that's why I ask for a server start at least once after the mods are included in the hosting.cfg file, so it automatically does that process.
Maddog -HH- 9 May @ 5:38pm 
Dont you think that if I did read the directions and was successful i would not be asking you? I had to Create the Config file because you did not explain that I had to.
Cuartas  [author] 22 Apr @ 5:55am 
Also, with miscreated, to use mods, subscribing to them is not the way, again, follow the instructions
Cuartas  [author] 22 Apr @ 5:55am 
Just follow the instructions in the description, it's pretty straightforward
Maddog -HH- 21 Apr @ 4:43pm 
How to Enable?
Maddog -HH- 21 Apr @ 4:42pm 
How do I configure this?
Maddog -HH- 21 Apr @ 4:29pm 
Well i finally found the correct one after going to re subscribe it recommended the correct one
Cuartas  [author] 19 Apr @ 9:09pm 
It is correct, the mod you're referencing is a copy posted by some chinese user, just use Theros' one
Maddog -HH- 19 Apr @ 11:20am 
I do not see any indication that 1841357578 is correct for the misDB mod. it is listed as https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=2743368473&searchtext=misdb
Cuartas  [author] 23 Jan, 2022 @ 8:03am 
You can read in the mod description how to change the settings guys, almost at the end of the ABOUT THIS MOD CONFIGURATION (FOR SERVER OWNERS) section tells you the path