Results 1 to 6 of 6

Thread: RTW scripting: the "end turn button" trigger

  1. #1

    Default RTW scripting: the "end turn button" trigger

    I want to try to make my 4 turns per year script trigger when you click on a settlement, character or the end turn button.

    I have a couple questions: is there any long term negative effect of having the trigger in there? It will check every time you click that button to see if the script is running, right? Are there any known bad effects of that?

    Second, I can't find the darned thing! I've found triggers for clicking on characters and settlements, but not the end turn or next turn or whatever you call it button. Anyone know where that sucker is?

    Thanks!

  2. #2
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: RTW scripting: the "end turn button" trigger

    You can trigger the advisor to pop up when you do any of those things, but remember that the script wont run unless you click show me how. You might want to disable unscripted advice in the script so it stops bugging you once it's running.

  3. #3

    Default Re: RTW scripting: the "end turn button" trigger

    Quote Originally Posted by Myrddraal
    You can trigger the advisor to pop up when you do any of those things, but remember that the script wont run unless you click show me how. You might want to disable unscripted advice in the script so it stops bugging you once it's running.
    Isn't that what the MaxRepeats line is for in the thread declaration? Once it has been started, it shouldn't pop up again unless you load a saved game or start a new campaign.

    Try this:
    Code:
    ;------------------------------------------
    Trigger my4tpyEndTurnTrigger
        WhenToTest ButtonPressed
    
        Condition ButtonPressed end_turn
    
        AdviceThread my4tpyThread  1
    available_ui_elements_strat.txt (for future reference):
    Code:
    strat_ui
    campaign_hud
    radar
    radar_zoom_in_button
    radar_zoom_out_button
    hud_show_units_tab
    hud_show_buildings_tab
    hud_show_agents_tab
    hud_show_passengers_tab
    recruitment_button
    construction_button
    hud_select_prev_item_cycle
    strat_prev_card
    hud_select_next_item_cycle
    strat_next_card
    character_ap_bar
    faction_button
    faction_turn_display
    hud_money_string
    hud_date_string
    season_icon
    end_turn
    end_game_scroll
    file_requester_scroll
    file_io_result_scroll
    audio_options_scroll
    accept_audio_changes_button
    gfx_options_scroll
    accept_visual_changes_button
    overwrite_confirmation_scroll
    campaign_options_scroll
    accept_campaign_options_button
    null
    null
    file_delete_confirmation_scroll
    confirm_quit_scroll
    diplomacy_scroll
    diplomacy_ok_button
    diplomacy_cancel_offer_button
    diplomacy_accept_offer_button
    diplomacy_decline_offer_button
    diplomacy_counter_offer_button
    diplomacy_offer_button
    diplomacy_gift_button
    diplomacy_inform_button
    post_battle_stats_scroll
    post_battle_stats_show_results_button
    ally_attack_warning_scroll
    field_construction_scroll
    help_scroll
    post_battle_scroll
    post_battle_show_stats_button
    exchange_scroll
    null
    null
    merge_selected_button
    prebattle_scroll
    prebattle_fight_button
    prebattle_auto_resolve_button
    prebattle_withdraw_button
    settlement_listview
    settlement_listview
    enemy_settlement_info_scroll
    garrison_info_zoom_to_button
    enemy_garrison_display
    enemy_agents_display
    settlement_status_icons_group
    settlement_state_icon_revolting
    settlement_state_icon_under_siege
    settlement_state_icon_plague
    enemy_buildings_display
    own_settlement_info_scroll
    null
    own_settlement_governor_info_panel
    decrease_taxation_gadget
    increase_taxation_gadget
    governor_policy_inc_gadget
    governor_policy_dec_gadget
    games_policy_dec_gadget
    games_policy_inc_gadget
    show_construction_advice_button
    settlement_stats_button
    building_browser_button
    garrison_info_zoom_to_button
    settlement_info_prev_item_cycle
    strat_prev_card
    settlement_info_next_item_cycle
    strat_next_card
    settlement_status_icons_group
    settlement_state_icon_revolting
    settlement_state_icon_under_siege
    settlement_state_icon_plague
    available_construction_options
    null
    construction_queue
    available_training_options
    null
    recruitment_queue
    settlement_info_construction_tab
    settlement_info_construction_tab
    settlement_info_construction_tab
    settlement_info_construction_tab
    null
    character_listview
    character_listview
    enemy_character_info_scroll
    null
    character_info_scroll_character_panel
    null
    enemy_character_siege_equipment_display
    character_info_zoom_to_button
    show_bodygaurd_unit_button
    enemy_army_unit_display_1
    enemy_army_unit_display_2
    enemy_army_unit_display_3
    null
    null
    own_character_scroll_character_panel
    available_training_options
    null
    recruitment_queue
    character_info_prev_item_cycle
    strat_prev_card
    character_info_next_item_cycle
    strat_next_card
    set_rally_point_button
    remove_rally_point_button
    toggle_unit_recruit_button
    hire_mercenaries_button
    show_recruitment_advice_button
    garrison_info_zoom_to_button
    show_bodygaurd_unit_button
    garrison_buildings_button
    garrison_stats_button
    army_listview
    army_listview
    fort_info_scroll
    garrison_info_zoom_to_button
    enemy_garrison_display
    enemy_agents_display
    building_info_scroll
    destroy_building_button
    garrison_info_zoom_to_button
    seige_scroll
    available_siege_equipment_options
    null
    siege_equipment_queue
    siege_end_button
    siege_assault_button
    siege_maintain_button
    unit_info_scroll
    unit_info_zoom_to_button
    disband_unit_button
    faction_events_scroll
    events_listview
    trade_summary_scroll
    trade_summary_scroll
    senate_office_listview
    senate_office_listview
    family_tree_scroll
    family_tree_zoom_to_button
    set_heir_button
    agent_info_scroll
    mission_target_listview
    mission_target_listview
    perform_assassination_button
    perform_sabotage_button
    mission_scroll_assassinate_tab
    mission_scroll_sabotage_tab
    request_assistance_scroll
    faction_ranking_scroll
    null
    null
    null
    end_campaign_scroll
    null
    loot_settlement_scroll
    loot_settlement_occupy_button
    loot_settlement_enslave_button
    loot_settlement_extermintate_button
    advanced_settlement_info_scroll
    advanced_stats_show_trade_button
    advanced_stats_set_as_capital_button
    zoom_to_settlement_button
    null
    settlement_details_population_stats
    null
    settlement_details_puplic_order_stats
    null
    settlement_details_income_stats
    building_browser_scroll
    building_browser_scroll
    building_browser_select_prev_city_cycle
    strat_prev_card
    building_browser_select_next_city_cycle
    strat_next_card
    landmark_info_scroll
    break_siege_confirmation_scroll
    combined_overview_scroll
    family_tree_button
    faction_ranking_button
    show_senate_offices_button
    combined_scroll_senate_tab
    combined_scroll_diplomacy_tab
    combined_scroll_finances_tab
    combined_scroll_faction_tab
    advisor_speech_bubble
    advisor_hide_bubble_button
    advisor_show_me_button
    advisor_dismiss_button
    advisor_zoom_to_button
    message_show_me_more_button
    message_zoom_to_button
    RTR VII Developer

  4. #4
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: RTW scripting: the "end turn button" trigger

    Isn't that what the MaxRepeats line is for in the thread declaration?
    I thought the maxrepeats was an overall maximum, and wasn't reset unless you reset the advisor. I'm probably wrong though, I'm working from memory and I haven't modded for a while.
    Last edited by Myrddraal; 05-23-2008 at 13:56.

  5. #5

    Default Re: RTW scripting: the "end turn button" trigger

    One more question: What is the "1" for at the end of

    "AdviceThread my4tpyThread 1"

    ??

  6. #6

    Default Re: RTW scripting: the "end turn button" trigger

    Points towards activating the advice thread. Each thread has a threshold, a number of points it needs before it is activated.

    Norman Invasion - The fate of England lies in your hands...

    Viking Invasion II - Unite Britain in the best TW campaign ever!

    Gods and Fighting Men: Total War - Enter the Mists of Myth in Ancient Ireland

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO