Scripted Rules

Define and validate Victoria 3 scripted-rule keys for engine hooks.

21|8|Updated Jun 23, 2025
One-click install
npx skills add https://github.com/mattia2110/tech-and-res --skill scripted-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Scripted Rules
Source: https://github.com/mattia2110/tech-and-res/tree/main/.agents/skills/scripted_rules
Command: npx skills add https://github.com/mattia2110/tech-and-res --skill scripted-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps modders and developers define and review Victoria 3 scripted rule entries to ensure engine hook keys are accurate, consistent, and used as intended.

Core Features & Use Cases

  • Define exact engine-hook keys such as treaty, war, and power bloc checks
  • Provide explicit consumer-key guidance that specific mods or subsystems rely on
  • Validate scope contracts and cross-reference with vanilla references and reusable helpers

Quick Start

Create or update a scripted_rules entry in common/scripted_rules/*.txt following the scope contracts and engine-hook patterns described above.

Frequently Asked Questions about Scripted Rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create Victoria 3 scripted rules that avoid dead code?

Scripted rules in Victoria 3 are defined in common/scripted_rules/*.txt files to establish reliable engine-hook keys that specific mods or subsystems rely on, ensuring consistency and preventing dead code across patches.

How do I validate scope contracts for Victoria 3 scripted rules?

Validate scope contracts for Victoria 3 scripted rules by cross-referencing your entries with vanilla references and reusable scripted_triggers, ensuring your helper conditions meet engine expectations and proper consumer-key compatibility.

What are engine hooks in Victoria 3 common/scripted_rules files?

Engine hooks in Victoria 3 common/scripted_rules files are specific keys, such as treaty, war, and power bloc checks, that ensure scripted rules execute correctly and are used as intended by consumer subsystems.

Why are my Victoria 3 scripted rules causing consumer-key errors across patch sets?

Victoria 3 scripted rules cause consumer-key errors across patch sets when engine-hook keys are inaccurate or inconsistent, failing to meet engine expectations and proper scope contracts required by specific consumer subsystems.

Do I need vanilla references to audit Victoria 3 scripted rules?

Yes, you need vanilla references to audit Victoria 3 scripted rules effectively, as cross-referencing against them ensures your engine-hook keys, scope contracts, and reusable helper conditions match engine expectations.