PlaytimeBuffRewards

by El-Limon
for 7 Days to Die

Playtime Buff Rewards

Reward active players with more than just currency. Playtime Buff Rewards extends the normal playtime reward loop with configurable 7 Days to Die buff grants, generic server-console commands, and Takaro currency rewards.
The headline use case is 7D2D modded buffs: server owners can configure an hourly reward pool and let Takaro run commands like buffplayer PlayerName BuffName for online players. It also includes a permission-gated admin command, /grantbuff <player> <buffName>, so staff can manually test or grant a buff without waiting for the schedule.
Takaro dashboard install/update config for Playtime Buff Rewards

What it does

  • Hourly online-player rewards: The grant-playtime-rewards cronjob finds online players and grants one random configured reward to each player.
  • 7 Days to Die buff support: buffCommandTemplate defaults to buffplayer {playerName} {buffName}, with placeholders for {playerName}, {playerId}, {gameId}, and {buffName}.
  • Mixed reward pools: Combine buff rewards, generic console commands, and Takaro currency grants in the same weighted pool.
  • Staff testing command: /grantbuff <player> <buffName> is guarded by PLAYTIME_BUFF_ADMIN for manual buff grants.
  • Optional announcements: Broadcast configurable reward messages with placeholders like {playerName}, {buffName}, {rewardName}, and {amount}.

Example reward setup

For a 7 Days to Die server, leave the default buff command template and add the buffs from your mod pack:
{ "buffCommandTemplate": "buffplayer {playerName} {buffName}", "buffRewards": [ { "buffName": "WellFed", "weight": 2, "enabled": true }, { "buffName": "MegaCrush", "weight": 1, "enabled": true } ], "commandRewards": [ { "name": "Ammo bundle", "command": "give {playerName} ammo762mmBulletBall 30", "weight": 1 } ], "currencyRewards": [ { "name": "Pocket money", "amount": 25, "weight": 1 } ] }

Commands

| Command | Purpose | |---|---| | /grantbuff <player> <buffName> | Manually grant a buff to a player. Requires PLAYTIME_BUFF_ADMIN. |

Permissions

| Permission | Purpose | |---|---| | PLAYTIME_BUFF_ADMIN | Allows staff to use /grantbuff for manual grants and testing. |

Configuration

  • buffCommandTemplate: Console command template for buff grants. Defaults to buffplayer {playerName} {buffName}.
  • buffRewards: Weighted list of buff names eligible for the hourly reward cycle.
  • commandRewards: Weighted list of generic console commands for item, ammo, food, or custom rewards.
  • currencyRewards: Weighted list of Takaro currency grants.
  • announceRewards: Toggle broadcast messages for reward grants.
  • defaultRewardMessage: Fallback announcement when a reward does not define its own message.

Verified sandbox result

This module was smoke-tested against the Takaro sandbox on the live Paper server koji-paper-1 using a real Mineflayer player, Bot1_BuffTester.
Because Paper cannot run the real 7 Days to Die buffplayer command, the test used a Minecraft-safe template: say [PlaytimeBuff] {playerName} received {buffName}. The module still exercised the important Takaro path: online player lookup, player-name hydration, command template rendering, game-server command execution, announcement sending, and Takaro currency grants.
Observed verification:
  • grant-playtime-rewards found Bot1_BuffTester online.
  • Buff reward path executed say [PlaytimeBuff] Bot1_BuffTester received WellFed with 200 OK from the game-server command API.
  • Announcement path broadcast Bot1_BuffTester got the WellFed buff reward.
  • Currency reward path called add-currency with 25 and emitted a currency-added event.
  • The cronjob result logged success: true and granted 1 reward(s) to 1 online player(s).
This means the Takaro integration is alive. Final acceptance for the real customer buff names should happen on a 7 Days to Die server with the relevant modded buffs installed.
communityTakaro 0.0.0

Components Overview

1
config
1
commands
0
hooks
1
Cron Jobs
1
functions
1
permissions

New Module: PlaytimeBuffRewards

NEW
April 29, 2026
Updated to version latest. Added 1 command: grant-buff. Added 1 scheduled task: grant-playtime-rewards. Added 1 function: playtime-buff-helpers. New permission: PLAYTIME_BUFF_ADMIN. New configuration options: buffCommandTemplate, announceRewards, defaultRewardMessage, buffRewards, commandRewards, currencyRewards.

Configuration

Configure this module using the schemas below. The JSON schema defines the data structure, while the UI schema customizes how the configuration form is displayed.

Configuration Schema

Configuration Properties (6)

buffCommandTemplatestring

Console command template used to grant a buff. Supports {playerName}, {playerId}, {gameId}, and {buffName}.

Default: buffplayer {playerName} {buffName}
announceRewardsboolean

Broadcast a message when a playtime reward is granted.

Default: true
defaultRewardMessagestring

Fallback message for rewards that do not define their own message.

Default: {playerName} received a playtime reward: {rewardName}.
buffRewardsarray

Buff rewards eligible for hourly playtime grants.

Default: [{"buffName":"WellFed","weight":1,"enabled":true,"message":"{playerName} received the {buffName} buff for playing."}]
commandRewardsarray

Generic console-command rewards, useful for items such as food, drinks, ammo, or meds.

Default: [] (empty array)
currencyRewardsarray

Takaro currency rewards eligible for hourly playtime grants.

Default: [] (empty array)

UI Schema

No UI schema defined. Configuration form will use default rendering.

About Configuration Schemas

The Configuration Schema defines the structure and validation rules for module settings. The UI Schema customizes how the configuration form is displayed in the Takaro interface, including field ordering, labels, and input types.

Commands (1)

These commands can be executed by players in-game. Each command has a trigger word, optional arguments, and executes JavaScript code on the server.

grant-buff

/grantbuffTrigger Command

Description

Grant a buff to a player. Usage: grantbuff

Arguments (2)

player
playerPosition 0
Help: Player receiving the buff
Default: None
buffName
stringPosition 1
Help: Buff name to grant
Default: None

Function Implementation

grant-buff Function

JAVASCRIPT

Usage Example

Player types: /grantbuff <player> <buffName>

About Module Commands

Commands allow players to interact with your module through chat. Each command has a trigger word that players type (prefixed with /), optional arguments for parameters, and a JavaScript function that executes when the command is used. Arguments are automatically validated and passed to the function.

Scheduled Jobs (1)

These jobs run automatically on a schedule defined by cron expressions. Each job executes JavaScript code at specific times or intervals.

grant-playtime-rewards

0 * * * *Schedule

Description

Grant a random configured reward to each online player every hour.

Schedule Details

Cron Expression
0 * * * *
Human-Readable Schedule

Every hour

Function Implementation

grant-playtime-rewards Function

JAVASCRIPT

Cron Expression Format

minute hour day-of-month month day-of-week

Each field can contain numbers, ranges (1-5), lists (1,3,5), or wildcards (*). Use */n for intervals (e.g., */5 for every 5 units).

About Scheduled Jobs

Cron jobs allow your module to execute code automatically on a schedule. Each job has a cron expression that defines when it runs, and a JavaScript function that executes at those times. Jobs run server-side and can perform maintenance tasks, send notifications, or update game state automatically.

Functions (1)

Reusable JavaScript functions that can be imported and used by other module components like commands, hooks, and cron jobs. These promote code reuse and modularity.

playtime-buff-helpers

functionReusable Component

Function Implementation

playtime-buff-helpers Function

JAVASCRIPT

Import Usage

Import: import { playtime-buff-helpers } from './utils';

About Module Functions

Functions are reusable JavaScript components that can be imported and used by commands, hooks, and cron jobs within your module. They promote code reuse, improve maintainability, and allow you to organize complex logic into modular pieces. Functions must be exported with proper ES6/CommonJS syntax to be importable by other components.

Permissions (1)

These permissions control who can access different features of this module. Administrators can assign these permissions to roles, allowing fine-grained access control.

General Permissions

1 permission

Manage Playtime Buff Rewards

PLAYTIME_BUFF_ADMINPermission Key
Description

Allows manually granting buffs through the playtime buff rewards module.

Permission Details
Full Key:PLAYTIME_BUFF_ADMIN
Can Have Count:No
Category:General

About Module Permissions

Permissions control access to module features and functionality. Each permission has a unique key for identification, a friendly name for display, and a description explaining what it allows. Some permissions are countable, meaning they can have numeric values or limits assigned. Administrators assign these permissions to user roles to control who can use different module features.