-
Notifications
You must be signed in to change notification settings - Fork 5
Special Ranks
This plugin comes with nice rank system. There are a build in ranks that are more important for administration, special ranks modifies gameplay and adds some cosmetics. You can define your own special ranks wia json file. Plugin will generate a folder for all json files required for all configurations. Plugin also generates default file for every possible config. You can find config file for special ranks in mindustry-server\config\mods\The_Worst\config. It should be called specialRanks.json. The file should look like something like this:
{
"ranks":[
{
"name":"kamikaze",
"color":"scarlet",
"value":1,
"permissions":["suicide"],
"linked":null,
"description":{
"default":"put your description here.",
"en_US":"Put translation like this."
},
"quests":{
"deaths":{
"best":10,
"required":100,
"frequency":20
}
},
"pets":null
},
{
"name":"donor",
"color":"#ffd700ff",
"value":0,
"permissions":["suicide","colorCombo"],
"linked":null,
"description":{
"default":"For people who support server financially."
},
"quests":null,
"pets":["fire-pet","fire-pet"]
}
]
}Let's ignore properties with value of null for now. Obvious ones are "name" and "color".
"name":"kamikaze",
"color":"scarlet",These determinate how players name will be modified. You can test it in game by using setrank on your self (setrank donor). Both ranks are showing valid way to define color (color without a component is also valid). Next up is "value".
"value":1,This is important only for obtainable ranks (obtainable rank has to have quest property), if player can obtain more than one special rank, one with higher value will be assigned. Most important one is "permissions" property witch modifies the gameplay.
"permissions":["suicide","colorCombo"],You can assign how many permissions you want. List of permissions and what they do can be obtained via command /worsthelp permissions.Another important one is "description".
"description":{
"default":"put your description here.",
"en_US":"Put translation like this."
},This is what will be shown in game when you use /ranks info <rankName>. As you can see multiple languages can be supported.
If omit description it will show missing in game. Most complex of them all is quests property.
"quests":{
"deaths":{
"best":10,
"required":100,
"frequency":20
}
}, Progress and activity of player is tracked by the plugin and can be viewed in game with /info <id>. Ranks can use this
data to aromatically assign the rank. In above example you can see that rank is tracking players deaths. Because of "best"
property there cannot be more than 9 players with more deaths than the player otherwise he will not obtain the rank. Right
after is required. Let's say player died 200 times, Then he would satisfy this requirement, but if he has 99 he would not.
The last one is frequency, little complex one. In this case plugin will take players total deaths and davide them by his
playtime. If player played for one hour and died 25 times, he will get the rank. On the other hand if he would continue
for another hour and would not die once then 25/2 < 20 and so he would lose his rank. You can combine this however
you like. If any one of them is not satisfied player will not get the rank. Very special property is "pets".
"pets":["fire-pet","fire-pet"]What this one does will be enplaned in next part of tutorial because you have to define another config file for it to work. Last one, I promise, is "linked".
"linked":null,In case you want to merge your ranks to one above them, and you dont vant to revrite your quests. For example:
"linked":["kamikaze", "some other rank name you define"],Player first has to satisfy conditions for linked ranks as well as conditions of rank where it is defined in order to obtain it.
Last thing, to reload modified ranks use wconfig ranks.