IIITotal Conquest

Aqueduct for mod makers

Script UI

data\rtwr_ui.txt

Reload with rtwr_ui_reload. Conditions and {text} values are in Script conditions and counters.

A row in the settlement window

rtwr_ui.txt
section my_stats
	title "My stats"

row my_row
	in my_stats
	label "Loyalty"
	value "{s:my_loyalty}"
	show_if owner

A page: a tab in the window

rtwr_ui.txt
page my_page
	title "Edicts"
	show_if owner

section my_page_section
	in my_page
	column left
	title "Edicts"

A button

rtwr_ui.txt
button my_button
	in my_page_section
	label "Public schools"
	text "Enact"
	cost 8000
	enabled_if treasury >= 8000
	show_if s:my_schools = 0
	set s:my_schools 1
	event my_schools

A press stores rtwr_ui_selected 1 on that settlement, and fires the event:

campaign script
monitor_event ButtonPressed ButtonPressed my_schools
	console_command rtwr_log schools enacted
end_monitor

stock_cost grain 150 pays in goods, with rtwr_stock.txt.

A map pip

A badge or picture beside a settlement's name.

rtwr_ui.txt
pip my_pip
	text "C"
	colour 214 172 64
	show_if s:my_schools = 1

pip my_pip_picture
	image data/ui/pips/citizen.tga
	size 20
	show_if s:my_schools = 2

A decision

A HUD button opens the Decisions window. The AI takes none.

rtwr_ui.txt
decision my_census
	title "Hold a census"
	group "Administration"
	text "Our officials will count every household."
	effects "Tax income +10% for 10 turns."
	require "No census lately" my_census_wait = 0
	cost 4000
	once
	set my_census_wait 20
	event my_census

once needs declare_persistent_counter my_census_taken. The script does the effect:

campaign script
monitor_event ButtonPressed ButtonPressed my_census
	console_command rtwr_money local 1000
end_monitor

A card window

Picture cards, some held in slots. A button with the event rtwr_window:<window> opens it.

rtwr_ui.txt
button my_open_edicts
	in my_stats
	label "Edicts of this town"
	text "Open"
	event rtwr_window:my_edicts
	show_if owner

window my_edicts
	title "Edicts"
	slots 2
	label "In force"
	text "Edicts this town may enact"

card my_tax_relief
	in my_edicts
	title "Tax Relief"
	label "-25% tax, +25% public order"
	value "Finance"
	text "An empty purse makes a poor foundation for loyalty."
	building my_edict_level
	cost 5000
	event my_tax_relief_enact
	remove my_tax_relief_revoke

Your script makes and removes the building, on the settlement whose rtwr_ui_selected is 1. Other card lines:

LineDoes
slots autoholds the town's districts (Districts)
construct <chain>queues that chain at the game's price
image <file>a picture instead of the building's, 361x163
active_if <cond>in force while it holds, instead of the building

Lists a section can show

rtwr_ui.txt
section my_lists
	in my_page
	column right
	title "Provinces"
	list provinces

list empire, settlement, partners, effects (with rtwr_trade.txt), stock (with rtwr_stock.txt), provinces (with provinces in rtwr_economy.txt).

A button with event rtwr_peoples opens the Peoples window.

Limits

2,048 definitions, 96 items in a column, 8 conditions on each.