se-dev-plugin

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Getting Started

入门指南

If the
Prepare.DONE
file is missing in this folder, you MUST run the one-time preparation steps:
  1. Review the requirements and instructions in Prepare.md.
  2. Execute the preparation by running
    .\Prepare.bat
    from this folder.
  3. IMPORTANT: You are on Windows. Use
    &
    to chain commands in
    cmd.exe
    or
    ;
    in PowerShell. Do NOT use
    &&
    .
  4. DO NOT create the
    Prepare.DONE
    file yourself. It is automatically created by
    Prepare.bat
    only upon a successful run. Creating it manually is "faking" success and will lead to errors.
如果此文件夹中缺少
Prepare.DONE
文件,您必须执行一次性准备步骤:
  1. 查看Prepare.md中的要求和说明。
  2. 在此文件夹中运行
    .\Prepare.bat
    以执行准备操作。
  3. 重要提示: 您当前使用的是Windows系统。在
    cmd.exe
    中使用
    &
    来串联命令,在PowerShell中使用
    ;
    。请勿使用
    &&
  4. 请勿自行创建
    Prepare.DONE
    文件。只有当
    Prepare.bat
    成功运行后,它才会自动创建。手动创建该文件属于“伪造”成功状态,会导致错误。

Usage Guide

使用指南

  • A Python virtual environment in this folder was made available by the preparation.
  • Use this Python virtual environment to write short, targeted, reusable utility scripts as needed. Build a catalog of such scripts in UtilityScripts.md next to this skill file.
  • Use
    uv run script_name.py
    in this folder (as CWD) to run your scripts.
  • IMPORTANT: Space Engineers modding is done on Windows. All commands must work on Windows.
  • Use
    busybox.exe
    as a prefix to run individual UNIX-like commands, for example:
    busybox.exe grep -r "pattern" folder
    .
  • Do NOT open a bash shell with
    busybox bash
    . Run busybox commands directly from cmd or PowerShell instead.
  • CRITICAL: Always use forward slashes (
    /
    ) in file paths passed to busybox.
    Backslashes are interpreted as escape characters by bash and will be silently removed, mangling paths. Windows accepts forward slashes. Correct:
    busybox.exe grep "pattern" C:/Users/name/folder
    — Wrong:
    C:\Users\name\folder
    .
  • Alternatively use Windows PowerShell, which handles backslash paths natively.
  • See the list of available Python packages in
    pyproject.toml
    .
Read the appropriate documents for further details:
  • Plugin.md Plugin development (shared skills for both client and server)
  • ClientPlugin.md Client plugin development (relevant on client side)
  • ServerPlugin.md Server plugin development (relevant on server side)
  • Guide.md Use this to answer questions about the plugin development process in general.
  • Publicizer.md How to use the Krafs publicizer to access internal, protected or private members in the original game code (optional).
  • OtherPluginsAsExamples.md How to look into the source code of other plugins as examples.
Plugins are released exclusively on the PluginHub. All plugins must be open source, since they are compiled on the player's machine from the GitHub source revision identified by its PluginHub registration. Plugins are reviewed for safety and security on submission, but only on a best effort basis, without any legal guarantees. Plugins are running native code and can do anything.
Use the
se-dev-game-code
skill to search the game's decompiled code. You will need this to understand how the game's internals work and how to interface with it and patch it properly.
General rules:
  • Follow the Windows command line rules above (use
    busybox.exe
    prefix, forward slashes in paths).
References:
  • 准备步骤已在此文件夹中创建了一个Python虚拟环境。
  • 根据需要,使用此Python虚拟环境编写简短、针对性强、可复用的实用脚本。 在此技能文件旁的UtilityScripts.md中建立此类脚本的目录。
  • 在此文件夹(作为当前工作目录)中使用
    uv run script_name.py
    来运行您的脚本。
  • 重要提示:《太空工程师》模组开发仅支持Windows系统。 所有命令必须能在Windows上正常工作。
  • 使用
    busybox.exe
    作为前缀来运行类UNIX命令,例如:
    busybox.exe grep -r "pattern" folder
  • 请勿使用
    busybox bash
    打开bash shell。请直接在cmd或PowerShell中运行busybox命令。
  • 关键提示: 在传递给busybox的文件路径中,请始终使用正斜杠(
    /
    )。反斜杠会被bash解释为转义字符并被自动移除,从而破坏路径。Windows系统支持正斜杠。正确示例:
    busybox.exe grep "pattern" C:/Users/name/folder
    — 错误示例:
    C:\Users\name\folder
  • 您也可以使用Windows PowerShell,它原生支持反斜杠路径。
  • 查看
    pyproject.toml
    中的可用Python包列表。
如需进一步了解详情,请阅读相应文档:
  • Plugin.md 插件开发(客户端和服务器共享技能)
  • ClientPlugin.md 客户端插件开发(客户端相关)
  • ServerPlugin.md 服务器插件开发(服务器相关)
  • Guide.md 用于解答关于插件开发流程的一般性问题。
  • Publicizer.md 如何使用Krafs publicizer访问原版游戏代码中的内部、受保护或私有成员(可选操作)。
  • OtherPluginsAsExamples.md 如何查看其他插件的源代码作为示例。
插件仅能在PluginHub上发布。所有插件必须开源,因为它们会在玩家的机器上,根据PluginHub注册时对应的GitHub源代码版本进行编译。插件在提交时会进行安全审查,但仅为尽力而为,不提供任何法律担保。插件运行的是原生代码,可以执行任何操作。
使用
se-dev-game-code
技能来搜索游戏的反编译代码。您需要通过它来了解游戏的内部工作原理,以及如何正确地与游戏交互和进行补丁修改。
通用规则:
  • 遵循上述Windows命令行规则(使用
    busybox.exe
    作为前缀,路径中使用正斜杠)。
参考资料: