researching-bgs-mod-internals
Use when asked how a BGS mod works internally.
- License 许可
- MIT
- 最近更新
- 2026-10-20
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- researching-bgs-mod-internals
- author
- Hermes Agent
- license
- MIT
- version
- 1.1.0
- metadata
- { "hermes": { "tags": [ "bgs-modding", "research", "source-analysis", "mod-internals" ], "related_skills": [ "diagnosing-bgs-problems", "evaluating-bgs-mods", "archify" ] } }
- description
- Use when asked how a BGS mod works internally.
02 资源文件 2
- 参考文档references/dll-static-reverse-engineering.md4.9 KB
- 参考文档references/fsmp-physics-pipeline.md6.6 KB
03 SKILL.md 正文
Researching BGS Mod Internals
When to Use
Use when the user asks how a Bethesda mod or framework works internally: "研究一下X原理", "how does this mod work", "why is it faster", "这个框架怎么实现的", "what does this setting actually do".
Not for inclusion verdicts (use evaluating-bgs-mods) or symptoms (use diagnosing-bgs-problems).
The mod page is a claim; the source is evidence. Version, requirements, and author intent come from Nexus; behavior comes from a pinned commit of the authoritative repository, or, when the uploader ships no repository, from the distributed DLL itself. A DLL/framework mod is an engine, so explain the layer boundary first: what it computes, what content mods supply, and which layer a user-facing problem belongs to.
Procedure
- Query the KB first for engine/framework facts about the current game. If the pack has no record, say
[GAP]and continue with source evidence. - Read the Nexus page for version, uploader, requirements, and the Source Code spoiler. Descriptions sell behavior and routinely omit architecture; never build the explanation from them alone.
- Resolve the authoritative repo and its fork chain. Framework DLLs are usually forks of forks; the repo linked by the current uploader wins. Record
git rev-parse HEADand the credential-free origin. No repo and no source spoiler means step 4b, not a description-based answer. - Clone shallow into the scratch directory (
git clone --depth 1 <url>), then pingit log -1 --format='%H %ad %s'. Read files from disk; do not page source through a web extractor. 4b. Closed-source plugin: download the archive, record the archive hash and entry sizes, then recover the design from the binary (build-provenance strings, string table, hook sites, and the IDs/offsets each site uses). Full recipe inreferences/dll-static-reverse-engineering.md. Map every recovered numeric ID onto CommonLibSSE-NG before naming anything: clone the framework at a pinned commit and grep the ID underinclude/RE/; class headers carry member offsets as// 0xNNandOffsets_VTABLE.hcarries theVTABLE_*variant IDs. - Map before reading: directory tree, file sizes, entry point (SKSE
main.cpp/ hooks), frame loop, domain core, and config parser. Read that connected slice instead of the whole tree. - Trace one frame end to end and write down thread, stage, input, output for each step. That skeleton is the answer; details hang off it.
- Verify every quantitative claim in source: solver constants, caps, timestep defaults. Grep build presets before crediting an ISA path (
#ifdef AVX2code is dead unless a preset passes/arch:AVX2). Grep for a capability before denying it (grep -ri cuda) rather than trusting a leftover comment. - Separate engine from content: physics/animation/skeleton frameworks provide the runtime; XML, NIF, and ESP files supplied by content mods are a different layer. State which layer owns the behavior a user is asking about.
- Deliver in this order: what it is not, data model, per-frame pipeline, cost model (why it is fast), hard limits, practical knobs. Cite repository-relative paths with line ranges.
- When the conclusion has structure, produce one archify diagram and keep the prose numbers identical to it.
Pitfalls
- Do not explain a fork by its ancestor's README. Check whether the current code still uses the ancestor's solver or replaced it.
- Comments are not features. An extension-point comment or an unbuilt
#ifdefbranch does not ship in the DLL. - Do not repeat marketing performance claims. Derive the cost model from what the code skips (culling, parallelism, caching) and from its hard caps.
- "Soft" behavior may not come from simulating the mesh at all. Find what is actually integrated before explaining softness, jiggle, or stiffness.
- If neither a repository nor an inspectable binary is available, mark the explanation as description-based
[unverified]; do not present the mod page as architecture. - Read the runtime dispatch before trusting any constant table.
REL::Module::Runtimeis a bitmask (AE = 1,SE = 2,VR = 4), so a compare against2selects SE and4selects VR; assuming 1/2/3 ordering silently swaps every ID, vtable, and struct offset in the answer. - Confirm a struct identity by a layout fingerprint, not by one matching field.
ShadowSceneNodeon VR shifts every member by the documented+0x28; a candidate table that shifts by exactly that delta is the same object, while one landing on a plausible member proves nothing. - A vtable byte offset divided by pointer size is the slot index the framework comments use: on x64
vtable + 0x150is slot0x2A, which CommonLibSSE-NG namesBSShaderProperty::GetRenderPasses. Never infer the method from its neighbouring slots. - Read the plugin's own pre-patch guards to learn the intended target: an opcode-byte check plus a callee-ID comparison names the hook target even when the engine function has no symbol. Cite that ID, and label any human-readable engine name as inference.
- A fix that only writes engine render caches (per-object masks, per-pass arrays) is safe to add and remove because it never touches records or saves; say that explicitly instead of implying the plugin rewrites the renderer.
Output conventions
- Reply in the user's language; keep file names, API names, console commands, and numeric constants verbatim.
- Lead with the one-sentence mechanism, then the layered explanation; do not open with history.
- Distinguish verified source facts from inference; label anything not exercised or read.
See also
references/fsmp-physics-pipeline.md— worked example: Faster HDT-SMP data model, frame pipeline, collision limits, and tuning map.references/dll-static-reverse-engineering.md— no-source plugin: PE/capstone procedure, string-to-function xref, and mapping recovered IDs onto CommonLibSSE-NG headers.diagnosing-bgs-problems— when the question is a symptom rather than a mechanism.archify— pipeline or architecture diagram for the explanation.
04 同仓库更多 Skills
web-retrieval-resilience
Web tools fail or search rules break: repair or fall back.
blocked-page-recovery
Use when a fetch fails: 403/429, paywall, WAF, bot wall.
verification-loop
Run a six-phase verification of a Claude Code session's work — build, type check, lint, tests with coverage, security grep, and diff review — then produce a PASS/FAIL verification report. Use when verifying work after completing a feature or refactor, before creating a PR, or when quality gates must pass.
unreal-world-builder
开放世界与环境专家——精通 UE5 World Partition、Landscape、程序化植被、HLOD 和大规模关卡流式加载,打造无缝开放世界体验
unreal-technical-artist
Unreal Engine 视觉管线专家——精通材质编辑器、Niagara 特效、程序化内容生成和 UE5 项目的美术到引擎管线
unreal-systems-engineer
性能与混合架构专家——精通 C++/Blueprint 边界、Nanite 几何体、Lumen GI 和 Gameplay Ability System,面向 AAA 级 Unreal Engine 项目