# ebtx11/economic-and-financial-mod architecture

> Architecture diagram of the GitHub repository ebtx11/economic-and-financial-mod, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ebtx11/economic-and-financial-mod
- Repository: https://github.com/ebtx11/economic-and-financial-mod

## Overview

Economic and Financial Mod is a Victoria 3 gameplay mod: it adds economic, monetary, financial, and stockpile systems to the game. The apparent player workflow is to use custom interfaces and game decisions to manage those systems, with buildings, production methods, scripted effects, and game events supporting the simulation. The tree also shows currencies, monetary laws, treaties, and companies as distinct capabilities. No README is present and the supplied excerpts cover only auxiliary variable-update scripts, so subsystem connections below are dashed and unverified rather than asserted as observed calls.

Main entry points: [`common/scripted_effects/01_financial_scripted_effects.txt`](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_effects/01_financial_scripted_effects.txt) (Financial rules), [`common/scripted_effects/01_economic_scripted_effects.txt`](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_effects/01_economic_scripted_effects.txt) (Economic rules), [`common/history/global`](https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/history/global) (Starting variables), [`common/production_methods`](https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/production_methods) (Production buildings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Player interaction"]
  node_windows["Custom windows"]
  node_economic_ui["Economic controls"]
  node_financial_ui["Financial controls"]
  node_stockpile_ui["Stockpile controls"]
end

subgraph group_economy["Economic systems"]
  node_economy_rules["Economic rules"]
  node_economic_values["Economic values"]
  node_production["Production buildings"]
  node_goods["Goods and needs"]
  node_companies["Companies"]
end

subgraph group_finance["Finance and currency"]
  node_financial_rules["Financial rules"]
  node_currency["Currency values"]
  node_monetary_laws["Monetary laws"]
  node_treaties["Monetary treaties"]
end

subgraph group_gameplay["Game integration"]
  node_stockpile_rules["Stockpile rules"]
  node_game_events["Economic events"]
  node_game_hooks["Game hooks"]
  node_history_state["Starting variables"]
end

node_player(("Player"))

node_player -.->|"opens"| node_windows
node_player -.->|"manages economy"| node_economic_ui
node_player -.->|"manages finance"| node_financial_ui
node_player -.->|"manages reserves"| node_stockpile_ui
node_economic_ui -.->|"changes economy"| node_economy_rules
node_financial_ui -.->|"changes finance"| node_financial_rules
node_stockpile_ui -.->|"changes stockpiles"| node_stockpile_rules
node_economy_rules -.->|"uses values"| node_economic_values
node_economy_rules -.->|"affects production"| node_production
node_production -.->|"produces goods"| node_goods
node_production -.->|"supports companies"| node_companies
node_financial_rules -.->|"uses values"| node_currency
node_monetary_laws -.->|"sets policy"| node_financial_rules
node_treaties -.->|"enables unions"| node_financial_rules
node_game_hooks -.->|"triggers events"| node_game_events
node_history_state -.->|"initializes variables"| node_economy_rules
node_history_state -.->|"initializes variables"| node_financial_rules
node_history_state -.->|"initializes variables"| node_stockpile_rules

click node_windows "https://github.com/ebtx11/economic-and-financial-mod/tree/master/gui/ef_dev_and_custom_windows"
click node_economic_ui "https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_guis/00_economic_scripted_guis.txt"
click node_financial_ui "https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_guis/00_financial_scripted_guis.txt"
click node_stockpile_ui "https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_guis/00_stockpile_scripted_guis.txt"
click node_economy_rules "https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_effects/01_economic_scripted_effects.txt"
click node_economic_values "https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/script_values/00_economic_scripted_value.txt"
click node_production "https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/production_methods"
click node_goods "https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/goods"
click node_companies "https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/company_types/00_ef_companies.txt"
click node_financial_rules "https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_effects/01_financial_scripted_effects.txt"
click node_currency "https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/script_values/01_economic_currency_scripted_value.txt"
click node_monetary_laws "https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/laws"
click node_treaties "https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/treaty_articles"
click node_stockpile_rules "https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_effects/01_stockpile_scripted_effects.txt"
click node_game_events "https://github.com/ebtx11/economic-and-financial-mod/blob/master/events/00_ef_economic_event.txt"
click node_game_hooks "https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/on_actions/00_ef_on_action.txt"
click node_history_state "https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/history/global"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_windows,node_economic_ui,node_financial_ui,node_stockpile_ui toneBlue
class node_economy_rules,node_economic_values,node_production,node_goods,node_companies toneAmber
class node_financial_rules,node_currency,node_monetary_laws,node_treaties toneMint
class node_stockpile_rules,node_game_events,node_game_hooks,node_history_state toneRose
class node_player toneIndigo
```

## Components

### Player interaction

- [Custom windows](https://github.com/ebtx11/economic-and-financial-mod/tree/master/gui/ef_dev_and_custom_windows): `gui/ef_dev_and_custom_windows`
- [Economic controls](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_guis/00_economic_scripted_guis.txt): `common/scripted_guis/00_economic_scripted_guis.txt`
- [Financial controls](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_guis/00_financial_scripted_guis.txt): `common/scripted_guis/00_financial_scripted_guis.txt`
- [Stockpile controls](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_guis/00_stockpile_scripted_guis.txt): `common/scripted_guis/00_stockpile_scripted_guis.txt`

### Economic systems

- [Economic rules](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_effects/01_economic_scripted_effects.txt): `common/scripted_effects/01_economic_scripted_effects.txt`
- [Economic values](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/script_values/00_economic_scripted_value.txt): `common/script_values/00_economic_scripted_value.txt`
- [Production buildings](https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/production_methods): `common/production_methods`
- [Goods and needs](https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/goods): `common/goods`
- [Companies](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/company_types/00_ef_companies.txt): `common/company_types/00_ef_companies.txt`

### Finance and currency

- [Financial rules](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_effects/01_financial_scripted_effects.txt): `common/scripted_effects/01_financial_scripted_effects.txt`
- [Currency values](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/script_values/01_economic_currency_scripted_value.txt): `common/script_values/01_economic_currency_scripted_value.txt`
- [Monetary laws](https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/laws): `common/laws`
- [Monetary treaties](https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/treaty_articles): `common/treaty_articles`

### Game integration

- [Stockpile rules](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/scripted_effects/01_stockpile_scripted_effects.txt): `common/scripted_effects/01_stockpile_scripted_effects.txt`
- [Economic events](https://github.com/ebtx11/economic-and-financial-mod/blob/master/events/00_ef_economic_event.txt): `events/00_ef_economic_event.txt`
- [Game hooks](https://github.com/ebtx11/economic-and-financial-mod/blob/master/common/on_actions/00_ef_on_action.txt): `common/on_actions/00_ef_on_action.txt`
- [Starting variables](https://github.com/ebtx11/economic-and-financial-mod/tree/master/common/history/global): `common/history/global`

### Other components

- **Player**

## Connections

- Player → Custom windows: opens
- Player → Economic controls: manages economy
- Player → Financial controls: manages finance
- Player → Stockpile controls: manages reserves
- Economic controls → Economic rules: changes economy
- Financial controls → Financial rules: changes finance
- Stockpile controls → Stockpile rules: changes stockpiles
- Economic rules → Economic values: uses values
- Economic rules → Production buildings: affects production
- Production buildings → Goods and needs: produces goods
- Production buildings → Companies: supports companies
- Financial rules → Currency values: uses values
- Monetary laws → Financial rules: sets policy
- Monetary treaties → Financial rules: enables unions
- Game hooks → Economic events: triggers events
- Starting variables → Economic rules: initializes variables
- Starting variables → Financial rules: initializes variables
- Starting variables → Stockpile rules: initializes variables
