npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ai-rpg-engine/modules

v2.3.1

Published

AI RPG Engine built-in modules: combat, dialogue, inventory, traversal, status

Downloads

2,578

Readme

@ai-rpg-engine/modules

29个可组合的模拟模块,用于AI RPG引擎,涵盖战斗、技能、对话、认知、感知、派系等。

安装

npm install @ai-rpg-engine/modules

模块

| 模块 | 描述 | |--------|-------------| | combatCore | 攻击/防御、伤害、击败、体力、防御、脱离 | | dialogueCore | 基于图的对话树,带有条件 | | inventoryCore | 物品、装备、使用/装备/卸载 | | traversalCore | 区域移动和出口验证 | | statusCore | 带有持续时间和叠加效果的状态 | | environmentCore | 动态区域属性、危险、衰减 | | cognitionCore | AI的信念、意图、士气、记忆 | | perceptionFilter | 感官通道、清晰度、跨区域听觉 | | narrativeAuthority | 真实与呈现、隐瞒、扭曲 | | progressionCore | 基于货币的升级、技能树 | | factionCognition | 派系信念、信任、派系间的知识 | | rumorPropagation | 信息传播,伴随置信度衰减 | | knowledgeDecay | 基于时间的置信度衰减 | | districtCore | 空间记忆、区域指标、警戒阈值 | | beliefProvenance | 跨感知/认知/传闻的痕迹重建 | | observerPresentation | 观察者事件过滤、偏差跟踪 | | simulationInspector | 运行时检查、健康检查、诊断 | | combatIntent | AI决策偏差、士气、逃避逻辑 | | engagementCore | 前线/后线位置、护卫拦截 | | combatRecovery | 战斗后的伤情状态、安全区域的治疗 | | combatReview | 公式解释、命中率分析 | | defeatFallout | 战斗后的派系影响、声誉变化 | | bossPhaseListener | Boss生命值阈值阶段转换 |

技能模块

| 模块 | 描述 | |--------|-------------| | abilityCore | 技能解析:成本、检查、目标、效果触发、冷却 | | abilityEffects | 效果处理:伤害、治疗、属性修改、状态附加/移除 | | abilityReview | 运行时跟踪:每次使用的详细信息、检查器、格式化输出 | | abilityIntent | AI评分:自攻击/范围攻击/单体攻击路径、抗性感知、净化价值 |

技能编写(纯函数)

| 导出 | 用途 | |--------|---------| | ability-summary | 打包摘要、平衡性审计、Markdown/JSON导出 | | ability-builders | 便捷工厂:buildDamageAbility(构建伤害技能)、buildHealAbility(构建治疗技能)、buildStatusAbility(构建状态技能)、buildCleanseAbility(构建净化技能)、buildAbilitySuite(构建技能套件) | | status-semantics | 11个标签的词汇表、状态注册、抗性感知应用 |

战斗编写(纯函数)

| 导出 | 用途 | |--------|---------| | combat-roles | 8个角色模板、遭遇构成类型、危险等级、Boss定义 | | encounter-library | 5个遭遇原型工厂、3个Boss模板工厂、打包审计 | | combat-summary | 查询、审计、格式化和检查战斗内容 |

用法

import { Engine } from '@ai-rpg-engine/core';
import { combatCore, dialogueCore, cognitionCore, perceptionFilter } from '@ai-rpg-engine/modules';

const engine = new Engine({
  manifest: { /* ... */ },
  seed: 42,
  modules: [combatCore(), dialogueCore(), cognitionCore(), perceptionFilter()],
});

文档


构建者:MCP Tool Shop