Skip to content

Commit 3704ee1

Browse files
authored
Update README.md
1 parent 72e6165 commit 3704ee1

File tree

1 file changed

+24
-15
lines changed

1 file changed

+24
-15
lines changed

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,50 @@ Weighted Traitor Selection allows players to be fairly selected to become traito
99
Once you become traitor, your weight gets reset down to a default weight.
1010

1111
# Installation
12-
1. Copy the folder "tttweightsystem" into your addons folder.
13-
2. Mysqloo (MySql) - system uses database to keep persistent weights for all the players. The weights are persistent across maps so if you have a 90% chance to become traitor next round and the map changes you will still have the 90% chance in the next map (as long as no one joins who has a higher weight), It also deletes any records any 3 weeks old (to prevent it from getting cluttered)
14-
3. Run server once and it will generate a database-template.txt in garrysmod/data/weightsystem copy and rename it to database.txt and edit the settings inside to use your database settings. (keep it in the same folder)
12+
1. Copy the folder `tttweightsystem` into your addons folder.
13+
2. Mysqloo (MySql) - system uses database to keep persistent weights for all the players. The weights are persistent across maps so if you have a 90% chance to become traitor next round and the map changes you will still have the 90% chance in the next map (as long as no one joins who has a higher weight), It also deletes any records older than 3 weeks old (to prevent it from getting cluttered)
14+
3. Run your server once and it will generate a database-template.txt in `garrysmod/data/weightsystem`, copy and rename it to database.txt and edit the settings inside with your database connection info. (keep it in the same folder)
1515

16-
Once the database settings are configured it will create the table and make sure everything that is needed is there.
16+
Once the database settings are configured in the database.txt, restart your server or change maps for it to generate the tables. Once the tables are created, thats it! Go gain some weight!
1717

1818
# Commands
1919

2020
**ttt_traitor_chance_command**: Sets the command players can use to see their traitor chance. If ttt_show_traitor_chance is set to 0 this will not work. (default !TC)
2121

2222
**ttt_karma_increase_weight**: If you want people to get a slight increase in weight (0-2 weight) for good karma you have to enable this command. (Default 0)
2323

24-
**ttt_karma_increase_weight_threshold**: This is the minimum amount of karma needed to get the increased weight buff. If they are below it they will just get regular weight. (default 950 based off of the default max karma.)
24+
**ttt_karma_increase_weight_threshold**: This is the minimum amount of karma needed to get the increased weight buff. If they are below it they will just get regular weight. (default 950, based off of the default max karma in regular TTT)
2525

26-
**ttt_show_traitor_chance**: At the beginning of every round it sends out a message stating what your chance is to become traitor in the next round.
26+
**ttt_show_traitor_chance**: At the beginning of every round it sends out a message stating what your chance is to become traitor in the next round, or in the next map.
2727

2828
**ttt_weight_system_fun_mode**: Allows the players weight to be portrayed onto their model. (default 0) would not suggest this to be on 24/7 more of a fun mode to have on every now and then (0% chance is normal model, 100% chance is much fatter model, everything else is in between)
2929

3030
![Image of fat person](http://puu.sh/ignmA/0ed089cde9.jpg)
3131

3232
# Admin Commands
33-
**ttt_weightlogs**: (just typed into console) This allows admins to view all players weight and their chance to become traitor. As well as see the count of how many times each player has been a specific role. In the weight menu you can also get the players SteamID and set their weight back to default or set the weight to what ever you want, giving the player a higher chance or lower chance at becoming traitor in next round.
33+
**ttt_weightlogs**: (just typed into console) This allows admins to view all players weight and their chance to become traitor. Admins are also able to see a count of how many times each player has been a specific role. In the weight menu you can also get the players SteamID and set their weight back to default or set the weight to what ever you want, giving the player a higher chance or lower chance at becoming traitor in next round.
3434

35-
There is "groupperms.txt" in data/weightsystem that is created, it default makes it so admins and superadmins can access the ttt_weightlogs command. Make sure you add in any groups that you would like to have permissions to use the command.
35+
To gives users permission to `ttt_weightlogs` they must be in an allowed group. Any group you want to have access must be added to the `data/weightsystem/groupperms.txt` file which gets generated on first load of the script.
3636

37-
# Group Extra Weight
37+
![Admin menu](https://puu.sh/wxU0C/64f9a81d20.png)
3838

39-
A feature that was requested was to be able to give people some extra weight based on the group they are in. You can now do this by running the addon on the server at least once and you will see a new file get added into "~/Data/tttweightsystem/" on the server called groupweight-template.txt which looks like the following:
39+
# Group Extra Weight
40+
This feature was requested by a user, with it you have the ability to give certain groups extra weight. For example you can have donators get 1 or 2 extra weight every round to increase their chances of being traitor more often. Like the `database.txt` file a `groupweight-template.txt` will be generated with an example (like below) that you can use. You can also just create the file yourself and name it `groupweight.txt` and make sure it is in `/data/weightsystem/` folder.
4041

41-
```
42+
```json
4243
{ "1":{ "MaxWeight":10, "GroupName":"[GroupName]", "MinWeight":0 }, "2":{ "MaxWeight":10, "GroupName":"[AnotherGroupName]", "MinWeight":5 } }
4344
```
44-
If you want to use this extra weight system you will need to copy the template and rename it to groupweight.txt and update the json mentioned above. (if you do not want to use this feature just don't bother creating a groupweight.txt file in the folder the addon looks for that specific file):
4545

46-
You will be able to enter the min and max weight (the addon selects a random number between the min and max) and the group name such as "superadmin" or "regular" or "donator". The JSON in the file will be minified but you can bring it into a JSON formatter (http://jsonformatter.curiousconcept.com/) to be able to read it easier. Users will also have it printed out to them that they were given extra weight because they were in a group. I will probably make that optional or remove it in another version.
46+
If you do not want to use this feature simply don't have a file named `groupweight.txt` in the `/data/weightsystem/` folder with a proper configuration.
47+
48+
The settings for the `groupweight.txt` are as follows -
49+
50+
**MinWeight**: The minimum amount of weight you would want added to users in the group.
51+
**MaxWeight**: The maximum amount of weight you would want added to users in the group.
52+
**GroupName**: The group you wish for a random amount between MinWeight and MaxWeight to be added.
53+
54+
As a note, users who are in a group and receive extra weight will be told they are getting extra weight because they are in the group.
55+
56+
57+
4758

48-
~[Image of players weights](http://puu.sh/if2C3/6c3a9e50f1.png)
49-
~[Image of players role count](http://puu.sh/if2CK/b71d200977.png)

0 commit comments

Comments
 (0)