Token导航 LogoToken导航TokenDH.com
前端设计执行命令github未标认证来源可访问许可证需确认审计通过

dayz-enfusion-scriptdayz 注入脚本

Agent Skill

dayz-enfusion-script 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

247

周安装

10

GitHub Stars

1

下载量

78
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dayz-enfusion-script(dayz 注入脚本)
来源仓库:https://github.com/swarmdayz/dayz-enfusion-skills
仓库路径:skills/dayz-enfusion-script
安装命令:
npx skills add https://github.com/swarmdayz/dayz-enfusion-skills --skill dayz-enfusion-script
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/swarmdayz/dayz-enfusion-skills --skill dayz-enfusion-script

简介

dayz-enfusion-script 用于编写 DayZ 游戏模组逻辑,支持物品、玩家与 AI 行为的自定义扩展。

  • 它基于 Bohemia Interactive 官方 Enforce Script 语言,需参考 community.bistudio.com 获取权威 API 文档。
  • 使用时需提供类名与方法签名,技能会生成类型安全的 C-like 脚本并建议 RPC 网络同步方案。
  • 安装前应确认目标游戏版本与模组加载器兼容性,避免脚本冲突或存档损坏风险。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

DayZ Enforce Script Skill

Always consult community.bistudio.com DayZ Modding and the Enforce Script Language Reference for authoritative API docs.

Overview

Enforce Script is a statically-typed, C-like scripting language embedded in the Bohemia Interactive Enfusion engine. It drives all gameplay logic in DayZ: items, players, AI, missions, GUI, economy, and RPC networking. Mods are distributed as .pbo archives compiled from .c script files layered on top of vanilla scripts.

When to Use This Skill

Trigger this skill when the user asks to:

  • Create or extend DayZ mod classes (items, players, weapons, missions, GUI menus)
  • Implement server-side logic (actions, spawning, persistence, economy)
  • Set up RPC communication between server and clients
  • Sync variables from server to client via NetSync
  • Create .layout XML files for in-game GUI panels and HUDs
  • Integrate with Community Framework (CF), DABS, or vanilla plugin systems
  • Debug Enforce Script compile errors or runtime issues

Quick Start

Minimal mod structure:

MyMod/
  config.cpp          <- PBO manifest + CfgPatches
  Scripts/
    4_World/
      MyMod_Item.c    <- your class

config.cpp

class CfgPatches
{
    class MyMod
    {
        units[]  = {};
        weapons[] = {};
        requiredVersion = 0.1;
        requiredAddons[] = { "DZ_Data" };
    };
};

Minimal modded class

// Scripts/4_World/MyMod_Item.c
modded class Apple
{
    override void OnConsume(PlayerBase player)
    {
        super.OnConsume(player);  // ALWAYS call super
        Print("[MyMod] Apple consumed by: " + player.GetIdentity().GetName());
    }
}

Critical Language Quirks

  • No ternary operator — use if/else instead of x? a: b
  • auto!= type inferenceauto means autoptr (reference-counted ownership alias for ref)
  • No lambdas — use ScriptCaller for single callbacks, ScriptInvoker for multicast events
  • Primitives are never nullint, float, bool, string default to 0 / 0.0 / false / ""; only class instances can be null
  • modded class — the ONLY extension mechanism; produces one merged class. Always call super.* in overrides
  • **super.* is mandatory** — skipping it silently breaks every other mod in the chain
  • Write/read order in persistenceOnStoreSave and OnStoreLoad must write/read fields in identical order; mismatch destroys saves
  • No function overloading — methods must have unique names; use optional parameters instead
  • String formatstring.Format("Value: %1", val) with 1-indexed %N placeholders (not %s/%d)

Mod Structure and Script Layers

Scripts load in layer order. Classes defined in lower layers are available to higher ones.

FolderLayerPurpose
Scripts/1_Core/1Engine primitives, proto definitions
Scripts/2_GameLib/2Base game library, input, menus
Scripts/3_Game/3Core gameplay (items, players, RPC enums)
Scripts/4_World/4World entities — most mod code lives here
Scripts/5_Mission/5Mission logic (server init, spawn tables)

A modded class PlayerBase must live in Scripts/4_World/; a modded class MissionServer in Scripts/5_Mission/.

Technical Terms

  • NetSync — engine-managed variable replication from server to all clients via RegisterNetSyncVariable* + SetSynchDirty()
  • RPC — Remote Procedure Call; integer-keyed messages sent between server and clients, received in OnRPC() overrides
  • CF / Community Framework — most-used modding library; adds module system, event bus, ModStorage persistence, and attribute-based actions
  • DABS — attribute-based action framework built on CF; declarative action definitions
  • PluginBase — vanilla service-locator pattern for decoupled gameplay subsystems
  • ScriptInvoker — multicast delegate (add/remove listeners, fire all)

Resources

Use the references for API lookups. Check patterns when implementing a common mechanic. Examples show complete working files.

references/player_api.md and references/game_api.md are the most frequently needed starting points.

references/

Core API documentation split by topic:

  • types_collections.md - Primitive types, string methods, array/map/set API, vector math, Math class
  • player_api.md - PlayerBase stats, vitals, agents, modifiers, inventory, NetSync, RPC helpers
  • item_api.md - ItemBase quantity/health/flags, action registration, spawning, config.cpp properties
  • game_api.md - GetGame(), GetWorld(), GetMission(), CreateObject, CallLater, logging
  • erpc_defines.md - Vanilla eRPCs/eAgents/eModifiers tables, custom ID range convention
  • file_paths.md - $profile/$saves path tokens, FileExist, MakeDirectory, JsonFileLoader, FileMode
  • gui_layout.md - Layout file format (WidgetClassNameClass syntax, RGBA colors, coords, all widget types, colums property, ItemPreviewWidget/PlayerPreviewWidget API)

integrations/

Guides for integrating with external frameworks and vanilla systems:

  • community_framework.md - CF module system, ModStorage persistence, event bus, inter-mod events
  • dabs_framework.md - Attribute-based action system, CF_ModAttribute, MVC layout, settings API
  • vanilla_plugins.md - PluginBase lifecycle, GetPlugin(), service-locator mod isolation pattern
  • central_economy.md - CE XML format, runtime CE with SpawnObject/DeleteObject, cfgeconomycore.xml
  • input_bindings.md - inputs.xml, UAInput API, GetUApi(), context guards, client-only input rules

patterns/ (optional)

Common implementation patterns for recurring mechanics:

  • netsync.md - RegisterNetSyncVariable*, SetSynchDirty, OnVariablesSynchronized, bitfield packing
  • persistence.md - OnStoreSave/OnStoreLoad, version header, write-order rules, CF_ModStorage alternative
  • rpc.md - ScriptRPC, RPCSingleParam, OnRPC switch template, client-to-server validation rules
  • modded_class.md - super.* rules, field injection, mod load order, compatibility patterns
  • singleton.md - Static s_Instance, lazy init, GetInstance(), JSON config with nested sub-objects
  • language_workarounds.md - No ternary, no auto type inference, no lambdas, no exceptions, no overloading

examples/ (optional)

Complete working script files demonstrating full implementations:

  • 01_custom_item.c - Custom item with NetSync bool flag and versioned OnStoreSave/OnStoreLoad
  • 02_custom_action_singleuse.c - Single-use ActionBase with CanPerformAction guard and server execution
  • 03_continuous_action.c - Hold-to-complete action with progress bar, interrupt handling, cooldown
  • 04_rpc_patterns.c - All three RPC APIs: RPCSingleParam, GetGame().RPC, ScriptRPC multi-field
  • 05_mission_server.c - MissionServer overrides: PlayerConnect, PlayerDisconnect, OnUpdate tick
  • 06_json_config.c - JsonFileLoader singleton config with nested sub-config and admin UID list
  • 07_agent_modifier.c - Full SymptomBase + ModifierBase disease stack with agent threshold trigger
  • 08_gui_menu.c - UIScriptedMenu with TextListboxWidget rows, EditBox filter, button handlers
  • 09_scheduler_timer.c - CallLater, Timer, OnScheduledTick patterns with frame-skip guard
  • 10_modded_playerbase.c - Comprehensive PlayerBase mod combining NetSync, RPC, persistence, actions
  • 11_hud_plain_text.layout - HUD overlay with TextWidgets (float RGBA colors, pixel coords); companion modded Hud Update() script
  • 12_menu_interactions.layout - Dialog with EditBoxWidgetClass filter, 2-column TextListboxWidgetClass, ButtonWidgetClass
  • 13_item_preview.layout - Item inspect panel with ItemPreviewWidgetClass for live 3D model; rotate via SetModelOrientation

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

40.08%
按下载量换算31

Claude

28.26%
按下载量换算22

Cursor

18.24%
按下载量换算14

Gemini CLI

10.69%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/swarmdayz/dayz-enfusion-skills --skill dayz-enfusion-script 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills