Description
Generous Operator
Requires CommandDeck 1.1.0 or later (on Nexus Mods: CommandDeck).
One-click gifts for server operators. Type /generousoperator, pick a player (or everyone online), pick a kit, and press Give. The recipient is told who sent it, and every gift goes in a log.
It's a catalog of kits, not a cheat menu. Kits come from catalog files that any mod can ship, and server operators can add their own. Every gift runs through CommandDeck as the person giving it, with their own permissions, so a gift can never do more than its giver could.
Features
- The gift window. Choose who it's for first, then a kit. Kits are grouped and searchable, and with Calendar & Seasons installed, seasonal ones come first when they're in season.
- See it before you give it. What the kit may contain, the message the recipient will see, and the command that does the same thing.
- Kits that can't be given right now stay visible, dimmed, with the reason: already received, daily cap reached, a cooldown, a missing permission.
- Everyone online at once. One confirmation for the whole batch; players who can't receive it are skipped and listed with the reason, and a batch can be stopped partway.
- Random tables. Chances, weighted picks, dice counts (
2d6,1d4+1) and tables nested across catalogs, checked for loops when they load. - Once per player, for welcome packs and boosters.
- Optional limits: gifts per giver per day, gifts per player per day, and a wait between gifts to the same player.
- The gift log. Who gave what to whom, the items actually given, and the roll's seed, in the window's Log tab and in
gifts.log. When the server's economy goes strange, it answers "who spawned 400 gold bars". - Messages: the recipient sees the giver's name, or "An operator" if you prefer; an optional announcement to everyone.
- Settings without a restart, in
config.jsonor in Mod Settings Manager's window.
Install
- Install CommandDeck 1.1.0 or later.
- Put
GenerousOperator-1.0.0.jarin your server'smodsfolder (singleplayer:%APPDATA%\Hytale\UserData\Mods\). - Start the server and type
/generousoperator.
Commands and permissions
| Command | What it does |
|---|---|
/generousoperator |
Opens the window |
/generousoperator <player> <kit> |
Gives a kit to a player |
/generousoperator all <kit> |
Gives it to everyone online (asks first) |
/generousoperator confirm |
Gives what's waiting for your confirmation (within 60 seconds) |
/generousoperator kits |
Lists the kits you can give |
/generousoperator log [player] |
The last gifts, or one player's |
/generousoperator reload |
Reads the catalogs and settings again |
/gift works the same, unless another mod has taken it.
Permissions: generousoperator.give to give and read the log, generousoperator.edit to reload. Gifts run through CommandDeck, so the giver also needs commanddeck.use, and commanddeck.run_others to give to anyone but themselves. Items are given with the game's /give, which the game checks as usual. Operators have everything.
Kits
Version 1.0 ships kits a new server can use straight away:
-
Healing potions in four tiers, from 5 Lesser Health Potions (30% each) to 5 Greater ones (75% each), matching the Alchemy bench tiers.
-
Food in three tiers: Camp Rations (campfire food), a Cook's Basket (bread, skewers, salad) and a Feast Hamper (pies and Caesar salad).
-
Give an apple, the smallest example of a kit.
Add your own as JSON files in
mods/Hledjolf_GenerousOperator/catalogs/, then type/generousoperator reload. A kit is a list of items, or a random table, with a name, a group and a few switches (once per player, exempt from limits, its own message). One bad entry never stops the rest from loading.
For mod authors
- Ship kits in your own mod: a
generousoperator/catalog.jsonfile in your jar. Without Generous Operator installed, it's never read, so there's no dependency. - Give kits from your mod through the public API (
generousoperator.api), as a player or from the server. - Gifts from the server (rewards, quest prizes) are allowed only from mods the server operator trusts, and are capped by a power rating from the game's own progression: the earliest world zone where an item can be had.
- The catalog format is documented in the source repository (
docs/catalog/README.md) and is MIT, like the rest.
Coming next
The kit editor (making kits in the window), "whoever I'm looking at" as a recipient, and kits that heal or help instead of handing over items.
License
MIT. Bundling it in a modpack is fine: keep the license with it.
Source and issues: https://github.com/Hledjolf/GenerousOperator






