IIITotal Conquest

Aqueduct for mod makers

Script conditions and counters

New condition

I_SettlementUnderSiege <settlement|local> is true while the settlement is besieged. not works.

campaign script
if I_SettlementUnderSiege Capua
	console_command rtwr_log Capua is under siege
end_if

Without the DLL the script stops at this line.

A fixed condition

not I_CompareCounter does nothing in the base game. To make it negate, set this:

aqueduct.ini
[script_fixes]
not_compare_counter=1

It's off by default because old scripts rely on the bug.

Town numbers from counters

Store these on a settlement. The game uses them everywhere: riots, growth, the treasury, the AI and the window.

campaign script
store_counter po_law_add settlement l_ten          ; +10% public order
store_counter po_squalor_set settlement l_zero     ; no squalor
store_counter growth_total_set settlement l_six    ; exactly +3% growth (0.5% steps)
store_counter income_total_add settlement l_500    ; +500 denarii a turn
PrefixUnitFactors
po_<factor>_add, _setpercentgarrison law happiness governor tax_bonus triumph wonder boom entertained health squalor distance culture no_governance tax_penalty turmoil underpopulation besieged blockaded recession governor_unrest leader_unrest total
growth_<factor>_add, _set0.5% stepsfarming farms imports health buildings tax_bonus disbands slavery squalor plague tax_penalty disasters recruits total
income_<type>_add, _setdenariifarms taxes mining trade buildings admin merchants corruption games devastation total

They apply the next time the settlement is worked out, or at once with rtwr_settlement_refresh <settlement|all>.

Hordes

A persistent counter gives a horde a target region. The highest value wins, and 0 turns it off.

campaign script
declare_persistent_counter horde_target_huns_Dacia
set_counter horde_target_huns_Dacia 20

AI generals

ai_army_target <general> <settlement> is stored on the general as the counter ai_target_<settlement>, so a script can set it too.

A counter on a general draws data/ui/banner_pips/<name>.tga above his stars. Needs [banner_pips] enabled=1.

campaign script
store_counter pip_veteran character l_one

Set by Aqueduct

CounterWhereWhat
rtwr_ui_selectedsettlement1 on the settlement whose button was pressed
<decision>_takenpersistenta once decision was taken
res_<resource>, trade_incomesettlementgoods and trade, with rtwr_trade.txt
res_total_<resource>, res_group_<n>_<resource>, trade_income_totalpersistent, once declared
cu_<culture>, cg_<group>settlementculture and group shares, in tenths of a percent
stks_<good>settlementturns in a row its region went short
crown_level, crown_authority, ...persistent, declared by yousee A crown and its satraps

Conditions in data files

rtwr_ui.txt, rtwr_economy.txt, rtwr_stock.txt, rtwr_villages.txt and rtwr_needs.txt share these. Up to 8, all must hold. In the economy, stock and needs files, join them with when a and b.

ConditionHolds when
owner, not_ownerthe settlement is the player's
faction a b, not_faction a bthe faction is one of these
player, not_playerthe faction is human
capital, not_capitalit's the owner's capital
settlement <name>it's this settlement
settlement_min town, settlement_max cityby size: village town large_town city large_city huge_city
building <level>, no_building <level>that level or higher
resource <name>, no_resource <name>the region has it, hidden ones too
my_counter > 0, s:label = 1, treasury >= 500a counter, a stored counter, money; = != < <= > >=
turn >= 10the campaign's turn
owner_towns > 5the owner's settlements
seat_distance > 3regions from the owner's seat
province_whole, not_province_whole, province_held > 1, province_share >= 50with provinces
stock grain >= 100, stock_here grain >= 10, stock_short grain, not_stock_short grainwith rtwr_stock.txt
pops slaves > 20with rtwr_pops.txt
satisfaction * < 30, satisfaction_of gallic * < 30, supplied x, unsupplied xwith rtwr_needs.txt
districts > 1, districts_used > 1, districts_free > 0with rtwr_slots.txt

In texts

{my_counter}, {s:label}, {treasury}, {turn}, {owner_towns}, {province}, {province_name}, {province_held}, {province_total}, {province_share}, {stock:grain}, {stock_net:grain}, {stock_here:grain}, {districts}, {districts_used}, {districts_free}.

{province} also works inside counter names and events: show_if edict_{province} > 0.