Page 1 of 2 12 LastLast
Results 1 to 30 of 51

Thread: Research: Parameters for commands & console commands

  1. #1

    Default Research: Parameters for commands & console commands

    This thread is intended to try and collate all available information as to scripting commands and console commands.

    The next two posts will be an maintained index of commands and console commands respectively, each will be divided into three sections
    1) Commands we know are working
    2) Commands that have been tested and we believe are not working as documented
    3) Commands that have not been tested yet

    If there are any commands either in 2) or in 3) that you know are working please post and say so, giving the parameters to use or a sample.

    For console commands can you also say if they can be used on the battle map, the strategic map or both.

    Many thanks.
    Last edited by Epistolary Richard; 04-27-2005 at 18:45.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  2. #2

    Default Research: Parameters for script commands

    Script commands
    All taken from docudemon_commands.txt - see link for description of effects

    1) Commands we know are working
    Reason - Included in the vanilla game
    Code:
    declare_prologue	Sample use: declare_prologue
    terminate_prologue	Sample use: terminate_prologue
    move			Sample use: move Gaius Julius, 20, 44
    replenish_action_points	Sample use: replenish_action_points Gaius Julius
    replenish_units		Sample use: replenish_units Gaius Julius
    script			Sample use: script
    terminate_script	Sample use: terminate_script
    spawn_battle		Sample use: spawn_battle custom/punic_1
    if			Sample use: if TimerElapsed < 1000
    while			Sample use: while TimerElapsed < 1000
    monitor_conditions	Sample use: monitor_conditions not I_CharacterIsSelected Gaius Julius
    monitor_event		Sample use: monitor_event IncomingMessage IncomingMessageType wonder_captured
    terminate_monitor	Sample use: terminate_monitor
    console_command		Sample use: console_command kill_character "Gaius Julius"
    declare_counter		Sample use: declare_counter blib
    inc_counter		Sample use: inc_counter blib -137
    set_counter		Sample use: set_counter blib -137
    prepare_for_battle	Sample use: prepare_for_battle
    declare_show_me		Sample use: declare_show_me
    campaign_wait		Sample use: campaign_wait 1.3
    suspend_during_battle	Sample use: suspend_during_battle on
    set_music_state		Sample use: set_music_state mobilize
    point_at_character	Sample use: point_at_character Gaius Julius
    point_at_settlement	Sample use: point_at_settlement Roma
    point_at_strat_position	Sample use: point_at_strat_position 44, 55
    point_at_message	Sample use: point_at_message 0
    ui_flash_start		Sample use: ui_flash_start finances_button
    ui_flash_stop		Sample use: ui_flash_stop
    character_flash_start	Sample use: character_flash_start Gaius Julius
    character_flash_stop	Sample use: character_flash_stop Gaius Julius
    point_at_location	Sample use: point_at_location pos1
    point_at_unit_pos	Sample use: point_at_unit_pos generals_unit
    remove_battle_map_arrow	Sample use: remove_battle_map_arrow
    point_at_unit_card	Sample use: point_at_card roman_archers
    hide_ui			Sample use: hide_ui
    show_ui			Sample use: show_ui
    disable_ui		Sample use: disable_ui finances_button
    enable_ui		Sample use: enable_ui finances_button
    disable_entire_ui	Sample use: disable_entire_ui
    enable_entire_ui	Sample use: enable_entire_ui
    set_cards_selectable	Sample use: set_cards_selectable false
    disable_cursor		Sample use: disable_cursor
    enable_cursor		Sample use: enable_cursor
    reveal_tile		Sample use: reveal_tile 25, 43
    advance_advice_thread	Sample use: advance_advice_thread 0098_prologue_selection no_dismiss
    dismiss_advice		Sample use: dismiss_advice
    suspend_unscripted_advice	Sample use: suspend_unscripted_advice true
    disable_shortcuts	Sample use: disable_shortcuts true - to disable, disable_shortcuts false - to enable them again
    filter_unit_commands	Sample use: filter_unit_commands on velites_alpha change_formation
    filter_unit_group_commands	Sample use: filter_unit_group_commands on storm_troopers change_formation
    filter_unit_selection_commands	Sample use: filter_unit_selection_commands on change_formation
    filter_all_ui_commands	Sample use: filter_all_ui_commands on
    steal_esc_key		Sample use: 
    ai_active_set		Sample use: ai_active_set off
    release_unit		Sample use: release_unit
    hiding_enabled_set	Sample use: hiding_enabled_set false
    pause_battle		Sample use: pause_battle
    unit_immediate_place	Sample use: unit_immediate_place archers1 big_hill 0
    unit_order_move		Sample use: unit_order_move cohort1 100 60 run
    unit_order_attack_unit	Sample use: unit_order_attack_unit cavalry1 enemy4 run
    unit_order_attack_closest_unit	Sample use: unit_order_attack_closest_unit 15 run
    unit_order_move_to_missile_range	Sample use: unit_order_move_to_missile_range roman_archers barb_swordsmen run
    unit_set_morale		Sample use: unit_set_morale carthaginian_peasants wavering
    unit_set_skirmish_mode	Sample use: unit_set_skirmish_mode velites1 off
    unit_group_unset_morale	Sample use: unit_group_unset_morale infantry_group
    move_strat_camera	Sample use: move_camera 20,35
    snap_strat_camera	Sample use: snap_strat_camera 20,35
    zoom_strat_camera	Sample use: zoom_camera 0.4
    camera_restrictions_set	Sample use: camera_restrictions_set on
    camera_default_mode_set	Sample use: camera_default_mode_set tw
    battle_default_camera	Sample use: battle_default_camera
    set_camera_bookmark	Sample use: set_camera_bookmark 1, 100, 0, 100, 100, 0, 0 - Will set the camera bookmark to position (100,0,100), looking straight back along the z axis
    camera_position_at_bookmark	Sample use: camera_position_at_bookmark 0
    camera_zoom_to_bookmark	Sample use: camera_zoom_to_bookmark 0 50
    camera_position		Sample use: camera_position 0 0 0 0 0 -1
    camera_zoom_to		Sample use: camera_zoom_to 0 0 0 0 0 -1 50
    camera_look_at_unit	Sample use: camera_look_at_unit spearmen7
    camera_track_unit	Sample use: camera_track_unit roman_cavalry1 left 20 10 -15
    camera_zoom_to_unit	Sample use: camera_zoom_to_unit spearmen7
    label_unit		Sample use: label_unit 0 2 4 julii_hastati_2
    label_location		Sample use: label_location 35 58 the_big_hill
    define_unit_group	Sample use: define_unit_group group1 archers1 archers2 archers3 spearmen1
    declare_timer		Sample use: declare_timer rout_timer
    restart_timer		Sample use: restart_timer
    battle_wait		Sample use: battle_wait 1.3
    play_sound_event	Sample use: play_sound_event PREBATTLE_TEST
    stop_sound_event	Sample use: stop_sound_event PREBATTLE_TEST
    unit_order_change_formation	Sample use: unit_order_change_formation legionary_cohort testudo
    unit_group_order_relative_move_formed	Sample use: unit_group_order_relative_move_formed group6 100 -60 run
    inhibit_camera_input	Sample use: inhibit_camera_input true
    undefine_unit_group	Sample use: undefine_unit_group archer_group5
    Reason - Tested
    Code:
    settlement_flash_start	Sample use: settlement_flash_start Tarquinii
    settlement_flash_stop	Sample use: settlement_flash_stop Tarquinii
    simulate_mouse_click	Sample use: simulate_mouse_click lclick_down
    select_ui_element	Sample use: select_ui_element faction_button
    wait			Sample use: wait 1.3
    spawn_character		Sample use: spawn_character julii Gaius Antio, diplomat, command 0, influence 0, management 0, subterfuge 0, age 29, , x 94, y 77

    2) Commands that have been tested and we believe are not working as documented
    Code:
    play_video		Sample use: play_video fmv/rome_intro.mpg
    provoke_rebellion	Sample use: provoke_rebellion Segesta
    call_object_shortcut	Sample use: call_object_shortcut strat_ui speedup_ai - will toggle the fast ai mode
    
    spawn_army ... end
    Sample use: spawn_army 
    faction romans_julii
    character Foedus Chaerea, general, command 0, influence 0, management 0, subterfuge 0, age 20, , x 54, y 124
    unit roman generals guard cavalry soldiers 20 exp 9 armour 1 weapon_lvl 0
    unit roman legionary first cohort ii soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman legionary cohort ii soldiers 60 exp 0 armour 0 weapon_lvl 0
    unit roman praetorian cohort i soldiers 60 exp 0 armour 0 weapon_lvl 0
    end	
    3) Commands that have not been tested yet
    Code:
    reposition_character	Sample use: reposition_character Gaius Maximus, 14, 53
    engage_armies		Sample use: engage_armies Gaius Julius, Epiroderix
    senate_mission_help_player	Sample use: senate_mission_help_player one_best_buildable_unit
    senate_mission_assassination	Sample use: senate_mission_assassination minor_reward Gaius Julius
    senate_mission_cease_hostilities	Sample use: senate_mission_cease_hostilities two_minor_exotic_units Gauls
    senate_mission_declare_war	Sample use: senate_mission_declare_war major_reward Gauls
    senate_mission_broker_peace	Sample use: senate_mission_broker_peace major_reward Gauls
    senate_mission_take_city	Sample use: senate_mission_assassination moderate_reward Tarquini
    e_point_at_settlement	Sample use: 
    point_at_unit_group_pos	Sample use: point_at_unit_group_pos infantry_group1
    point_at_card		Sample use: point_at_card unit hastati 2 - to point at the second hastati card the game can find
    e_point_at_unit_card	Sample use: e_point_at_unit_card
    show_mouse_button_animation	Sample use: show_mouse_button_animation left true - start the animation showing the left mouse button being pressed. show_mouse_button_animation left false - stop the left mouse button animation. NOTE: Only 1 animation can be shown at a time
    select_character	Sample use: select_character Gaius Julius
    e_select_character	Sample use: e_select_character
    select_settlement	Sample use: select_settlement Roma
    e_select_settlement	Sample use: e_select_settlement
    filter_settlement_commands	Sample use: filter_settlement_commands on Arretium change_formation
    filter_character_commands	Sample use: filter_character_commands on Gaius Julius, change_formation (note comma)
    ui_indicator		Sample use: ui_indicator 0 circle 500 500 colour 255 255 0 scale 2.0 period 2.0 loop
    ui_indicator_remove	Sample use: ui_indicator_remove 0
    unit_order_halt		Sample use: unit_order_halt cohort1
    unit_order_move_relative	Sample use: unit_order_move_relative cohort1 0 60 run
    unit_order_turn		Sample use: unit_order_turn roman_archers -20 relative (turns left 20 degrees)
    unit_unset_morale	Sample use: unit_unset_morale peasants4
    unit_set_weapon_upgrade	Sample use: unit_set_weapon_upgrade spearmen1 3
    unit_set_armour_upgrade	Sample use: unit_set_armour_upgrade spearmen1 3
    unit_set_experience	Sample use: unit_set_experience roman_general 7
    kill_unit		Sample use: kill_unit carthaginians2
    reduce_unit_strength	Sample use: reduce_unit_strength carthaginians2 50
    unit_set_guard_mode	Sample use: unit_set_guard_mode roman_spearmen on
    unit_set_fire_at_will_mode	Sample use: unit_set_fire_at_will_mode roman_archers on
    unit_set_formation_spacing	Sample use: unit_set_formation_spacing roman_archers loose
    unit_taunt		Sample use: unit_taunt barb_archers
    unit_use_special_ability	Sample use: unit_use_special_ability barb_archers
    unit_group_enable_automation	Sample use: unit_group_enable_automation
    unit_group_immediate_place	Sample use: unit_group_immediate_place group6 100 -60 -20
    unit_group_order_halt	Sample use: unit_group_order_halt group6
    unit_group_order_move_formed	Sample use: unit_group_order_move_formed group6 100 -60 run
    unit_group_order_move_unformed	Sample use: unit_group_order_move_unformed group6 100 -60 run
    unit_group_order_relative_move_unformed	Sample use: unit_group_order_relative_move_unformed group6 100 -60 run
    unit_group_move_to_missile_range_of_unit	Sample use: unit_group_move_to_missile_range_of_unit archer_group enemy_spearmen3
    unit_group_move_to_missile_range_of_group	Sample use: unit_group_move_to_missile_range_of_group archer_group enemy_group
    unit_group_order_attack_unit	Sample use: unit_group_order_attack_unit group1 enemy_unit4
    unit_group_order_attack_group	Sample use: unit_group_order_attack_group cavalry_group1 enemy_archer_group
    unit_group_order_change_group_formation	Sample use: unit_group_order_change_group_formation group2 ordered_triple_line_1
    unit_group_order_turn	Sample use: unit_group_order_turn group2 90 (turns the group to 90 degrees)
    unit_group_set_morale	Sample use: unit_set_morale infantry_group routing
    unit_group_change_unit_formation	Sample use: unit_group_change_unit_formation hoplite_group phalanx
    unit_group_set_guard_mode	Sample use: unit_group_set_guard_mode group2 off
    unit_group_set_skirmish_mode	Sample use: unit_group_set_skirmish_mode archer_group on
    unit_group_set_fire_at_will_mode	Sample use: unit_group_set_fire_at_will_mode group2 off
    unit_group_set_formation_spacing	Sample use: unit_group_set_formation_spacing group1 loose
    camera_event_cuts_active_set	Sample use: camera_event_cuts_active_set off
    battle_general_camera	Sample use: battle_general_camera
    camera_look_at_position	Sample use: camera_look_at_position 123.4 56.7
    e_camera_zoom_to_unit	Sample use: e_camera_zoom_to_unit
    remove_unit_from_group	Sample use: remove_unit_from_group group1 archers1
    heed_pause		Sample use: heed_pause on
    Last edited by Epistolary Richard; 05-23-2005 at 11:25.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  3. #3

    Default Re: Research: Parameters for commands & console commands

    Console commands
    All taken from Console commands & command line options for modders?

    1) Commands we know are working
    Note, not all of these can be activated through the RomeShell console
    Code:
    toggle_fow
    toggle_perfect_spy
    show_cursorstat
    bestbuy
    oliphaunt
    add_money {opt:faction} {amount}
    create_unit {settlement/character_name} {unit_id} {opt: how many}{opt: exp/armour/weapon}
    add_population {settlement_name}{amount}
    move_character {name}{x},{y}
    auto_win {attacker/defender}
    give_ancillary {charactername}{ancillary name}
    give_trait {charactername}{trait name}{opt:level}
    puppify_my_love
    capture_settlement {settlementname} 
    invulnerable_general {charactername}
    date {year}
    season {summer/winter}
    create_building {settlement_name} {building_name}
    kill_faction {faction}
    kill_character {charactername}
    halt_ai
    control {faction}
    test_victory_scroll {faction}
    diplomatic_stance {faction1} {faction2} {stance}
    clear_messages
    test_message {messagename} ;(as per descr_event_enums)
    set_building_health [settlement] [building line] [health]
    2) Commands that have been tested and we believe are not working


    3) Commands that have not been tested yet
    Code:
    oliphants.jericho
    toggle_tow
    auto_win
    toggle_restrictcam
    give_ancillary
    give_trait
    process_cq
    character_reset
    toggle_terrain
    write_ui_cache
    give_trait_points
    list_traits
    list_ancillaries
    mp
    list_characters
    show_landings
    filter_coastlines
    toggle_coastlines
    ai_turn_speed
    amdb_min
    amdb_max
    amdb_offset
    zoom
    set_ranking_interval
    regenerate_radar
    adjust_sea_bed
    reload_shaders
    reload_textures
    fire (mt | toggle | reload | int)
    toggle_game_update
    building_debug
    reset_display
    toggle_underlay
    toggle_overlay
    process_rq
    force_diplomacy
    shadow
    ie
    test_ancillary_localisation
    perf_times
    burn_piggies_burn
    show_terrain_lines
    message_collation_set
    show_all_messages
    reapply_rigid_model_influence
    toggle_flowing_water
    nw_stats
    toggle_pr
    list_units
    trigger_advice
    damage_wall
    upgrade_effect
    force_battle_victory
    force_battle_defeat
    output_unit_positions
    show_battle_paths
    show_battle_paths_for_unit
    show_battle_street_plan
    show_battle_marker
    show_battle_circle
    diplomacy_mission
    event
    disable_ai
    run_ai
    Last edited by Epistolary Richard; 07-29-2005 at 17:53.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  4. #4
    Simulation Monkey Member The_Mark's Avatar
    Join Date
    Dec 2004
    Location
    Helsinki, Finland
    Posts
    2,613

    Default Re: Research: Parameters for commands & console commands

    You should add placeholders for events and conditions also.

  5. #5
    Spends his time on TWC Member Simetrical's Avatar
    Join Date
    Dec 2004
    Location
    New York City
    Posts
    1,358

    Default Re: Research: Parameters for commands & console commands

    The kill_faction and kill_character commands work through scripts. I use them for debugging purposes. kill_unit, unit_group_order_relative_move_formed, play_sound_event, stop_sound_event, unit_order_change_formation, unit_order_attack_unit, unit_order_move, unit_order_move_relative, unit_set_morale, unit_set_skirmish_mode, inhibit_camera_input, and undefine_unit_group are used in the Carrhae script, and probably others are used in other battle scripts.

    -Simetrical
    TWC Administrator

    MediaWiki Developer

  6. #6

    Default Re: Research: Parameters for commands & console commands

    Updated, thanks Simetrical.

    Are these the correct parameters?
    kill_faction {faction}
    kill_character {charactername}
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  7. #7
    Spends his time on TWC Member Simetrical's Avatar
    Join Date
    Dec 2004
    Location
    New York City
    Posts
    1,358

    Default Re: Research: Parameters for commands & console commands

    I used quotes for the character name. Not sure if it'll work without. I know you have to include titles for captains and admirals, like "Captain Bob" rather than just "Bob". Also, the faction names are case-sensitive (they have to be all lowercase).

    -Simetrical
    TWC Administrator

    MediaWiki Developer

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

    Default Re: Research: Parameters for commands & console commands

    I tested the spawn_character, and it half works.

    I used the code to spawn a captain (not a family member) for the scipii called Asinius Aelius. The man appears, (right model for scipii etc) but he didn't have a banner. I tried adding units to his army by using console_command add_unit, but this seemed to have no effect. I could script the army to move by using move captain asinius, x, y. But the AI seemed to ignore this new character completely. So, it didn't work.

    As for spawn_army, I tried editing the syntax so that it was the same as used in descr_battle.txt for historical battles (as this is what it said it should be in the CA txt files) but again, the script did not run at all (no commands were executed, before or after the spawn_army command)

    Here is something weird, for some reason the line:
    console_command run_ai
    won't work for me. I halt the AI, but it won't start again, no commands after that line are executed. This is very very wierd as CA use this exact line in the prologue script.... WTF?

  9. #9

    Default Re: Research: Parameters for commands & console commands

    Did you try spawn_character for diplomats, spies and assassins as well?

    Quote Originally Posted by Myrddraal
    Here is something weird, for some reason the line:
    console_command run_ai
    won't work for me. I halt the AI, but it won't start again, no commands after that line are executed. This is very very wierd as CA use this exact line in the prologue script.... WTF?
    Were you using halt_ai or disable_ai? The Prologue script initially uses disable_ai before the run_ai, don't know if that would make a difference...
    Last edited by Epistolary Richard; 04-29-2005 at 22:11.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  10. #10

    Default Re: Research: Parameters for commands & console commands

    As I'm not able to unpack the demo pak files I've not been able to tell if there any additional files in there that might be of use, such as the posited available_ui_elements file.

    However, I have tried to compile my own list of ui_element names from those listed in vanilla:

    Code:
    settlement_stats_button
    advanced_stats_show_trade_button
    settlement_info_construction_tab
    settlement_info_repair_tab
    settlement_info_recruitment_tab
    settlement_info_retrain_tab
    selected_item_button
    faction_button
    combined_scroll_senate_tab
    senate_scroll_missions_tab
    show_hide_group_formations
    ?hud_show_buildings_tab ; *only mentioned in documentation*
    advisor_dismiss_button
    toggle_run
    order_halt
    play_button
    radar
    hud_select_prev_item_cycle		;doesn't work??? *that's a CA comment*
    season_icon
    end_turn
    faction_turn_display
    construction_button
    recruitment_button
    own_settlement_governor_info_panel
    settlement_status_icons_group							;Highlight the settlement status icons
    settlement_state_icon_revolting
    settlement_state_icon_under_siege
    settlement_state_icon_plague
    governor_policy_inc_gadget							;Highlight the arrow button for increasing taxation level
    governor_policy_dec_gadget							;Jump to highlighting the arrow button for decreasing taxation level
    available_construction_options
    settlement_info_repair_tab
    building_browser_button							;Highlight the building browser button
    show_construction_advice_button						;Highlight the request advice button
    available_training_options							;Highlight the recruitment list
    garrison_info_zoom_to_button							;Highlight the centre map button
    siege_maintain_button
    siege_assault_button
    available_siege_equipment_options
    siege_end_button
    toggle_special_ability
    decrease_taxation_gadget						; Flash the decrease taxation gadget
    increase_taxation_gadget	; Flash the increase taxation gadget
    character_info_command_points							;Highlight the governor's panel stats
    character_info_management_points
    character_info_influence_points
    egg_timer
    ffwd_button
    ultra_ffwd_button
    play_button
    formation_1
    formation_2
    formation_3
    formation_4
    formation_5
    formation_6
    formation_7
    formation_8
    toggle_defend
    radar
    radar_zoom_in_button
    radar_zoom_out_button
    toggle_skirmish
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  11. #11
    Simulation Monkey Member The_Mark's Avatar
    Join Date
    Dec 2004
    Location
    Helsinki, Finland
    Posts
    2,613

    Default Re: Research: Parameters for commands & console commands

    Here's a useful console command:

    diplomatic_stance {faction1} {faction2} {stance}
    diplomatic_stance gauls germans allied

    Stances are (at least): allied, war, neutral. The command also spawns a diplomatic message.
    Last edited by The_Mark; 05-08-2005 at 13:19.

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

    Default Re: Research: Parameters for commands & console commands

    Does anyone know how to unpak the demo paks? It must have been done.

  13. #13
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: Research: Parameters for commands & console commands

    I must acknowledge you, ER, your efforts in putting scripting as a tool in our hands.
    In fact I am trying to understand the "language" to implement some scripting in my own mod. I am not an expert, so some of the questions may seem stupid, but... Anyway, here are my doubts (from your clientkingdoms mod):

    - I don't understand the use of SettlementIsLocal. What does it mean? I wonder if the script only works when the settlement is owned by the human player and if this is the way to say it. In my case this can be a problem, as I would like to include "general historic events", but that only happens if the "historical conditions" are fulfiled.

    - In the scripts, must "console_command" be used before any of the commands listed in post three?
    Ex: console_command capture_settlement ....

    For the moment I have a trigger and an advice thread that work, but now I must do a script.
    I will report any success in this task, and probably more doubts.
    Cheers.

  14. #14

    Default Re: Research: Parameters for commands & console commands

    Thanks, Monkwarrior, but really I would have remained completely ignorant of scripting if others had not shown the way.

    SettlementIsLocal condition
    The player's faction is the local faction. This condition means that the trigger will only activate if the city being tested belongs to the player's faction and means that it's only the player that will benefit from the client's troops. If you removed the settlement is local condition then the advisor would appear during an AI turn (and subsequently disappear without you being able to run it). One of the big limitations of the event script method used in Client Kingdoms (as opposed to the background script used in Myrddraal's Multiple Turns) is that it can't be triggered easily by an event that occurs in the AI's turn.

    - In the scripts, must "console_command" be used before any of the commands listed in post three?
    Ex: console_command capture_settlement ....
    That's right. This thread isn't very big on details, but then it's intended to be just hard-core research. Once we understand how stuff works, then it can be made reader-friendly.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  15. #15
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: Research: Parameters for commands & console commands

    Thanks, ER.
    As I promised, I have a new doubt.
    As I told before, I was able to write a new trigger, a really simple one:
    Code:
    ;------------------------------------------
    Trigger 2902_Sicilia_Casus_Belli2_Trigger
        WhenToTest FactionTurnStart
    
        Condition I_SettlementOwner Lilybaeum = greek_cities
    
        AdviceThread Sicilia_Casus_Belli2_Thread  1
    That means, in case of Lilybaeum is conquered by greek_cities an advice will appear, in this way:
    Code:
    ;------------------------------------------
    AdviceThread Sicilia_Casus_Belli2_Thread
        GameArea Campaign
    
        Item Sicilia_Casus_Belli2_Text_01
            Uninhibitable
            Verbosity  0 
            Threshold  1 
            Attitude Normal
            Presentation Default
            Title Sicilia_Casus_Belli2_Text_01_Title
            Text Sicilia_Casus_Belli2_Text_01_Text1
    I have played a campaign with greek_cities and I have captured Lilybaeum. Just before pressing the end-of-turn button I saved the campaign, in order to have a quick test for this trigger. The advisor text appeared for the first time,
    but if I try to repeat (with or without modification), the advisor didn't appear anymore. I copied and renamed the trigger and the advice, and again it appeared only once.

    I tried by putting
    Code:
             MaxRepeats  100
    but there was no difference. Is there any problem with the repetition of a trigger?
    Last edited by Monkwarrior; 05-09-2005 at 23:17.

  16. #16

    Default Re: Research: Parameters for commands & console commands

    You want it to appear at the start of every faction's turn? Including the AI ones? For every turn that the Greeks hold Lilybaeum?

    Well, okay, try this trigger instead:
    Code:
    ;------------------------------------------
    Trigger 2902_Sicilia_Casus_Belli2_Trigger
        WhenToTest FactionTurnStart
    
        Condition I_SettlementOwner Lilybaeum = greek_cities
    
        AdviceThread Sicilia_Casus_Belli2_Thread  0
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  17. #17
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: Research: Parameters for commands & console commands

    Thanks, I've just remarked the zero!
    The answer is no, of course, but it was only a question of testing.
    Now I have run a short script:
    Code:
    script
    console_command diplomatic_stance romans_julii greek_cities war
       
    end_script
    and this is the result
    It works!

    So I can think in refining this system to stablish "security perimeters" or "security zones", where any movement will be seen as an agression.
    Thanks again!

  18. #18
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: Research: Parameters for commands & console commands

    I've been also trying the question of spawn_army.
    I think I've tried about a dozen of ways to write it. This is one:

    Code:
    spawn_army
    faction	romans_julii
    character	Publius Scipio, general, command 0, influence 0, management 0, subterfuge 0, age 23, , x 211, y 69 
    army
    unit roman generals guard cavalry early soldiers 15 exp 0 armour 0 weapon_lvl 0
    unit roman velite soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman velite soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman hastati soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman hastati soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman hastati soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman hastati soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman princeps soldiers 41 exp 0 armour 0 weapon_lvl 0
    unit roman triarii soldiers 41 exp 0 armour 0 weapon_lvl 0
    end
    It doesn't work, of course, but perhaps there is a useful information. The show_err option says me "don't recognise this token: unit".
    Does anybody know what token is?
    The interesting question is that it seems that recognise everything until "unit" (so army is necessary, isn't it?). I've tried also:
    roman generals...
    "roman generals...
    create_unit ...
    and the error message is always the same: don't recognise this token {first word}.

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

    Default Re: Research: Parameters for commands & console commands

    I've also tried many ways, copying entries from descr_battle.txt (like it says you should), the sample use given by CA, and even entries from descr_strat. Of course none worked.

  20. #20
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default One possible application: senate missions emulator

    Well, I am interested in the possibilities of scripting from the start of this research, although I am a complete ignorant about all the relative to this aspect.
    Following the advice of Epistolary Richard and with the invaluable help of our moderator, Myrddraal, I've been trying to explore the use of a continuous script.
    My first idea was to simulate the senate missions, either in campaigns where the senate is not present or for factions different from romans (many people claims that Carthage had also a senate and that this faction could also be splited into two).
    This is my first (partial) success:
    Code:
    ;Senate Missions Emulator, by Monkwarrior Beta Version 0.1
    script
    
    ;set up counters
    declare_counter SenateMission	;used to know which mission is currently assigned
    declare_counter loop
    
    ;start of the first mission
    
    advance_advice_thread Senate_Mission_M01_Thread	;communication to the player
    set_counter SenateMission 1
    
    ;success in mission
    monitor_event GeneralCaptureSettlement FactionType romans_julii
    	and SettlementName Segesta
    
    	if I_TurnNumber < 10
    		advance_advice_thread Senate_Mission_Success1_Thread	;message of success
    		console_command add_money 3000	;this is the reward
    		inc_counter SenateMission 1	;pass to the next mission
    	end_if
    
    	terminate_monitor
    end_monitor
    
    ;mission failed
    monitor_conditions I_TurnNumber = 10
    	and I_CompareCounter SenateMission = 1
    
    	advance_advice_thread Senate_Mission_Failed1_Thread	;time for mission is over
    	console_command add_money -1000		;penalty
    	inc_counter SenateMission 1		;pass to the next mission
    
    	terminate_monitor
    end_monitor
    
    while I_CompareCounter loop = 0
    end_while
    terminate_script
    This script is completed with three advices in export_descr_advice, corresponding to the communication of the mission, the success message and the fail message.
    I have checked this script in my Iberia:TotalWar campaign and it works (thanks to the "loop" idea of Myrddraal).

    Why must it be considered a partial success? The advices appear only once. If I start again the campaign, they do not appear again and I must modify the advice name in all the related files. To be useful, the advices should appear only once in a campaign, but in every campaign.
    Does anybody know how to repeat an advice?
    Does anybody know what is this command used for?:
    Code:
    suspend_unscripted_advice false

  21. #21

    Default Re: Research: Parameters for commands & console commands

    Quote Originally Posted by Monkwarrior
    The show_err option says me "don't recognise this token: unit".
    Does anybody know what token is?
    Token is their name for words the scripting engine recognises. The problem with the spawn_army as the sample is written is that the game doesn't recognise 'unit' as an command - either because it never did or because it's been deactivated.

    Why must it be considered a partial success? The advices appear only once. If I start again the campaign, they do not appear again and I must modify the advice name in all the related files. To be useful, the advices should appear only once in a campaign, but in every campaign.
    Does anybody know how to repeat an advice?
    I don't quite understand this, when you say start again the campaign do you mean that you are starting a new campaign or that you are reloading one that you have previously saved?

    suspend_unscripted_advice false
    This command means that no advice will appear unless the thread is advanced as part of the script or the player has requested a piece of advice from a help button.

    Updates
    The top posts have also been updated. Console commands clear_messages and test_message both work. As Myrddraal already noted, spawn_character works to some extent as well. I expanded the testing to agents and found it works fine for them - see the sample use for the command line I used.
    Last edited by Epistolary Richard; 05-23-2005 at 12:00.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  22. #22

    Default Re: Research: Parameters for commands & console commands

    I'm having the same problem as Monkwarrior. I am trying to set up scripts for modified victory conditions, so I only want the advice thread to trigger once per campaign. My scripts work fine, except that they either trigger just once, or they trigger every turn after the victory conditions are met. I can't get them to trigger once per campaign.

  23. #23

    Default Re: Research: Parameters for commands & console commands

    Have you considered using a counter as a conditional (eg, if victory_counter = 0) then set the counter to 1 when the victory conditions are fulfilled, so that they won't be fulfilled in future turns?
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  24. #24

    Default Re: Research: Parameters for commands & console commands

    Quote Originally Posted by Epistolary Richard
    Have you considered using a counter as a conditional (eg, if victory_counter = 0) then set the counter to 1 when the victory conditions are fulfilled, so that they won't be fulfilled in future turns?
    That would work for a continuously running script, but because of the problems with continuous scripts (like not being able to save) I was planning to just use incidental scripts.

    One solution is to tell users to delete preferences\advice before they start a new campaign. That has the effect of seting all the advice thread counts back to zero. But I was hoping to come up with something that would "just work" without users actually having to read the readme.

  25. #25
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Research: Parameters for commands & console commands

    Well that's the same problem I had with Civ2 even scripting long time ago.

    There is a good reason why normal descr_start.txt script doesn't allow saving, so workarounds like F1 - advice need to be used.

    And it's inability to save inscript variables.
    So things like once per campaing are impossible, only once per session is possible.

    That's for example why you can't save several first turns in prologue. It would completly mess the script if you do (no variables saved).
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

  26. #26

    Default Re: Research: Parameters for commands & console commands

    Quote Originally Posted by DimeBagHo
    My scripts work fine, except that they either trigger just once, or they trigger every turn after the victory conditions are met. I can't get them to trigger once per campaign.
    Ah, sorry I was assuming you were using a background script like Monkwarrior. I don't understand what you mean when you say that they trigger just once, but they don't trigger once per campaign. Could you explain it further?
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  27. #27

    Default Re: Research: Parameters for commands & console commands

    Quote Originally Posted by Epistolary Richard
    Ah, sorry I was assuming you were using a background script like Monkwarrior. I don't understand what you mean when you say that they trigger just once, but they don't trigger once per campaign. Could you explain it further?
    Sure. Here is the code for a test victory condition I set up.

    Code:
    ;------------------------------------------
    AdviceThread Greek_Cities_Win_Thread
        GameArea Campaign
    
        Item Greek_Cities_Win_Text_01
            Uninhibitable
            Verbosity  0
            Threshold  1 
            MaxRepeats  0
            RepeatInterval  1
            Attitude Excited
            Presentation Default
            Title Greek_Cities_Win_Text_01_Title
            Script scripts\show_me\Greek_Cities_Win.txt
            Text Greek_Cities_Win_Text_01_Text1
    
    ;------------------------------------------
    Trigger Greek_Cities_Win_Trigger
        WhenToTest FactionTurnStart
    
        Condition FactionIsLocal
    	and FactionType greek_cities
    	and I_ThreadCount Greek_Cities_Win_Thread < 1
    	and I_SettlementOwner Athens = greek_cities
    
        AdviceThread Greek_Cities_Win_Thread  1
    This is just a test, so all the Greek Cities need to win is to capture Athens. When the advice thread triggers the advisor comes up and anounces that the player has won. If they hit showme then the script triggers the victory scroll.

    Greek_Cities_Win_Trigger only fires once because of the I_ThreadCount condition. Even if you start a new campaign it will not fire again. If I remove that condition then the trigger and the advice thread will keep firing every turn, as long as the Greek Cities still hold Athens (assuming of course that the player continues to play after achieving victory).

    If I could get it to fire just once per campaign that would be ideal, but it probably doesn't matter that much. Someone would have to play all the way through the Greek Cities campaign twice for it to be an issue - and I can always make an advice thread to remind them to delete preferences/advice if they try to start a new campaign after winning once.

  28. #28

    Default Re: Research: Parameters for commands & console commands

    Thanks, I understand now. The way to do it is to make a permanent change to the game world that will be logged within a save game but not embedded when you start a new campaign. An example of this would be to use the victory script to add a building to a settlement that was not otherwise buildable there and then add a and not SettlementBuildingExists condition to the script. The first time the player achieves the victory conditions, there is no building there and so the conditions are true and the trigger is fired. In subsequent turns, the building is there and so the trigger is not activated. When a new campaign is started, the settlement buildings are generated afresh from descr_strat.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

  29. #29
    Bug Hunter Senior Member player1's Avatar
    Join Date
    Feb 2005
    Location
    Belgrade, Serbia
    Posts
    1,405

    Default Re: Research: Parameters for commands & console commands

    This is great idea.
    Just make sure that building can't be destroyed by player.
    BUG-FIXER, an unofficial patch for both Rome: Total War and its expansion pack

  30. #30

    Default Re: Research: Parameters for commands & console commands

    It can be built in any province you like, so it can be put out of the way in Hyperborea or a completely isolated province if you're making adjustments to the map.
    Epistolary Richard's modding Rules of Cool
    Cool modders make their mods with the :mod command line switch
    If they don't, then Cool mod-users use the Mod Enabler (JSGME)
    Cool modders use show_err
    Cool modders use the tutorials database Cool modders check out the Welcome to the Modding Forums! thread Cool modders keep backups Cool modders help each other out

Page 1 of 2 12 LastLast

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