Results 1 to 6 of 6

Thread: Spawning armies

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Spawning armies

    I'm trying to see if I can spawn dynamic armies every turn based on a number of in-game factors such as the happiness, population and buildings of the city where the army would spawn. Even more desirable would to make it so that it only triggers when a family member with a certain character trait is present but this isn't at all necessary. If anyone has any suggestions for how to do this it would be much appreciated.

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

    Default Re: Spawning armies

    If you only care about settlement-related conditions:

    Code:
    monitor_event SettlementTurnStart SettlementName Rome
              and I_SettlementOwner Rome = romans_julii
              and SettlementBuildingExists >= small_temple_of_war
      console_command create_unit Rome "roman hastati" 2
    end_monitor
    If you want to check both settlement- and character-related conditions, you need to monitor an event that exports both settlement and character records. For example, CharacterTurnEnd...

    Code:
    monitor_event CharacterTurnEnd GovernorLoyaltyLevel >= loyalty_rioting
    ;if there is more than one character present and you don't care which one of them is the governer, use SettlementLoyaltyLevel instead
              and SettlementName Rome
              and I_SettlementOwner Rome = romans_julii
              and SettlementBuildingExists >= small_temple_of_war
              and Trait Inspiring > 2
      console_command create_unit Rome "roman hastati" 2
    end_monitor
    You can't check settlement population size directly, but you might be able to get a rought estimate based on the level of bulding(s) present.
    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

    Default Re: Spawning armies

    What file would you place those in?

  4. #4

    Default Re: Spawning armies

    In the file which contains the background script of your mod/game, you can call it however you want. See the Tutorials/Scripting section for more info on how this system works.

  5. #5

    Default Re: Spawning armies

    I looked at the tutorial and followed it to the letter as far as I can tell, but my game just crashed before it reached the first loading screen. Is there any common mistake I could have made that makes this happen?
    Last edited by cfan01; November 04, 2008 at 01:33 PM. Reason: forgot a word

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

    Default Re: Spawning armies

    Sounds like a problem with export_descr_advice.txt or export_advice.txt.
    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

Posting Permissions

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