Results 1 to 3 of 3

Thread: Historical Battle Scripting

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Rt. Hon. Gentleman's Avatar Campidoctor
    Join Date
    Aug 2008
    Location
    Lincoln, Lincolnshire.
    Posts
    1,868

    Default Historical Battle Scripting

    Hi,

    I'm working on the battle of Pharsalus for RS2. I have created it to a degree of verisimilitude which I am happy with, but the AI (being what it is) has Pompey's armt reform from the manipular army I placed it as ,to a single line at the beginning of each battle. Obviously, this is not on, as I wish to keep the historical formation until the player attacks.

    How can I force this issue? I know the vanilla historical battles have script files that keep the units in check and tell them where they have to go, how can I replicate this. My demands on Pompey's army are hardly excessive or unrealistic.

    Thanks in advance,
    RHG.

  2. #2
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: Historical Battle Scripting

    Maybe something along the lines of...

    Code:
    prepare_for_battle
    
    ; label units
    ; define_unit_group ROMAN_UNITS unit1 unit2 etc
    ; place units and set individual unit formations
    
    ai_active_set off
    
    ; maybe throw in unit_group_set_formation ROMAN_UNITS formation_name_from_descr_formations
    
    unit_group_order_halt ROMAN_UNITS
    
    undefine_unit_group ROMAN_UNITS
    
    monitor_event BattlePlayerUnitAttacksEnemyUnit TrueCondition
        ai_active_set on
        terminate_monitor
    end_monitor
    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

  3. #3
    Rt. Hon. Gentleman's Avatar Campidoctor
    Join Date
    Aug 2008
    Location
    Lincoln, Lincolnshire.
    Posts
    1,868

    Default Re: Historical Battle Scripting

    Quote Originally Posted by HouseOfHam View Post
    Maybe something along the lines of...

    Code:
    prepare_for_battle
    
    ; label units
    ; define_unit_group ROMAN_UNITS unit1 unit2 etc
    ; place units and set individual unit formations
    
    ai_active_set off
    
    ; maybe throw in unit_group_set_formation ROMAN_UNITS formation_name_from_descr_formations
    
    unit_group_order_halt ROMAN_UNITS
    
    undefine_unit_group ROMAN_UNITS
    
    monitor_event BattlePlayerUnitAttacksEnemyUnit TrueCondition
        ai_active_set on
        terminate_monitor
    end_monitor
    You are a genius. I will have a go with this now.

    +rep.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •