Skip to content
Skills Library
Programming · Building & coding

hoi4-pdx-modding

/hoi4-pdx-modding

Implement, explain, refactor, and validate portable Hearts of Iron IV mods written in Paradox/PDX script. Use for descriptors, scopes, variables, arrays, events, decisions, focuses, ideas, characters, history, on_actions, GUI/GFX, shaders and map rendering, localisation, AI, performance, compatibility, version migration, logs, encoding, or cross-file identifiers. Works from natural-language requests and verifies version-sensitive syntax against the target installation.

Licence
CC-BY-SA-4.0
Last repository change
10.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
43
Scripts
4
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 10.11.2026, without references to retired models or APIs.

Licence

CC-BY-SA-4.0, otwarta.

What to check before installing
  • 4 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: scripts/audit-visible-flag-localisation.ps1, scripts/check-gui-shader-format.py, scripts/index-vanilla-docs.ps1, scripts/validate-hoi4.ps1

What it does and when to use it

Implement, explain, refactor, and validate portable Hearts of Iron IV mods written in Paradox/PDX script. Use for descriptors, scopes, variables, arrays, events, decisions, focuses, ideas, characters, history, on_actions, GUI/GFX, shaders and map rendering, localisation, AI, performance, compatibility, version migration, logs, encoding, or cross-file identifiers. Works from natural-language requests and verifies version-sensitive syntax against the target installation.

Original author description

Implement, explain, refactor, and validate portable Hearts of Iron IV mods written in Paradox/PDX script. Use for descriptors, scopes, variables, arrays, events, decisions, focuses, ideas, characters, history, on_actions, GUI/GFX, shaders and map rendering, localisation, AI, performance, compatibility, version migration, logs, encoding, or cross-file identifiers. Works from natural-language requests and verifies version-sensitive syntax against the target installation.

How it works

  1. User guide delivery
  2. Establish the target
  3. File comparison and hashes
  4. Player-facing writing
  5. Select references
  6. Implement safely
  7. Place generated tools by audience
  8. Validate proportionally
Original SKILL.md headings · 260 lines, 1,832 words
SKILL.md preview
---
name: hoi4-pdx-modding
description: Implement, explain, refactor, and validate portable Hearts of Iron IV mods written in Paradox/PDX script. Use for descriptors, scopes, variables, arrays, events, decisions, focuses, ideas, characters, history, on_actions, GUI/GFX, shaders and map rendering, localisation, AI, performance, compatibility, version migration, logs, encoding, or cross-file identifiers. Works from natural-language requests and verifies version-sensitive syntax against the target installation.
---

# HOI4 PDX modding

Apply [shared workflow boundaries](references/workflow-boundaries.md) for
task size, evidence reuse, testing budgets, stopping, and handoff. Subsystem
instructions do not expand those boundaries.

## User guide delivery

Serve-only artifacts: [English](assets/user-guides/hoi4-modding-guide.en.md) |
[简体中文](assets/user-guides/hoi4-modding-guide.zh-CN.md) |
[日本語](assets/user-guides/hoi4-modding-guide.ja.md) |
[Русский](assets/user-guides/hoi4-modding-guide.ru.md) |
[한국어](assets/user-guides/hoi4-modding-guide.ko.md).
For capability/use questions, deliver the resolved file/link in the requested
language; otherwise match the user's language, falling back to English.
Do not preload or summarise guide bodies. Read a guide only when explicitly
asked to edit, translate or discuss its contents.

## Establish the target

1. Locate the actual mod root, launcher-side `.mod` file, `descriptor.mod`, and
   repository guidance such as `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, or a
   project technical handoff. Project guidance overrides generic examples.
2. Record the target HOI4 build, DLCs, dependencies, load order, and whether the
   work is a standalone mod, submod, compatibility patch, or vanilla override.
3. Inspect `replace_path` and the active playset before assuming vanilla or a
   dependency supplies a database.
4. Search definitions and callers across the target mod before editing. Treat
   identifiers, paths, sprite names, equipment archetypes, and localisation
   keys as case-sensitive. Localisation entries must use `key: "Text"`;
   `key:0 "Text"` and every other numeric key-version suffix are errors.
   Key lines use exactly one leading ASCII space; the language header
   `l_<language>:` stays flush left. Tabs, extra spaces, and flush-left keys
   are errors because editors parse these files as YAML and mixed indent
   paints the buffer red.
5. Read the affected feature's names, descriptions, options, tooltips, scripted
   localisation, GUI text, and character descriptions before inferring its
   purpose. Build the code-to-visible-meaning map in
   [semantic-intent-audit.md](references/semantic-intent-audit.md); never infer
   proper names or gameplay intent from IDs, filenames, or variable names.
6. Base implementation on current installed vanilla code and the bundled
   templates/kits. Verify uncertain fields, scopes, tokens, and file layout
   with current consumers, generated documentation, and the exact dependency
   version. The Wiki is optional background reference only and may be long
   outdated; never require a Wiki lookup or use it to override these sources.
   Resolve template conflicts against current vanilla/runtime evidence and
   correct stale templates. If local evidence is missing, mark the detail
   unverified. See [source order](references/pdx-script.md#source-order).

Never require the user to know PDX syntax. Translate ordinary-language goals
into scopes, lifecycle, content objects, files, identifiers, visible behavior,
AI behavior, compatibility assumptions, and tests. Ask only questions whose
answers cannot be discovered or safely defaulted.

When the `hoi4_local` MCP tools are available, prefer
`detect_hoi4_environment` for the initial path/version inventory,
`trace_hoi4_identifier` for bounded cross-root identifier evidence, and
`validate_hoi4_changes` for the changed-path validation lane. These are local
read-only instruments, not new source authority: still interpret their output
through the source hierarchy and consumer checks below. If the MCP server is
unavailable, continue with the documented `rg`, Git, PowerShell, and bundled
script workflow; never block ordinary modding work on plugin availability.

## File comparison and hashes

Do not calculate SHA-256 or other file hashes by default for ordinary HOI4
scripts, localisation, GUI, assets, copies, skill synchronization, test evidence,
or releases. Use Git diffs, paths, versions, byte sizes, and the relevant
content/format evidence. Do not create a checksum manifest merely to make a
routine change appear safer or more rigorous.

Use a hash only when it answers a concrete question: an explicitly requested
exact-duplicate/content comparison, an official downloaded-tool checksum, an
identified corruption/transfer issue, or a user-required artifact identity.
Limit it to those files and reuse existing evidence. A locally computed digest
without a trusted reference does not establish safety. Compare decoded pixels
directly for lossless conversion; do not add a second hash pass. Git object IDs,
small diagnostic fingerprints, and engine/shader hash algorithms are functional
identifiers, not instructions to hash the mod tree.

## Player-facing writing

Localisation values are written for players, not developers. Write character
prose, choices, requirements, costs, and outcomes in the mod's established
voice. Never paste prompts, authoring instructions, internal mod conventions,
or implementation notes into visible text; put those in comments or technical
documentation. Translate necessary gameplay explanations into player language.

Country-leader trait tooltips show the trait name and generated modifiers, not
an automatic `<trait>_desc`. Do not create or require unused trait descriptions;
put character background in the leader's actually referenced `desc` instead.
Do not apply this rule blindly to other trait types or custom GUI consumers.
See [localisation-deep-dive.md](references/localisation-deep-dive.md#player-facing-copy-and-visible-consumers).

## Select references

- [pdx-script.md](references/pdx-script.md): scopes, variables, arrays, loops,
  effects, triggers, identifiers, and source verification.
- [pdx-language.md](references/pdx-language.md): Clausewitz/P-language
  grammar, links (`var:`, `token:`, `mio:`, `sp:`), cardinality, and
  editor-versus-engine mismatches.
- [ide-extensions.md](references/ide-extensions.md): CWTools, HOI4 Mod
  Utilities, and HOI4 Modding Tools as editor aids, not engine authority.
- [project-structure-history.md](references/project-structure-history.md):
  descriptors, roots, `replace_path`, tags, characters, countries, states,
  provinces, and map/history risk.
- [content-objects.md](references/content-objects.md): events, decisions,
  focuses, ideas, MIOs, on_actions, buildings, BOP, operations, achievements,
  and dynamic modifiers.
- [leader-abilities.md](references/leader-abilities.md): ability parser
  cascades, safe placement, activation effects, and validation of unlocks.
- [ai-and-military-content.md](references/ai-and-military-content.md): AI
  strategies, reversed strategies, equipment designs, division templates,
  OOBs, modules, variants, tactics, and names.
- [aces-operatives.md](references/aces-operatives.md): named ace types,
  `add_ace`, custom operative traits, fixed portraits, icons, and runtime tests.
- [diplomacy-factions-assets.md](references/diplomacy-factions-assets.md):
  diplomacy, factions, peace conferences, entities, landmarks, music, sound.
- [gui-localisation.md](references/gui-localisation.md): GUI, GFX, scripted GUI,
  scripted localisation, sprites, tooltips, encodings, and localisation.
- [animated-textures.md](references/animated-textures.md): convert video or
  frame sequences into `frameAnimatedSpriteType` assets for icons, overlays,
  buttons, panels, backgrounds, and large synchronized-strip animations.
- [localisation-deep-dive.md](references/localisation-deep-dive.md): colours,
  icons, formatted variables, scope functions, nested and bound text,
  formatters, dynamic consumers, visible flag conditions, templates, and
  localisation diagnostics.
- [semantic-intent-audit.md](references/semantic-intent-audit.md): mandatory
  code-to-localisation mapping before existing-feature fixes, refactors,
  performance work, migration, or documentation.
- [performance-debugging.md](references/performance-debugging.md): hot paths,
  caching, log triage, debug mode, and runtime evidence.
- [algorithm-engineering.md](references/algorithm-engineering.md): design
  non-trivial PDX algorithms with deterministic state machines, incremental
  work, compact data flow, bounded execution, fault isolation, and
  consumer-aware presentation. Read it for simulations, minigames, large
  scripted systems, procedural GUI, or performance-sensitive orchestration.
- [version-migration.md](references/version-migration.md): game updates and
  full-file vanilla overrides.
- [recent-official-modding-changes.md](references/recent-official-modding-changes.md):
  dated engine changes, current 1.19.4 source evidence and unresolved schemas.
- [media-models-shaders.md](references/media-models-shaders.md): textures,
  entities, animations, models, audio, and shaders.
- [gui-shader-effects.md](references/gui-shader-effects.md): procedural GUI
  art, button-state binding, atlas/mask inputs, clocks, fixed hit regions,
  a minimal rendering component, and backend evidence; load its recipes only
  for the selected effects.
- [shader-map-projection.md](references/shader-map-projection.md): GPU map
  deformation, globe views, camera-driven transitions, coordinate contracts,
  attached render layers, picking evidence, and graphics-mod compatibility.
  Read for rendering changes, not ordinary province/history edits.
- [media-optimization.md](references/media-optimization.md): consumer-aware
  format conversion, deduplication, rollback, and size verification.
- [vanilla-documentation-map.md](references/vanilla-documentation-map.md):
  choosing installed schema sources and debug commands.
- [review-checklist.md](references/review-checklist.md): reviews, renames,
  regression checks, encoding, and handoff.
- [development-documentation.md](references/development-documentation.md):
  technical documentation and comments when a documented contract changes,
  with concise handoff proportional to the work.
- [source-attribution.md](references/source-attribution.md): provenance and
  licensing when maintaining or redistributing these skills.

Use sibling `hoi4-content-builder` for end-to-end construction and templates.
Use sibling `hoi4-review-debug` for diagnosis, adversarial review, migration,
performance analysis, and runtime testing.

## Implement safely

1. Convert the request into a content contract: caller, starting scope,
   visible result, AI behavior, lifecycle, DLC/dependency gates, IDs, assets,
   save impact, and acceptance tests.
2. For existing content, derive the visible result from the actual
   localisation and scripted-localisation consumers. Reconcile their promised
   names, dates, costs, cooldowns, and failure behavior with project guidance
   and code before editing.
3. Trace scope from each real caller through scripted effects, triggers,
   events, decisions, on_actions, and GUI callbacks. Guard a scope only when
   that caller can actually lack it. A GPT-series model, especially
   GPT-6astra or GPT-6.1sol, does not add speculative guards, silent
   fallbacks, extra existence checks, clamps, or unused triggers. In a game
   those paths hide defects from the developer and cost the player
   performance or behavior nobody asked for. Apply the necessity gate in
   [test-mod.md](../hoi4-content-builder/workflows/test-mod.md) before any
   in-game launch.
4. Reuse tokens proven in the current target. A generated modifier proves
   engine recognition, not that every consumer accepts it; require a working
   consumer for database-specific fields.
5. Create definitions before consumers and wire the complete dependency chain,
   including localisation, GUI/GFX, assets, history, AI, and lifecycle cleanup.
   A `has_country_flag` condition exposed by `available`, `allow`, `bypass`, or
   another requirement tooltip needs a localisation key for every supported
   language; otherwise the UI displays the internal flag ID with a check or
   cross. If the internal flag name should not be player-facing, place the
   check inside `hidden_trigger` and provide an explicit localised tooltip.
6. Reuse the owning subsystem's existing file or registry for definitions with
   the same parser directory, load conditions, lifecycle, and consumer family.
   Do not create one tiny `.txt`, `.gfx`, `.gui`, or localisation file per
   object by default. Consolidate related definitions while keeping sections
   readable; split only for a real load-order or compatibility boundary,
   independent generated ownership, materially different lifecycle, or a file
   large enough that consolidation would hinder maintenance. HOI4 normally
   parses these files at startup rather than rereading them every animation
   frame, so fewer tiny files mainly reduce file-open/metadata work and project
   clutter; do not overstate this as continuous runtime disk I/O.
   For leader abilities, append new definitions after the existing abilities,
   inside the owning `ability = { ... }` block before its closing brace.
   A malformed ability can prevent later definitions in that file from loading.
   Keep stable IDs and order; appending limits exposure but does not replace
   field, effect-scope, modifier, unlock, and resource validation. Read
   [leader-abilities.md](references/leader-abilities.md) for any ability change.
7. Preserve unrelated changes and stable flags/variables unless an explicit
   migration plan covers old saves. Prefer event-driven or batched updates to
   global daily scans when behavior permits.
8. Treat copied templates as parameterized skeletons. Replace every placeholder
   and revalidate against the target build and dependencies.
9. Update affected documented contracts under
   [development-documentation.md](references/development-documentation.md).
   Keep handoff proportional and comment non-obvious scope, state, lifecycle,
   performance, compatibility, or engine-workaround logic.

## Place generated tools by audience

In a Git repository (including a worktree with a `.git` file), decide the
intended audience and lifetime before saving a generated helper:

- **Reusable by the whole team:** put it in the repository's existing shared,
  version-controlled tool directory, such as `tools/` or `scripts/`. Keep it
  discoverable and usable by other contributors; parameterize user-specific
  paths and keep personal configuration/output in ignored storage.
- **Only for the current user:** put the tool and its private support files in
  a directory covered by the repository's `.gitignore`, reusing an existing
  private workspace such as `.ai-private/`. Verify the actual file path with
  `git check-ignore -v -- <path>` before staging. If no such directory exists,
  add a narrowly scoped directory rule to `.gitignore` before creating it.
  Do not force-add private tools. Ignore rules do not untrack existing files;
  do not silently remove tracked files or rewrite history to hide them.
- **One-off helpers:** use a temporary or ignored working directory; do not
  add throwaway tools, logs, or intermediate output to Git history.

"Shared/public" means part of the team's repository, not an instruction to
create a folder literally named `public` or to publish/commit without user
authorization. Respect the project's existing layout and avoid extra folders.

## Validate proportionally

Choose the inspect-only, changed-path, or broader lane in
[shared workflow boundaries](references/workflow-boundaries.md#choose-the-cheapest-sufficient-evidence).
That reference owns validation budgets and evidence reuse for all three skills.
Report static and in-game evidence separately; inspect-only completion may say
"scripts skipped; diff read".

After a game update, rebuild the installed documentation inventory with an
explicit game root:

```powershell
& <SKILL_ROOT>/scripts/index-vanilla-docs.ps1 -GameRoot <HOI4_GAME_ROOT>
```
Files in this package (43)
  • SKILL.md 16 KB
  • agents/openai.yaml 1 KB
  • assets/gui-shader-example/verification.json 1 KB
  • assets/gui-shader-example/gfx/FX/skillfx_demo.fxh 1 KB
  • assets/gui-shader-example/gfx/FX/skillfx_demo.shader 2 KB
  • assets/gui-shader-example/interface/skillfx_demo.gfx 1 KB
  • assets/user-guides/hoi4-modding-guide.en.md 17 KB
  • assets/user-guides/hoi4-modding-guide.ja.md 20 KB
  • assets/user-guides/hoi4-modding-guide.ko.md 21 KB
  • assets/user-guides/hoi4-modding-guide.ru.md 31 KB
  • assets/user-guides/hoi4-modding-guide.zh-CN.md 14 KB
  • references/aces-operatives.md 4 KB
  • references/ai-and-military-content.md 10 KB
  • references/algorithm-engineering.md 13 KB
  • references/animated-textures.md 13 KB
  • references/community-tool-index.md 8 KB
  • references/content-objects.md 13 KB
  • references/development-documentation.md 4 KB
  • references/diplomacy-factions-assets.md 5 KB
  • references/gui-localisation.md 14 KB
  • references/gui-shader-effects.md 12 KB
  • references/gui-shader-recipes.md 6 KB
  • references/ide-extensions.md 5 KB
  • references/leader-abilities.md 5 KB
  • references/localisation-deep-dive.md 27 KB
  • references/media-models-shaders.md 6 KB
  • references/media-optimization.md 3 KB
  • references/pdx-language.md 7 KB
  • references/pdx-script.md 13 KB
  • references/performance-debugging.md 6 KB
  • references/project-structure-history.md 6 KB
  • references/recent-official-modding-changes.md 22 KB
  • references/review-checklist.md 7 KB
  • references/semantic-intent-audit.md 3 KB
  • references/shader-map-projection.md 11 KB
  • references/source-attribution.md 17 KB
  • references/vanilla-documentation-map.md 15 KB
  • references/version-migration.md 9 KB
  • references/workflow-boundaries.md 4 KB
  • scripts/audit-visible-flag-localisation.ps1 10 KB
  • scripts/check-gui-shader-format.py 6 KB
  • scripts/index-vanilla-docs.ps1 1 KB
  • scripts/validate-hoi4.ps1 8 KB

Versions

The database has no other skills named hoi4-pdx-modding.

Database snapshot: 13.11.2026 · package version 94217c654d6f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100hoi4-modding
    Verified Hearts of Iron IV modding knowledge for writing, reviewing and debugging HOI4 mod code. Use for ANY task involving HOI4 mods or Paradox script: events, national focus trees, decisions, ideas and modifiers, national spirits, characters, MIOs, tech trees, scripted GUIs,…
  • 90hoi4-content-builder
    Turn plain-language ideas into complete, playable Hearts of Iron IV mods and advanced systems. Use when a user describes a mod without knowing PDX script, or requests events, decisions, focuses, countries, characters, ideas, MIOs, doctrines, raids, special projects, operations,…
  • 100hoi4-review-debug
    Review, diagnose, and test existing Hearts of Iron IV mods using source, logs, installed-game evidence, and optional isolated runtime runs. Use for audits, defect or crash triage, balance/UX/performance/lifecycle analysis, migration, or explicitly requested fixes; use…
  • 100minecraft-modding
    Create, modify, debug, or migrate Minecraft mods for current NeoForge or Fabric 26.x, legacy 1.21.x, and Forge 1.20.1. Use for loader-based gameplay code and assets; use minecraft-multiloader when one codebase must target both modern loaders.
  • 98beatsaber-pc-modding
    End-to-end Beat Saber PC modding. Use when installing, updating, or downgrading PC mods (Steam/Oculus/BSManager), or when developing C# mods with BSIPA, Harmony patches, BSML UI, and SiraUtil/Zenject. Triggers on BSIPA, BeatMods, BSML, HarmonyPatch, SiraUtil, Zenjector,…
  • 100minecraft-modding
    Create, modify, debug, or migrate Minecraft mods for current NeoForge or Fabric 26.x, legacy 1.21.x, and Forge 1.20.1. Use for loader-based gameplay code and assets; use minecraft-multiloader when one codebase must target both modern loaders.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.