Results 1 to 3 of 3

Thread: Scripted Battles in the campaign

  1. #1

    Default Scripted Battles in the campaign

    Hey guys.

    Is there a way to "insert" a battle for the players to play using a set of pre-determined units and etc, similar to what we see in historical battles or the tutorial battles?

    The reason for this is that I am programming certain historical scenarios, and while I have a good idea as to how the battles should take place, and a decent idea as to how the scripting should work, I don't know if you can somehow trigger things to happen on certain turns or after fulfilling certain conditions.

    I've some rudimentary understanding of lua, though I am proficient in python, out of all things. Any help at all would be greatly appreciated. Thanks.

  2. #2
    Inevitability won
    Patrician Citizen

    Join Date
    Mar 2010
    Posts
    9,594

    Default Re: Scripted Battles in the campaign

    scripting.game_interface:add_custom_battlefield(x, y, trigger (circle) radious, "YourBattlesFolder/NAMEOFBATTLE.xml")

    Example from the tutorial scripting:

    scripting.game_interface:add_custom_battlefield(-115.8, -113.4, 7, "TutorialBattles/TUT_Naval_Ashigaru.xml")


    If you don't know how to utilize or implement this into the campaign scripting.lua, just ask.
    Last edited by .Mitch.; June 01, 2011 at 02:53 PM.

  3. #3

    Default Re: Scripted Battles in the campaign

    How are siege battles defined? There are different siege battles eg mountain top, surrounded by moat etc, these must be referenced somewhere? startup maybe? somewhere under settlements?

    Maps / deploy zones are defined in templates somewhere, I'll have a look.

Posting Permissions

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