Scripts causing CTDs when starting up your game ?
Yes...
♪ Now it's over, I'm dead and I haven't done anything that I want, or I'm still alive and there's nothing I want to do ♪
umm,It when I've put a new trigger,then when I've load up the game It crash.
Sorry if that not enough,I'm new to modding...
♪ Now it's over, I'm dead and I haven't done anything that I want, or I'm still alive and there's nothing I want to do ♪
I've edit the export_descr_advice
The text folder export_advice(for {BackgroundScriptTitle1}Background Script {BackgroundScriptText1}Script started).
descr_strat(to add the years, and the the line ;script
;campaign_script.txt at the bottom.)
made the campaign_script.txt.
And finally made a background_script.txt( which contain 4TPY from SQPR mod.).
.
♪ Now it's over, I'm dead and I haven't done anything that I want, or I'm still alive and there's nothing I want to do ♪
♪ Now it's over, I'm dead and I haven't done anything that I want, or I'm still alive and there's nothing I want to do ♪
Sorry, should have explained better. I meant like this:
etc, not the names of the files, or your text. The actual in-game code near the sections of the file that you edited.Code:; >>>> start of regions section <<<< [...] blablabla - code [...] script campaign_script.txt
Ok.
export_descr_advice
Code:;------------------------------------------ ;AdviceThread BackgroundScriptThread ; GameArea Campaign ; ; Item BackgroundScriptItem1 ; Uninhibitable ; Verbosity 0 ; Threshold 1 ; MaxRepeats 0 ; RepeatInterval 1 ; Attitude Normal ; Presentation Default ; Title BackgroundScriptTitle1 ; On_display scripts\show_me\background_script.txt ; Text BackgroundScriptText1export_adviceCode:Trigger background_script_trigger_1 WhenToTest ButtonPressed Condition ButtonPressed faction_button AdviceThread BackgroundScriptThread 1 ;------------------------------------------ Trigger background_script_trigger_2 WhenToTest ButtonPressed Condition ButtonPressed construction_button AdviceThread BackgroundScriptThread 1 ;------------------------------------------ Trigger background_script_trigger_3 WhenToTest ButtonPressed Condition ButtonPressed recruitment_button AdviceThread BackgroundScriptThread 1 ;------------------------------------------ Trigger background_script_trigger_4 WhenToTest SettlementSelected
descr_stratCode:¬*********************************************************** ¬* * ¬* CAMPAIGN ADVICE * ¬* * ¬*********************************************************** ¬------------------- {BackgroundScriptTitle1}Background Script {BackgroundScriptText1}Script started.
campaign_script.txtCode:; >>>> start of regions section <<<< ;script ;campaign_script.txt start_date -215 summer end_date 260 summer
background_script.txtCode:script wait 1 advance_advice_thread BackgroundScriptThread wait 1 select_ui_element advisor_portrait_button simulate_mouse_click lclick_up end_script
Code:script console_command date -215 console_command season summer while I_TurnNumber = 0 end_while console_command date -215 console_command season summer while I_TurnNumber = 1 end_while console_command date -215 console_command season summer while I_TurnNumber = 2 end_while console_command date -215 console_command season winter while I_TurnNumber = 3 end_while console_command date -214 console_command season summer while I_TurnNumber = 4 end_while console_command date -214 console_command season summer while I_TurnNumber = 5 end_while console_command date -214 console_command season summer while I_TurnNumber = 6 end_while console_command date -214 console_command season winter while I_TurnNumber = 7 end_while console_command date -213 console_command season summer while I_TurnNumber = 8 end_while etc etc etc.It go on for long time At the end: console_command date 260 console_command season summer while I_TurnNumber = 1900 end_while end_script
♪ Now it's over, I'm dead and I haven't done anything that I want, or I'm still alive and there's nothing I want to do ♪
Need help trying to work a script that will deleat 1 unit and then create a new 1
This will hopefully work for upgrading units with better weapons acuracy anything ie RTW once hastati get 3 ceverons they could be replaced by princieps or ETW once a unit reaches a certain level it could be replaced with a simular unit with longer range and better acuracy.
i thought something like this may work
script
declare_counter loop
set_counter loop 0
monitor_event FactionTurnStart FactionIsLocal
and Rome "roman hastati" 1 exp3
console_command strat_disband_unit Rome "roman hastati" 1 exp 3
console_command create_unit Rome "roman princeps" 1
end_monitor
while I_CompareCounter loop = 0
end_while
the unit to be deleated would probably have to be in a city or outside on its own to get the named charactor for the captain and then Kill_charactor could be used?
Mayby disband_unit_button could work.
the recruting seems straight forward but deleation is hard.
Any sugestions/help welcome thx
Last edited by FB_Bob; March 22, 2010 at 01:15 PM.
There is no way to disband a unit in RTW/BI, short of killing it off during battle.
@EvilNelson666:
The 2 lines that are supposed to fire up the campaign script are commented out in descr_strat.txt. Uncomment them by removing the semicolons at the beginning of the lines, and move them to the very end of the file.
Last edited by HouseOfHam; March 22, 2010 at 04:01 PM.
RTR website/SVN admin
- Settlement coordinate locator -for RTW/M2TW
- EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
- RTW scripting tutorials
- n-turns per year script generator
i was thinking that if a unit was in a city it could be scripted someway to check the city for units via army selection or similar, then maybe set_cards_selectable true/false to find the unit your after and disband_unit_button, may need simulate_mouse_click, this mite work.
What do you think?
thx for replie
I've tried it before, but could never get it to work. Maybe you'll have better luck (but I wouldn't bet on it). Also, AI factions don't use the UI.
RTR website/SVN admin
- Settlement coordinate locator -for RTW/M2TW
- EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
- RTW scripting tutorials
- n-turns per year script generator
what about sometyhing like
script
declare_counter loop
set_counter loop 0
monitor_event FactionTurnStart FactionIsLocal
console_command select_settlement Rome
console_command set_cards_selectable
console_command call_object_shortcut army_overview_button
console_command simulate_mouse_click
console_command UnitType "roman hastati" 1 exp 3
console_command simulate_mouse_click
console_command disband_unit_button
console_command simulate_mouse_click
console_command create_unit Rome "roman princeps" 1
end_monitor
while I_CompareCounter loop = 0
end_while
what do you think? any sugestions that could help thx in advance
- Only commands listed in console_command.txt need to be prefixed with console_command
- I would suggest narrowing down the monitor to Rome and checking the owner before you try to do anything there
- For the call_object_shortcut command, you may need to add strat_ui before the button name
- Not sure if you need the mouse click commands if you use call_object_shortcut. In any case, the proper syntax is simulate_mouse_click lclick_down|lclick_up
- Not sure how to select a specific unit (not the way you tried)
Code:script declare_counter loop set_counter loop 0 monitor_event SettlementTurnStart SettlementName Rome and SettlementIsLocal e_select_settlement set_cards_selectable true call_object_shortcut army_overview_button ; select unit to disband call_object_shortcut disband_unit_button console_command create_unit Rome "roman princeps" 1 end_monitor while I_CompareCounter loop = 0 end_while end_script
Last edited by HouseOfHam; March 23, 2010 at 10:58 AM.
RTR website/SVN admin
- Settlement coordinate locator -for RTW/M2TW
- EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
- RTW scripting tutorials
- n-turns per year script generator
Theres Unit_info_scroll or hud_show_units_tab
or maybe if the unit was at a pos on map it could be pointed at with cursor and then clicked on
or maybe it could be done via a keyboard macro
For disbanding ui_flash_start disband_unit_button could help
thx for taking a look HoH
Last edited by FB_Bob; April 10, 2010 at 02:50 AM.
Hello Can someone help me, because my script does not seem to work
if everything is okay?
Spoiler Alert, click show to read:
Creator of modification The Great Ancient World IV
Team-leader of Polish Project translation modifications:
Kingdoms Grand Campaign Mod 4.2 (v1.0)
Third Age: Total War 2.0/2.1 (v1.01)
Third Age: Total War 1.4/1.4.1 (v1.0)
Broken Crescent 2.02 (v0.95)
Stainless Steel 6.2 RC4 (v0.60)
INVASIO BARBARORVM 2:AFRICA VANDALORVM v1.2 (v0.7)
Last edited by Tiberius Caesar Augustus; March 28, 2010 at 07:00 AM.
Creator of modification The Great Ancient World IV
Team-leader of Polish Project translation modifications:
Kingdoms Grand Campaign Mod 4.2 (v1.0)
Third Age: Total War 2.0/2.1 (v1.01)
Third Age: Total War 1.4/1.4.1 (v1.0)
Broken Crescent 2.02 (v0.95)
Stainless Steel 6.2 RC4 (v0.60)
INVASIO BARBARORVM 2:AFRICA VANDALORVM v1.2 (v0.7)