Scripted Buttons

Define reusable scripted buttons for Victoria 3 journal entries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scripted Buttons standardize and simplify the creation of journal-entry-facing buttons in Victoria 3 mods, reducing duplication and ensuring consistent UX across files.

Core Features & Use Cases

  • Reusable button definitions: Declare name, description, visibility, and cooldowns in a single place.
  • UI integration with JEs: Attach buttons to journal entries and trigger scripted effects or events.
  • Lifecycle control: Manage visibility, availability, and AI usage to prevent spam and ensure correct gating.
  • Use Case: When modding Victoria 3, define a button to open a JE and apply a modifier only if certain conditions are met.

Quick Start

Create a new scripted button in common/scripted_buttons following the example pattern, including the frontmatter with name and description and attaching it to a journal entry through scripted_button.

Frequently Asked Questions about Scripted Buttons

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

FAQPage Schema
How do I create reusable scripted buttons for Victoria 3 journal entries?

To create reusable scripted buttons for Victoria 3 journal entries, define them in common/scripted_buttons with frontmatter specifying name and description, then attach them to journal entries to trigger scripted effects or events.

What is the best way to automate UI actions in Victoria 3 mods?

Automating UI actions in Victoria 3 mods is best achieved by defining scripted buttons that standardize journal-entry-facing interactions, reducing duplication and ensuring consistent UX across mod files.

How do I control visibility and availability for scripted buttons in Victoria 3?

Control visibility and availability for scripted buttons in Victoria 3 by declaring conditions, cooldowns, and AI usage parameters in a single reusable definition to prevent spam and ensure correct gating.

Can I attach scripted effects and events to journal entry buttons in Victoria 3?

Yes, you can attach scripted effects and events to journal entry buttons in Victoria 3 by linking the reusable scripted button definitions directly to the journal entries through the scripted_button parameter.

Do I need to define safety constraints when modding Victoria 3 scripted buttons?

Yes, you need to define safety constraints when modding Victoria 3 scripted buttons to guarantee non-malicious behavior, ensuring the frontmatter correctly detects optional components and enforces safe execution.