nid hat eine neue Datei hinzugefügt:
NidToolbox: Server Rules module

QuoteDisplay More
Server Rules Module
for NidToolbox Light
requries nid-core module available here
This module enables sever owner to enable and enforce set of Server Rules. Certain actions of the players can be restricted, until they have accepted the Server ruleset.
Server Rules module offers:
- Prevent player actions as: mining, digging, loitering, tree chopping until they have accepted server rules.
- Module has own AuthProvider, which means it does not mess or interfere with Server's established laws or demographic systems and allows for module to have more granular control on what players can and cannot do.
- Provides means for the admins to help protect the server from players, who log just for short time and create mess on the server.
- Ability to customise Rules popup - it supports all standard Eco's formatting- such as: <b> <color=yellow> <u> or icons.
- Ability to customise confirmation button that displays the required info to the player, prior to the rules acceptance.
- Easy reloads, without the need of a server restart.
- Configuration of the plugin can be displayed at any time, without the need to dig into the files themselves.
- Possibility to require a password for the Rules acceptance, that can be hidden somewhere within Rules text. It helps assure that players actually read the popup
- Ability to easily display players, who have not accepted the rules yet.
Future plans:
- This module will be extended in the future to allow the ability to prevent or limit certain actions for exact amount of time , issue temporary bans and such.
Requirements:
As any module of NidToolbox set, it requires nid-core version 1.0.1+ module, available in the main forum thread: here
Settings files:
Config files are located at Mods\NidToolbox\Configs\
ServerRules.json - stores configuration options of the plugin.
Rules.txt - stores text for the Rules popup. Supports standard Eco's formatting tags .i.e <b> <u> <color> or even icons.
RulesConfirmMessage.txt - stores the text for the Confirmation Button (see below) that displays the final conformation message to the player, prior for them accepting the rules. The lookout of this button can be tested via /rules-showbutton command. Button text also supports standard Eco's formatting tags .i.e <b> <u> <color> or even icons.
All config files are created upon first start of the plugin.See below for examples.
Rules.json
Code Display More{ "Info1": "NidToolbox Light: Rules settings.", "RulesEnabled": true, "InformEveryone": true "PreventClaiming": false, "PreventChopping": false, "PreventMining": false, "PreventLittering": false, "PasswordEnabled": false, "Password": "someSecretPassword" }
RulesEnabled sets the module enabled or disabled, can be set in game via /rules-enable command.
InformEveryone toggles the message to be sent to everyone on the server, when someone accepts the rules.
PreventClaiming prevents claiming action until player accepted server rules, can be toggled in game via /rules-prevent claiming with bool true or false.
PreventChopping prevents tree chopping action until player accepted server rules, can be toggled in game via /rules-prevent chopping with bool true or false.
PreventMining prevents mining action until player accepted server rules (this also includes digging action), can be toggled in game via /rules-prevent mining with bool true or false.
PreventLittering prevents dropping trash action until player accepted server rules, can be toggled in game via /rules-prevent littering with bool true or false.
PasswordEnabled sets password requirement to true or false, can be toggled in game via /rules-requirepass with bool true or false.
Password sets the actual password, can be changed in game via /rules-password.
See below for the list of all available commands in this module with their example usage.
Rules.txt
RulesConfirmMessage.txt
CodeYou need to <color=yellow><b>accept rules</b></color> to play on this server. Certain actions are <color=red><b>disabled</b></color>, until you do so. To review the ruleset again, select <b>No</b> and invoke <color=yellow>/nid-Rules</color> command. Do you <b>accept</b> the ruleset of this server?
This configuration file, affects this button in game: (click to see the image)
Example screenshots:
Available commands:
/help nidRules
Displays information about all commands contained within this module.
/rules-reload
Reloads Rules message from the Rules.txt file.
/nidrules-reload
/rules-show
Shows current Rules popup.
/rules-show
/rules-enable
Sets the whole module to enabled or disabled state
/rules-enable bool trueFalse
/rules-prevent
Prevents set action from being used by player until they accept the rules. Accepts the following options as actionName claiming chopping littering mining
/rules-prevent string actionName bool true or false
/rules-not
Displays the set of players who have not accepted the server ruleset yet.
/rules-not
/rules-requirepass
Sets the password requirement for rules acceptance.
/rules-requirepass-title bool trueFalse
/rules-password
Sets the actual password.
/rules-password string password
/rules-showconfig
Shows the current configuration of the module
/rules-showconfig
/rules-showbutton
Shows confirmation button to test how it looks. Clicking yes or no has no effect, as this is just a test.
/rules-showbutton
/rules-accept
Allows to accept server rules, triggers confirmation button to appear for the accepting player.
/rules-accept string password (it is optional)