Results 1 to 7 of 7

Thread: Two utterly unrelated questions...

Hybrid View

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

    Default Re: Two utterly unrelated questions...

    You get into the Battle editor by putting -enable_editor into your command line in your shortcut (same place as the -show_err). The Battle Editor then appears in the options menu. There should be documents on the .com website to help out if you don't already have them.

    Your best resource for this is the Prologue campaign, in the first battle there are several points where you're required to move a unit from one point to another and then the next part of the script is triggered when they reach there. The battle scripting's all contained within the prologue campaign script. As far as I can tell the condition you'll want to use is I_UnitDistanceFromPosition. Make sure you have the docudemon files that tell you what all the conditions etc. mean and their correct syntax.

    My advice would be to use I_UnitDistanceFromPosition in a monitor_conditions (you have to anyway) and then when that occurs use the unit_set_morale command for all the enemy units to rout them, which will fulfil the rout all units victory condition.


    As I say, I've never done any battle scripting but the tools (monitors, iifs, etc.) are used in the same way even though the commands and set-up are different so have a look at the Intermediate Scripting guide for a conceptual understanding, though remember it's campaign scripting not battle scripting. And then replay the Prologue and go through the campaign script to understand how the code impacts the game. In all our stuff we pretty much have to do look at what CA did to understand how it works.
    Last edited by Epistolary Richard; 01-29-2006 at 12:40.
    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 Re: Two utterly unrelated questions...

    Thanks very much Epistolary Richard. I spent the weekend just looking at the prologue battle but now I think I'll be able to tinker with it thanks to your short and sweet tutorial here. If it routs all enemy units will the game end immediately though? (guess I'll have to test it out).

    Thanks very much,
    Harlechman (Clare)
    "Ad majoram Dei gloriam"

  3. #3

    Default Re: Two utterly unrelated questions...

    Destroy and/or rout all enemy units is a pretty standard victory condition, I think it can be set in the battle editor. Have a look in the descr_battle files within the historical battle folders and you see the victory conditions there.

    Let me know how you get on and give us a shout if you have any problems.
    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

    Default Re: Two utterly unrelated questions...

    I think there's a workaround - Lets say there are two armies, your player army and an allied army like the prologue's Captain Decius. You only have like two weak cavalry units and Decius has some badly shaken infantry but the barbarians have a truckload of baddies. If the 'barbarian' army kills all of captain Decius then he is triggered to automatically rout (ie. leave the field in 'victory') and if you survive till then, then you win the game.

    Sounds possible, I hope it IS.

    Thanks very much,
    Clare (Harlechman)
    "Ad majoram Dei gloriam"

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