victoria3-mod-dev
Comprehensive Victoria 3 modding skill for creating, modifying, and debugging mods. Use when working with Victoria 3 mods for (1) Creating new mods from scratch, (2) Adding or modifying game content (decisions, events, buildings, laws, technologies, etc.), (3) Understanding mod file structure and syntax, (4) Debugging mod errors, (5) Creating localization files, (6) Working with .mod descriptor files, or any other Victoria 3 modding tasks.
When & Why to Use This Skill
This Victoria 3 Mod Development skill is a comprehensive assistant designed to streamline the creation, modification, and debugging of mods for Paradox Interactive's Victoria 3. It provides expert guidance on the game's proprietary scripting language, helping users build complex game mechanics—such as custom laws, events, and decisions—while ensuring strict adherence to file structures and syntax requirements.
Use Cases
- Creating Custom Game Content: Generate precise scripts for new decisions, events, buildings, and technologies using the correct Paradox scripting syntax.
- Mod Architecture Setup: Establish the necessary folder hierarchy and .mod descriptor files required for the game to recognize and load the mod correctly.
- Localization Management: Automatically generate and format YAML localization files to ensure mod text displays correctly across different languages.
- Debugging and Optimization: Identify and resolve common modding issues such as syntax errors, scope mismatches, and missing localization keys by analyzing game logs.
- Advanced Scripting Implementation: Implement complex logic using scope operators (ROOT, THIS, FROM) and scripted effects/triggers for sophisticated gameplay changes.
| name | victoria3-mod-dev |
|---|---|
| description | Comprehensive Victoria 3 modding skill for creating, modifying, and debugging mods. Use when working with Victoria 3 mods for (1) Creating new mods from scratch, (2) Adding or modifying game content (decisions, events, buildings, laws, technologies, etc.), (3) Understanding mod file structure and syntax, (4) Debugging mod errors, (5) Creating localization files, (6) Working with .mod descriptor files, or any other Victoria 3 modding tasks. |
| short-description | Create mod for the game victoria3 |
Victoria 3 Mod Development
Guide for creating and modifying Victoria 3 mods using Paradox's scripting language.
Quick Start
Mod Structure
Every Victoria 3 mod requires:
.moddescriptor file inDocuments/Paradox Interactive/Victoria 3/mod/- Mod folder with content in subdirectories:
common/- Game logic (decisions, buildings, laws, technologies, etc.)events/- Event fileslocalization/- Localization files (YAML format)gfx/- Graphics assetsgui/- GUI modifications
Basic .mod File Format
version="1.0.0"
tags={
"Gameplay"
}
name="My Mod"
supported_version="*"
path="mod/MyMod"
remote_file_id=""
Common Modding Tasks
Creating Decisions
Decisions go in common/decisions/. Format:
my_decision = {
is_shown = {
# Conditions for decision to appear
is_ai = no
}
possible = {
# Conditions for decision to be available
bureaucracy > 100
}
when_taken = {
# Effects when decision is taken
add_modifier = {
name = my_modifier
days = 365
}
}
ai_chance = {
base = 0
}
}
Creating Events
Events go in events/. Format:
namespace = mymod
mymod.1 = {
type = country_event
title = mymod.1.t
desc = mymod.1.desc
option = {
name = mymod.1.a
# Option effects
}
}
Localization
Localization files go in localization/<language>/ as YAML:
l_english:
mymod.1.t:0 "Event Title"
mymod.1.desc:0 "Event description."
mymod.1.a:0 "OK"
Common File Types
- Decisions:
common/decisions/*.txt - Events:
events/*.txt - Buildings:
common/buildings/*.txt - Laws:
common/laws/*.txt- See Creating Laws for detailed guide - Law Groups:
common/law_groups/*.txt- Required for laws - Technologies:
common/technology/*.txt - Cultures:
common/cultures/*.txt - Countries:
common/country_definitions/*.txt - Modifiers:
common/static_modifiers/*.txt - Scripted Effects:
common/scripted_effects/*.txt - Scripted Triggers:
common/scripted_triggers/*.txt
Creating Laws
Quick example:
# 1. Create law group (common/law_groups/my_group.txt)
my_law_group = {
law_group_category = economy
}
# 2. Create law (common/laws/my_law.txt)
my_custom_law = {
group = my_law_group
icon = "gfx/interface/icons/law_icons/my_law.dds"
progressiveness = 50
modifier = {
country_construction_efficiency_add = 0.1
}
}
# 3. Add localization (localization/english/my_law_l_english.yml)
# my_custom_law:0 "My Custom Law"
See Creating Laws for complete guide.
Syntax Guidelines
Scope Operators
ROOT- Original scopeTHIS- Current scopeFROM- Previous scopePREV- Previous scope in chain
Common Conditions
is_ai = yes/no- Check if AI controlledhas_modifier = <name>- Check for modifierhas_technology_researched = <tech>- Check technologybureaucracy > <value>- Numeric comparisonsowns_entire_state_region = <state>- State ownership
Common Effects
add_modifier = { name = <name> days = <days> }set_variable = { name = <name> value = <value> }add_technology_researched = <tech>trigger_event = { id = <event_id> }
Reference Files
For detailed information on specific modding areas, see:
- File Structure - Complete directory structure
- Syntax Reference - Detailed syntax guide
- Common Patterns - Common modding patterns
- Examples - Real-world examples
- Glossary - Comprehensive terminology dictionary
- CWTools Guide - Using CWTools for validation and auto-completion
- Creating Laws - Complete guide for creating new laws
Debugging
Common issues:
- Syntax errors: Check brackets, quotes, and indentation
- Missing localization: Ensure all keys exist in localization files
- Scope errors: Verify scope operators are correct
- File paths: Ensure files are in correct directories
Use game's error log to identify issues. Check Documents/Paradox Interactive/Victoria 3/logs/ for error messages.