Agent skill
decay-upkeep
Building decay and upkeep systems for survival games. Use when implementing timer-based decay, Tool Cupboard patterns (Rust-style protection radius), resource upkeep costs, or server performance management through automatic cleanup. Balances gameplay and server health.
Install this agent skill to your Project
npx add-skill https://github.com/Bbeierle12/Skill-MCP-Claude/tree/main/skills/decay-upkeep
SKILL.md
Decay & Upkeep
Timer-based building decay and resource-based upkeep for survival games.
Quick Start
import { DecayManager } from './scripts/decay-manager.js';
import { UpkeepSystem } from './scripts/upkeep-system.js';
import { ToolCupboard } from './scripts/tool-cupboard.js';
// Decay without protection
const decay = new DecayManager({
mode: 'rust',
decayMultiplier: 1.0
});
decay.addPiece(piece);
decay.tick(deltaTime); // Called every frame/tick
// Tool Cupboard protection
const tc = new ToolCupboard({
radius: 30,
upkeepCost: { wood: 100, stone: 50 }
});
tc.setPosition(position);
tc.depositResources({ wood: 500, stone: 250 });
// Protected pieces won't decay while upkeep is paid
Reference
See references/decay-upkeep-advanced.md for:
- Decay rate formulas by material
- Tool Cupboard mechanics (Rust pattern)
- Upkeep scaling with base size
- Server performance benefits
- Anti-raid delay mechanics
Scripts
scripts/decay-manager.js- Tick-based decay, material rates, damage statesscripts/upkeep-system.js- Resource drain, calculation, UI datascripts/tool-cupboard.js- Protection radius, authorization, resource storagescripts/cleanup-scheduler.js- Server-side cleanup of abandoned structures
Decay Modes
- Rust: Linear decay over 8-24 hours (material dependent), prevented by Tool Cupboard
- ARK: Slower decay (days to weeks), tribe-based protection
- Minecraft: No decay (creative/survival), optional via mods
Design Philosophy
Decay serves dual purposes in survival games: gameplay balance (prevents infinite hoarding) and server performance (removes abandoned bases). The Tool Cupboard pattern elegantly ties both together—players must actively maintain bases, and inactive players' structures automatically clean up.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
r3f-materials
Three.js materials in R3F, built-in materials (Standard, Physical, Basic, etc.), ShaderMaterial with custom GLSL, uniforms binding and animation, and material properties. Use when choosing materials, creating custom shaders, or binding dynamic uniforms.
audio-router
Router for audio domain including playback, analysis, and audio-reactive visuals. Use when implementing any audio functionality including music, sound effects, visualizers, or audio-driven animations. Routes to 3 specialized skills.
case-studies-reference
Game building mechanics case studies and decision frameworks. Use when designing building systems, evaluating trade-offs, or learning from existing games. Reference-only skill with detailed analysis of Fortnite, Rust, Valheim, Minecraft, No Man's Sky, and Satisfactory building systems.
brainstorming
Use when starting any feature, project, or design work. Guides collaborative design refinement through incremental questioning before any code is written.
shader-router
Decision framework for GLSL shader projects. Routes to specialized shader skills (fundamentals, noise, SDF, effects) based on task requirements. Use when starting a shader project or needing guidance on which shader techniques to combine.
audio-playback
Audio playback using Tone.js including players, transport, scheduling, and loading audio. Use when implementing background music, sound effects, audio synchronization, or timed audio events. Essential for any audio-enabled web application.
Didn't find tool you were looking for?