Originally Posted by
khorgoht
Hello, I have an issue when trying to build templar chapter houses when playing a faction other than Jerusalem.
The building doesn't appear in the construction list anywhere. I'm on sship 0.98 and I'm playing France around turn 110, it should be available almost everywhere.
I looked around in the EDB file and it seems the conditions for both levels of the building templars_chapter_house are wrong.
yep, this building will be completely re-done for the next version:
Code:
;================================================================================================================================;================================================================================================================================
;---- Military Orders --------------------------------------------------------------------------------------------------------
;================================================================================================================================
;================================================================================================================================
; may use: and region_religion catholic 50
; delete Knights of Montesa in EDB
; the split for various factions is the preparation for coding each faction on the basis of historical circumstances
; Evolution:
; - beginning: only Templar Knights in the Holy Land
; - after Hospitaller Militarise: also Hospitallers
; - a kind of event in Spain: Santiago there
; - after Hattin: perhaps
; - after Heavy Mail - more units
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ MILITARY ORDERS
building military_orders_building
{
convert_to military_orders_building
levels military_orders1 military_orders2 military_orders3 military_orders4
{
;==============================================================================================================================
;------- Military Orders Outpost ----------------------------------------------------------------------------------------------
;==============================================================================================================================
military_orders1 requires factions { denmark, norway, scotland, england, france, jerusalem, hre, pisa, venice, papal_states, sicily, spain, portugal, aragon, poland, hungary, } and event_counter faction_turn_catholic 1 and event_counter is_the_ai 1 or event_counter military_orders_buildings_allowed 1 and event_counter is_the_player 1 and hidden_resource templars_chapter_house or hidden_resource st_johns_chapter_house or hidden_resource teutonic_knights_chapter_house or hidden_resource knights_of_santiago_chapter_house
{
convert_to 0
capability
{
;--- BONUSES --------------------------------------------------------------------------------------------------------------
law_bonus bonus -1 ; the Orders are unruly, contesting the local power
law_bonus bonus -2 requires factions { all, } and region_religion islam 50
happiness_bonus bonus 2 requires factions { northern_european, } and event_counter early_era 1 and hidden_resource france or hidden_resource hre or hidden_resource england
happiness_bonus bonus 4 requires factions { northern_european, } and event_counter high_era 1 and hidden_resource france or hidden_resource hre or hidden_resource england
happiness_bonus bonus 1 requires factions { northern_european, } and event_counter late_era 1 and hidden_resource france or hidden_resource hre or hidden_resource england
trade_base_income_bonus bonus 1 requires factions { all, } and not event_counter FL_policy_merchant_skills 1
trade_base_income_bonus bonus 2 requires factions { all, } and event_counter FL_policy_merchant_skills 1
;--- AGENTS --------------------------------------------------------------------------------------------------------------
agent priest 0 requires factions { jerusalem, }
agent_limit priest 0
agent_limit priest 1 requires factions { jerusalem, }
;--------------------------------------------------------------------------------------------------------------------------------------
; UPKEEP/INCOME
income_bonus bonus 50 requires factions { jerusalem, }
income_bonus bonus 50 requires factions { hre, } and hidden_resource hre and event_counter teutonic_hospital_founded 1
income_bonus bonus -50 requires factions { france, england, scotland, norway, denmark, poland, hungary, pisa, venice, sicily, spain, portugal, aragon, papal_states, }
;*************************************************************************************************************************************
;--- UNITS' RECRUITMENT ALL ----------------------------------------------------------------------------------------------------------
; only mounted knights in limited numbers, coming after some time --------------------------------------------------------------------
;
;*************************************************************************************************************************************
; pro memoria: HISTORICAL DATES
; 5: ORDER_OMNE_DATUM_OPTIMUM_BULL
; 16: lateran_council2 : crossbow forbidden by papacy
; 50-100: ORDER_KNIGHTS_HOSPITALLER_MILITARISE
; 60-100: ORDER_SANTIAGO_KNIGHTS_FOUNDED
; 80-120: ORDER_TEUTONIC_HOSPITAL_FOUNDED
; 120-200: ORDER_TEUTONIC_ORDER_FOUNDED
; 90: lateran_council3
; 110: BATTLE_HATTIN
; 140: HEAVY_MAIL_ARMOR
; 170: lateran_council4
;=================================================================================================================================
;------------------ KNIGHTS TEMPLAR: available in - France, Aragon, England, Jerusalem - ------------------
; Holy Land: instantly
recruit_pool "Knights Templar" 1 0.05 2 0 requires factions { jerusalem, england, france, hre, pisa, venice, sicily, spain, portugal, aragon, poland, hungary, } and event_counter order_recruitment_enabled 1 and hidden_resource jerusalem
; France: lateran_council3
recruit_pool "Knights Templar" 1 0.05 2 0 requires factions { jerusalem, england, france, hre, pisa, venice, sicily, spain, portugal, aragon, poland, hungary, } and event_counter order_recruitment_enabled 1 and event_counter lateran_council3 1 and hidden_resource france
; England: BATTLE_HATTIN
recruit_pool "Knights Templar" 1 0.05 2 0 requires factions { jerusalem, england, france, hre, pisa, venice, sicily, spain, portugal, aragon, poland, hungary, } and event_counter order_recruitment_enabled 1 and event_counter BATTLE_HATTIN 1 and hidden_resource england and not hidden_resource france
; Aragon: HEAVY_MAIL
recruit_pool "Knights Templar" 1 0.05 2 0 requires factions { jerusalem, england, france, hre, pisa, venice, sicily, spain, portugal, aragon, poland, hungary, } and event_counter order_recruitment_enabled 1 and event_counter HEAVY_MAIL_ARMOR 1 and hidden_resource aragon and not hidden_resource france
Code:
;======================================================================================================
;======================================================================================================
;-------- MILITARY ORDERS -----------------------------------------------------------------------------
;======================================================================================================
;======================================================================================================
; Mind that for each Latin faction there's a special section setting the counters:
;---------- Excommunicated and Military Orders Buildings Allowed
; Further modding:
; - for each faction there should be another condition
; or better a mechanism involving a Crusade undertaken by the local FL
; - perhaps a crusade should give the KoJ additional units to the recruitment pools (and this should be the main source of MO units in the game)
; For the future: possible events to be used:
; TEMPLAR_GREED
; TEMPLAR_ORDER_DISSOLVED
set_event_counter order_recruitment_enabled 1 ; set to 0 each player's turn, then set to 1 just below - crucial for the EDB
set_event_counter military_orders_buildings_allowed 0 ; enables building in EDB
set_event_counter templars_recruitment_enabled 0
set_event_counter hospitallers_recruitment_enabled 0
set_event_counter teutonic_hospital_founded 0
set_event_counter teutonic_knights_chapter_building_enabled 0
set_event_counter teutonic_knights_recruitment_enabled 0
set_event_counter santiago_knights_recruitment_enabled 0
set_event_counter teutonic_marienburg_built 0
;====================================================================================================== NO UNITS IF LOW STANDING / EXCOMMUNICTIED
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
monitor_event PreFactionTurnStart not IsFactionAIControlled
and GlobalStanding > -0.3
and not FactionExcommunicated
set_event_counter order_recruitment_enabled 1 ; only for the player, the AI factions have triggers at the beginning of the script
if I_EventCounter faction_turn_catholic == 0
terminate_monitor
end_if
end_monitor
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
monitor_event FactionTurnEnd FactionType slave
log ------------------ Templars -----------------------------------------------------------------------
if I_EventCounter templars_recruitment_enabled < 1
and I_TurnNumber > 9 ; historically in 1139 (turn 14)
if RandomPercent < 20
historic_event ORDER_OMNE_DATUM_OPTIMUM_BULL
set_event_counter templars_recruitment_enabled 1
end_if
if I_TurnNumber > 20 ; fall-back after 10 years (1142)
and I_EventCounter templars_recruitment_enabled < 1 ; if it has just happened
historic_event ORDER_OMNE_DATUM_OPTIMUM_BULL
set_event_counter templars_recruitment_enabled 1
end_if
end_if
log ------------------ Knights Hospitaller -------------------------------------------------------------
if I_EventCounter hospitallers_recruitment_enabled < 1
if I_CrusadeInProgress ; kicks-off at the first crusade
and RandomPercent < 20
log --- Knights Hospitaller Militarise At Crusade ---
historic_event ORDER_KNIGHTS_HOSPITALLER_MILITARISE
set_event_counter hospitallers_recruitment_enabled 1
end_if
if I_TurnNumber > 60 ; fall-back after 30 years
log --- Knights Hospitaller Militarise Fall-back ---
historic_event ORDER_KNIGHTS_HOSPITALLER_MILITARISE
set_event_counter hospitallers_recruitment_enabled 1
end_if
end_if
log ------------------ Teutonic Order -------------------------------------------------------------------
if I_EventCounter teutonic_hospital_founded < 1
and I_TurnNumber > 80
and RandomPercent < 20
log --- Teutonic Hospital Triggers ---
if I_NumberOfSettlements jerusalem < 6 ; Kingdom of Jerusalem is in trouble
set_event_counter teutonic_hospital_founded 1
end_if
if not I_SettlementOwner Jerusalem = jerusalem
set_event_counter teutonic_hospital_founded 1
end_if
if not I_SettlementOwner Antioch = jerusalem
set_event_counter teutonic_hospital_founded 1
end_if
if I_TurnNumber > 120
set_event_counter teutonic_hospital_founded 1 ; fall-back after 60 years (year 1192)
end_if
end_if
if I_EventCounter teutonic_knights_chapter_building_enabled < 1 ; this 2-stage process was for the previous SSHIP, might be simplyfied in the future
and I_EventCounter teutonic_hospital_founded > 0
and I_SettlementOwner Acre = jerusalem
log --- Teutonic Hospital Founded ---
historic_event ORDER_TEUTONIC_HOSPITAL_FOUNDED factions { jerusalem, hre, france, england, scotland, norway, denmark, poland, hungary, pisa, venice, sicily, spain, portugal, aragon, }
set_event_counter teutonic_knights_chapter_building_enabled 1
add_events
event counter teutonic_order_founded
date 20
end_add_events
end_if
if I_EventCounter teutonic_order_founded = 1
and I_EventCounter teutonic_knights_recruitment_enabled < 1
log --- Teutonic Order Founded ---
historic_event ORDER_TEUTONIC_ORDER_FOUNDED factions { jerusalem, hre, france, england, scotland, norway, denmark, poland, hungary, pisa, venice, sicily, spain, portugal, aragon, }
set_event_counter teutonic_knights_recruitment_enabled 1
end_if
if I_TurnNumber > 200 ; fall-back (year 1232)
and I_EventCounter teutonic_knights_recruitment_enabled < 1
log --- Teutonic Knights Fall-back ---
set_event_counter teutonic_order_founded 1
set_event_counter teutonic_knights_chapter_building_enabled 1
set_event_counter teutonic_knights_recruitment_enabled 1
end_if
if I_TurnNumber > 300 ; place holder - to be replaced once Marienburg is coded (year 1282)
and I_EventCounter teutonic_marienburg_built < 1
log --- Teutonic Knights Fall-back ---
set_event_counter teutonic_marienburg_built 1
end_if
log ------------------ Order of Santiago ---------------------------------------------------------------
if I_TurnNumber > 50
and I_CrusadeInProgress ; during a crusade
and I_NumberOfSettlements moors > 7 ; if the power of the Muslims is still significant
and RandomPercent < 50
and I_EventCounter santiago_knights_recruitment_enabled < 1
log --- Order of Santiago Founded --
historic_event ORDER_SANTIAGO_KNIGHTS_FOUNDED factions { jerusalem, hre, france, england, scotland, norway, denmark, poland, hungary, pisa, venice, sicily, spain, portugal, aragon, }
set_event_counter santiago_knights_recruitment_enabled 1
end_if
if I_TurnNumber > 100 ; fall-back
and I_EventCounter santiago_knights_recruitment_enabled < 1
log --- Order of Santiago Founded Fall-back ---
historic_event ORDER_SANTIAGO_KNIGHTS_FOUNDED factions { jerusalem, hre, france, england, scotland, norway, denmark, poland, hungary, pisa, venice, sicily, spain, portugal, aragon, }
set_event_counter santiago_knights_recruitment_enabled 1
end_if
log ------------------ termination --------------------------------------------------------------------- to be removed once integrated with the main monitor_events
if I_EventCounter hospitallers_recruitment_enabled == 1
and I_EventCounter teutonic_knights_recruitment_enabled == 1
and I_EventCounter santiago_knights_recruitment_enabled == 1
and I_EventCounter teutonic_marienburg_built == 1
log --- Orders Script Termination ---
terminate_monitor
end_if
end_monitor
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@