+ Reply to Thread
Results 1 to 12 of 12

Thread: Scripting

  1. #1

    Scripting

    Important points

    - You can use "give_trait this" to give the selected character a trait. -- found by Somec

    - The game doesn't have to be restarted to load a new campaign script. Restarting the campaign is enough

    - Show Me scripts don't have the same functionality as the campaign script. This is presumably because they are loaded on game start whereas the campaign script is loaded on campaign start. The exact problems are with map-related commands (i.e. stuff like spawn_army that uses coordiates)

    Docudemon files
    Which include a list of all commands and their syntax, can be found here:
    http://forums.totalwar.org/vb/showth...26#post1316726
    Last edited by alpaca; 12-14-2006 at 14:00.

  2. #2
    Harbinger of... saliva Assistant Moderator alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,764

    Re: Scripting

    This supposedly removes the need for the infinite while loops at the end of scripts (from the campaign script):
    Code:
    ; keep script unfinised until last monitor termination
    	wait_monitors

  3. #3
    Shaidar Haran Senior Member Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    4,847

    Re: Scripting

    I believe backgrounds scripts are now launched on loading of a savegame, giving us great opportunities.

    Here's waiting for the docudemon files.
    The Modding Questions Forum is for asking Modding Questions
    The Mod Discussion Forum is for Discussions on mods and modding
    The Forge is for Mods in Development
    The Scriptorium is for Guides, Tutorials and Tools
    .
    Wheel of Time mod forum
    Wheel of Time mod team leader
    __________________
    Thought for the day: When exactly does a lie-in become a coma?
    --------------------
    ---------

  4. #4
    Harbinger of... saliva Assistant Moderator alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,764

    Re: Scripting

    First post updated.
    The "give_trait this" command could be very useful if we can find a way to select characters with scripting.

    Edit: The "select_character <Name>" and, more importantly, "e_select_character" commands should do the trick. The "e_" prefix should select a character that triggered an event. Will test that.
    Last edited by alpaca; 11-21-2006 at 15:52.

  5. #5
    Shaidar Haran Senior Member Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    4,847

    Re: Scripting

    Added the link to the docudemon files
    The Modding Questions Forum is for asking Modding Questions
    The Mod Discussion Forum is for Discussions on mods and modding
    The Forge is for Mods in Development
    The Scriptorium is for Guides, Tutorials and Tools
    .
    Wheel of Time mod forum
    Wheel of Time mod team leader
    __________________
    Thought for the day: When exactly does a lie-in become a coma?
    --------------------
    ---------

  6. #6
    Harbinger of... saliva Assistant Moderator alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,764

    Re: Scripting

    We should try to collect some information about the "log" scripting command. It works (i.e. it writes stuff to the log) only erratically. It logs all messages, but it seems to be pretty random when it writes them out.

  7. #7
    Harbinger of... saliva Assistant Moderator alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,764

    Re: Scripting

    Added:
    - Show Me scripts don't have the same functionality as the campaign script. This is presumably because they are loaded on game start whereas the campaign script is loaded on campaign start. The exact problems are with map-related commands (i.e. stuff like spawn_army that uses coordiates)

  8. #8
    Member Member
    Join Date
    May 2005
    Posts
    2,694

    Re: Scripting

    I dont know if this is appropriate place but are the counters values stored in save file and reloaded on save load?

  9. #9
    Just driving-by Senior Member Epistolary Richard's Avatar
    Join Date
    Nov 2004
    Posts
    4,380

    Re: Scripting

    Looking at the file, it appears they have to - otherwise some of the vanilla script wouldn't work.

  10. #10
    Member Member
    Join Date
    May 2005
    Posts
    2,694

    Re: Scripting

    WOW great news. No more tricky and not 100% reliable memory cells.

  11. #11
    Member Member Re Berengario I's Avatar
    Join Date
    Nov 2003
    Location
    Italy
    Posts
    336

    Re: Scripting

    By experimenting I discovered that the add_money command has a maximum value of 40,000

  12. #12

    Re: Scripting

    Hello scripters!

    I'm experimenting with some disease traits right now, and using the campaign_script I'd like to kill off mortally afflicted characters...

    Now, to kill a character with the trait MortalScurvy = 1, does this script suffice?:

    monitor_event CharacterTurnEnd Trait MortalScurvy = 1
    console_command kill_character this
    end_monitor

    Apparently the game doesn't recognize 'this' when used with the kill_character command, though this is not the case when the command 'give_trait this X' is used.

    What exactly am I doing wrong here :P?
    Last edited by isellj0epnuts; 01-31-2007 at 05:15.

+ Reply to Thread

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