Results 1 to 30 of 116

Thread: An Intermediate Guide to Scripting

Hybrid View

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

    Default Re: An Intermediate Guide to Scripting

    What do you mean?
    Does it work for IF and WHILE statements?

    For the glory of Rome

  2. #2

    Default Re: An Intermediate Guide to Scripting

    Nope, it has an import - the only conditions that work with if and while statements are prefixed with I_
    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
    Member Member Piko's Avatar
    Join Date
    Dec 2004
    Location
    Belgium,Bredene
    Posts
    59

    Default Re: An Intermediate Guide to Scripting

    Can you force ownership of a city? If so can I have the code please?

  4. #4
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: An Intermediate Guide to Scripting

    console_command take_settlement i think, take a look at the docudemon

  5. #5
    Member Member Stuie's Avatar
    Join Date
    Aug 2001
    Location
    Upper Gwynedd, PA
    Posts
    406

    Default Re: An Intermediate Guide to Scripting

    Quote Originally Posted by shadowstar
    Can you force ownership of a city? If so can I have the code please?
    Hey Piko-

    As an example, on turn #100 at the start of the Julii turn, this will give the Senate control of Antioch and then create two units of Hastati in Antioch.

    Code:
    monitor_event FactionTurnStart FactionType romans_julii
    and I_TurnNumber = 100
    
    console_command control romans_senate
    console_command capture_settlement Antioch
    console_command create_unit Antioch "roman hastati" 2
    console_command control romans_julii
    
    terminate_monitor
    end_monitor
    This assumes the player is playing romans_julii. If not, the code gets more complicated because you'll need some sort of variable to return control of the correct faction to the player.
    Last edited by Stuie; 05-03-2006 at 20:00.

  6. #6
    Member Member Piko's Avatar
    Join Date
    Dec 2004
    Location
    Belgium,Bredene
    Posts
    59

    Default Re: An Intermediate Guide to Scripting

    Quote Originally Posted by Stuie
    Hey Piko-

    As an example, on turn #100 at the start of the Julii turn, this will give the Senate control of Antioch and then create two units of Hastati in Antioch.

    Code:
    monitor_event FactionTurnStart FactionType romans_julii
    and I_TurnNumber = 100
    
    console_command control romans_senate
    console_command capture_settlement Antioch
    console_command create_unit Antioch "roman hastati" 2
    console_command control romans_julii
    
    terminate_monitor
    end_monitor
    This assumes the player is playing romans_julii. If not, the code gets more complicated because you'll need some sort of variable to return control of the correct faction to the player.
    Thanks, I needed this for RTR: under the eagle, hereby promoting it, please visit us at: http://forums.rometotalrealism.org/i...?showforum=157 . We're only just starting out but I'm sure this information's all going to help.

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