WorldPulse
一个会对玩家实际行为做出反应的世界。
WorldPulse 是一个基于 Paper 的插件,其核心围绕一个简单的循环:玩家活动 → 世界状态 → 世界反应 → 新的玩家活动。与不管服务器正在发生什么就按固定计时器触发随机事件不同,WorldPulse 会持续测量每个世界中真实的玩家行为,并让这些测量结果驱动世界的响应方式。没有两个服务器——甚至同一服务器上的两个世界——会以相同的方式“脉动”,因为这些数值是由你的玩家生成的,而不是掷骰子决定的。
本页面介绍的是 v0.2 版本,它在 v0.1 引入的活动追踪基础上增加了完整的“世界状态”层。
概念
WorldPulse 通过分层来模拟每个世界:
- 活动(脉冲) — 每个频道(采矿、战斗、农耕、探索、自然)都有一个 0–100 的值,反映当前正在进行的那类玩法的程度。
- 世界状态 — 四个衍生分数(威胁度、稳定性、生态、文明),由活动值和专用信号(如玩家死亡、交易和建造)计算得出。
- 反应 — 当某个世界状态分数超过阈值时,世界会发出公告(例如情况变得危险或森林开始枯萎时的警告,或者恢复平静后的恢复消息)。
所有数值都会随时间平滑衰减,而不是在计时器重置时清零,因此这些数值始终描述的是世界近期的真实历史,而非累计总量。
v0.2 中的功能
活动追踪(5 个频道)
- ⛏ 采矿 — 破坏石头、深板岩和矿石(包括下界变种和远古残骸)。玩家自己放置的方块会被排除在外,因此丝触附魔的“放置后重新挖掘”循环不会虚高该数值。
- ⚔ 战斗 — 击杀敌对生物和袭击生物(僵尸、骷髅、苦力怕、末影人、烈焰人、掠夺者、劫掠兽等)。
- ? 农耕 — 收获完全成熟的作物(小麦、胡萝卜、马铃薯、甜菜根),破坏南瓜/西瓜,以及繁殖动物。
- ? 探索 — 发现新区块,进入下界或末地时会获得额外奖励积分。
- ? 自然 (新增) — 砍伐树木、种植树苗/红树幼苗,以及钓鱼。与挖矿中排除玩家放置的矿石一样,玩家放置的原木也不会计入砍伐积分。
世界状态(新增)
四个分数(0–100),在每个更新刻从活动脉冲值及其各自的专用信号中计算得出:
- ⚠ 威胁度 — 随着持续的战斗活动而上升,并在玩家死亡时激增;一旦局势平息,它会自行消退。
- ⚖ 稳定性 — 平滑跟踪一个由威胁度和极端(非常高)的采矿/战斗活动推导出的目标值。平稳运行的世界保持稳定;处于超负荷运转的世界则会偏离平衡。
- ? 生态 — 一种持续的生态平衡,而非衰减的活动计数。砍伐会降低它,种植会提升它,如果放任不管,它会温和地回向健康的基准线——只要没人盯着,森林就不会枯萎。
- ? 文明 — 随着完成的村民交易、建筑方块放置和床的放置而增长,并与当前在该世界中活跃的玩家数量以及已探索的区域比例成正比。如果一个世界陷入沉寂,该分数也会下降。
自动反应(新增)
当世界状态分数超过可配置的阈值时,WorldPulse 现在会自动做出反应——例如世界威胁度飙升、生态下降或稳定性降低时的聊天公告,以及在恢复平静后的相应恢复消息。每个反应都使用独立的“警告”和“安全”阈值(迟滞)加上冷却时间,因此数值在临界点附近徘徊时不会刷屏。
这是 Dynamic Events(实际的游戏玩法变化、奖励、GUI)将在 v0.3 中构建的基础——v0.2 故意只负责公告,尚未行动。
世界统计与衰减
每个数值——无论是活动还是世界状态——现在都通过连续的指数衰减模型进行更新,而不是固定的时间窗口:近期活动会将数值拉高,而在缺乏活动时,数值会自行平滑回落(可通过 pulse.decay-per-hour 配置)。所有内容仍完全在内存中运行,以可配置的时间间隔(默认为 10 秒)执行;热路径上不进行数据库访问,因此针对单个方块或单次击杀的事件几乎没有性能开销。
SQLite 历史记录
定期快照(默认为每 5 分钟一次)将活动脉冲和世界状态异步写入本地的 worldpulse.db,分布在两个表(world_statistics、world_state_snapshots)中。从 v0.1 升级时会自动迁移现有的数据库——无需删除或重建。
命令
| 命令 |
描述 |
权限 |
/worldpulse status [world] |
显示某个世界的当前活动脉冲和世界状态(默认为你所在的世界) |
worldpulse.status |
/worldpulse reload |
无需重启即可重新加载 config.yml |
worldpulse.admin |
配置
所有内容均可按世界进行控制,包括是否在该世界公告反应:
worlds:
world:
enabled: true
statistics:
mining: true
combat: true
farming: true
exploration: true
nature: true
reactions:
enabled: true
可以在某个世界中完全禁用 WorldPulse,禁用单独的活动频道,或关闭该世界的反应公告。衰减速率、更新频率、各频道的阈值、每个世界状态公式的权重、反应的警告/安全阈值和冷却时间,以及数据库快照间隔,均可在 config.yml 中进行配置。
数值计算方式
活动脉冲 — 每次被追踪的动作都会在当前刻为该世界的内存计数器添加点数。在每次更新时,计数器会被转换为增益并与之前的值混合:
new = clamp(old × decayFactor + gain, 0, 100)
其中 decayFactor 源自 pulse.decay-per-hour(默认为 0.9——在一个毫无活动的世界中,其 Pulse 每小时会流失约 10%),而 gain 则根据实际活动量相对于该频道配置阈值的比例进行缩放。在阈值速率下保持持续活动可使 Pulse 维持在接近 100 的水平;若无任何活动,Pulse 便会逐渐消退。
World State 主要复用了相同的衰减与增益逻辑,但有两个特意设计的例外:
- Ecology 不会自行衰减至零——仅受砍伐/种植影响以及向可配置的恢复基线缓慢牵引的作用,因为一片未经触碰的森林不应仅因时间流逝而枯萎。
- Stability 完全不累积“点数”;它持续追踪一个由当前 Threat 和活动极值计算得出的目标值,并在每个 tick 中逐步缩小差距。
路线图
WorldPulse 正分阶段开发,每个版本均基于前一个完全可用的版本构建:
- v0.1 —— Activity tracking、World Statistics、SQLite、
/worldpulse status、配置
- v0.2(当前) —— World State 层(Threat、Stability、Ecology、Civilization)、连续衰减、Automatic Reactions、Nature activity channel
- v0.3 —— 响应 World State 的动态事件、Event GUI、boss bars、titles、sounds 及 rewards
- v0.4 —— Player Influence tracking、玩家档案、achievements 及 Pulse history
- v1.0 —— 完整 GUI、PlaceholderAPI 支持、DiscordSRV 集成、公共 API 及完整文档
需求
- 服务器软件: Paper(或 Paper 分支)——不支持 Spigot/CraftBukkit
- Minecraft 版本: 1.21.x
- Java: 21+
- 无其他插件依赖
说明
WorldPulse 内置了 SQLite 驱动——无需外部数据库设置,运行 v0.2 也无需任何其他插件依赖。
尤其欢迎对 v0.2 的 World State 公式和默认阈值的反馈,因为 v0.2 中的 Reactions 以及 v0.3 计划中的 Dynamic Events 都依赖于这些数值。
WorldPulse
A world that reacts to what your players actually do.
WorldPulse is a Paper plugin built around a simple loop: player activity → world state → world reaction → new player activity. Instead of firing random events on a timer regardless of what's happening on your server, WorldPulse continuously measures real player behavior in each world and lets that measurement drive how the world responds. No two servers — and no two worlds on the same server — will ever pulse the same way, because the numbers are generated by your players, not a dice roll.
This page covers the v0.2 release, which adds a full World State layer on top of the activity tracking introduced in v0.1.
Concept
WorldPulse models each world in layers:
- Activity (Pulse) — a 0–100 value per channel (Mining, Combat, Farming, Exploration, Nature) that reflects how much of that kind of play is happening right now.
- World State — four derived scores (Threat, Stability, Ecology, Civilization) computed from Activity and from dedicated signals like player deaths, trading, and building.
- Reaction — when a World State score crosses a threshold, the world announces it (a warning when things get dangerous or a forest starts dying, a recovery message when it settles back down).
Everything decays smoothly over time rather than resetting on a timer, so the numbers always describe the recent, lived history of a world instead of a lifetime total.
Features in v0.2
Activity Tracking (5 channels)
- ⛏ Mining — breaking stone, deepslate, and ores (including nether variants and ancient debris). Blocks a player placed themselves are excluded, so silk-touch "place and re-mine" loops don't inflate the number.
- ⚔ Combat — killing hostile mobs and raid mobs (zombies, skeletons, creepers, endermen, blazes, pillagers, ravagers, and more).
- ? Farming — harvesting fully grown crops (wheat, carrots, potatoes, beetroot), breaking pumpkins/melons, and breeding animals.
- ? Exploration — discovering new chunks, with bonus credit for entering the Nether or the End.
- ? Nature (new) — felling trees, planting saplings/mangrove propagules, and fishing. Player-placed logs are excluded from felling credit the same way placed ore is excluded from Mining.
World State (new)
Four scores (0–100) computed every update tick from Activity Pulse values and from their own dedicated signals:
- ⚠ Threat — rises with sustained Combat activity and spikes on player deaths; fades on its own once things calm down.
- ⚖ Stability — smoothly tracks a target derived from Threat and from extreme (very high) Mining/Combat activity. A world that's quietly ticking along stays stable; a world in overdrive drifts out of equilibrium.
- ? Ecology — a running ecological balance, not a decaying activity count. Felling pulls it down, planting pushes it up, and it drifts gently back toward a healthy baseline on its own when left alone — forests don't wither away just because nobody's watching.
- ? Civilization — grows with completed villager trades, building-material placement, and bed placement, and scales with how many players are currently active in that world and how much of it has been explored. Fades if a world goes quiet.
Automatic Reactions (new)
WorldPulse now reacts on its own when a World State score crosses a configurable threshold — a chat announcement when a world's Threat spikes, its Ecology declines, or its Stability drops, and a matching recovery message once it settles back down. Each reaction uses separate "warning" and "safe" thresholds (hysteresis) plus a cooldown, so a value hovering right at the line won't spam chat.
This is the foundation that Dynamic Events (actual gameplay changes, rewards, GUIs) will build on in v0.3 — v0.2 intentionally only announces, it doesn't yet act.
World Statistics & Decay
Every value — Activity and World State alike — now updates through a continuous exponential decay model instead of a fixed time window: recent activity pulls a value up, and in its absence the value fades back down smoothly on its own (configurable via pulse.decay-per-hour). Everything still runs purely in memory on a configurable interval (10 seconds by default); no database access happens on the hot path, so per-block or per-kill events have effectively zero performance cost.
SQLite History
Periodic snapshots (every 5 minutes by default) of both the Activity Pulse and the World State are written asynchronously to a local worldpulse.db, across two tables (world_statistics, world_state_snapshots). Upgrading from v0.1 migrates your existing database automatically — no need to delete or recreate it.
Commands
| Command |
Description |
Permission |
/worldpulse status [world] |
Shows the current Activity Pulse and World State for a world (defaults to your current world) |
worldpulse.status |
/worldpulse reload |
Reloads config.yml without a restart |
worldpulse.admin |
Configuration
Everything is controllable per world, including whether Reactions are announced there:
worlds:
world:
enabled: true
statistics:
mining: true
combat: true
farming: true
exploration: true
nature: true
reactions:
enabled: true
Disable WorldPulse entirely in a world, disable individual Activity channels, or turn off Reaction announcements per world. Decay rate, update frequency, per-channel thresholds, every World State formula's weights, reaction warning/safe thresholds and cooldown, and the database snapshot interval are all configurable in config.yml.
How the Numbers Are Calculated
Activity Pulse — each tracked action adds points to that world's in-memory counter for the current tick. On every update, the counter is converted into a gain and blended with the previous value:
new = clamp(old × decayFactor + gain, 0, 100)
where decayFactor comes from pulse.decay-per-hour (0.9 by default — a world with zero activity loses about 10% of its Pulse every hour), and gain scales with how much activity happened relative to the channel's configured threshold. Sustained activity at the threshold rate keeps a Pulse near 100; nothing happening lets it fade.
World State mostly reuses the same decay-and-gain shape, with two deliberate exceptions:
- Ecology never decays toward zero on its own — only felling/planting impact and a gentle pull toward a configurable recovery baseline move it, since an untouched forest shouldn't wither away from time alone.
- Stability doesn't accumulate "points" at all; it continuously tracks a target value computed from current Threat and activity extremes, closing the gap a little more each tick.
Roadmap
WorldPulse is being developed in stages, and each version is built on a fully working previous stage:
- v0.1 — Activity tracking, World Statistics, SQLite,
/worldpulse status, configuration
- v0.2 (current) — World State layer (Threat, Stability, Ecology, Civilization), continuous decay, Automatic Reactions, Nature activity channel
- v0.3 — Dynamic Events that respond to World State, an Event GUI, boss bars, titles, sounds, and rewards
- v0.4 — Player Influence tracking, player profiles, achievements, and Pulse history
- v1.0 — Full GUI, PlaceholderAPI support, DiscordSRV integration, a public API, and complete documentation
Requirements
- Server software: Paper (or a Paper fork) — Spigot/CraftBukkit are not supported
- Minecraft version: 1.21.x
- Java: 21+
- No other plugin dependencies
Notes
WorldPulse bundles its own SQLite driver — no external database setup is required, and no other plugin dependencies are needed to run v0.2.
Feedback on v0.2's World State formulas and default thresholds is especially welcome, since the Reactions in v0.2 and the Dynamic Events planned for v0.3 both key off these same numbers.
评论 0
登录后参与评分
还没有评论,来抢沙发吧