I have a question regarding scripts.
I'm trying to get a show_me script to run from a background script, but it doesn't seem to be working. This is similar to the Client Kingdoms mod implemented into the TFT mod. The background script works fine and all other functions within it work as intended. Here is the background script section that is supposed to start the show_me script:
Code:
monitor_event SettlementTurnStart SettlementName Rome
and SettlementIsLocal
and Treasury > 5000
advance_advice_thread Recruit_Legion_Thread
end_monitor
This is just temporary until I can get it working - then I'll tweak the costs and add a RandomPercent. Here is the advice thread it refers to:
Code:
AdviceThread Recruit_Legion_Thread
GameArea Campaign
Item Recruit_Legion
Uninhibitable
Verbosity 0
Threshold 1
Attitude Normal
Presentation Default
Title Recruit_Legion_Title
Script scripts\show_me\recruit_roman_legion.txt
Text Recruit_Legion_Text1
And yes, I have set up the text. Finally, here is the whole show_me script:
Code:
script
console_command create_unit Rome "roman hastati" 2
console_command create_unit Rome "roman princeps" 2
console_command create_unit Rome "roman velite" 2
console_command create_unit Rome "roman Triarii" 1
console_command create_unit Rome "roman light cavalry" 1
console_command add_money -5000
console_command add_population Rome -1210
select_ui_element advisor_dismiss_button
simulate_mouse_click lclick_down
simulate_mouse_click lclick_up
terminate_script
end_script
Can anyone see what I'm doing wrong here? I've tried changing it so that the script runs when Rome is selected using I_SettlementSelected SettlementName Rome but no dice...
Bookmarks