Results 1 to 30 of 116

Thread: An Intermediate Guide to Scripting

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: An Intermediate Guide to Scripting

    While experimenting with scripts I noticed that some AdviceThreads in export_descr_advice.txt have a parameter. I found SettlementName and CharacterName. Not useful for me, but I guess some can use it to make their Advisor texts a little bit more detailed, showing the settlement's or character's name.

  2. #2
    Member Member paullus's Avatar
    Join Date
    Aug 2005
    Location
    always in places where its HOT
    Posts
    11,904

    Default Re: An Intermediate Guide to Scripting

    Is there a way to make the background script detect whether an AI faction has done something, and then have that trigger an event script at the start of the player's turn?
    "The mere statement of fact, though it may excite our interest, is of no benefit to us, but when the knowledge of the cause is added, then the study of history becomes fruitful." -Polybios


  3. #3

    Default Re: An Intermediate Guide to Scripting

    Depends on what the AI faction has done. What AI event do you want to trigger it?
    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: An Intermediate Guide to Scripting

    Which of the following events would be detectable for an AI nation?
    Takes a (particular) city.
    Declares war/peace with another nation.
    Accumulates X amount of money.
    Family member (specifically faction leader) dies.
    Family member accumulates X command stars.
    Conquer a whole new world.

    Development - Discussion

  5. #5

    Default Re: An Intermediate Guide to Scripting

    These should be possible.
    Just open beginer screepting guide and dive in into RTW script documentation.

  6. #6
    Member Member paullus's Avatar
    Join Date
    Aug 2005
    Location
    always in places where its HOT
    Posts
    11,904

    Default Re: An Intermediate Guide to Scripting

    Quote Originally Posted by Epistolary Richard
    Depends on what the AI faction has done. What AI event do you want to trigger it?
    Beseiging a city would probably be best.
    "The mere statement of fact, though it may excite our interest, is of no benefit to us, but when the knowledge of the cause is added, then the study of history becomes fruitful." -Polybios


  7. #7

    Default Re: An Intermediate Guide to Scripting

    Besieging a city's tricky, you can put a conditional in for a monitor to fire if an enemy family member is within one tile of a certain location and if the two factions are at war.

    Gets a bit cumbersome with large numbers of factions and cities, but it's possible.

    LorDBulA does something similar with his Roma siege script, have a look at his code:
    http://www.twcenter.net/forums/showthread.php?t=24968

    You can use something like that to increment a counter and then have a separate monitor_event FactionTurnStart FactionIsLocal with an I_CompareCounter condition. Be sure to set the counter back to 0 though, otherwise it will keep triggering.
    Last edited by Epistolary Richard; 03-05-2006 at 10:34.
    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

  8. #8

    Default Re: An Intermediate Guide to Scripting

    This is a quite similar question, but I hope it can be done:

    Is it possible to make an army (or naval army) besiege a city/port at game start through a script? I'm not very familiar with scrpits, so I hope someone could help me with this one.

    - Tittils -


    The Fourth Age: Total War - Map Manager, Editor and Coder

  9. #9
    Member Member paullus's Avatar
    Join Date
    Aug 2005
    Location
    always in places where its HOT
    Posts
    11,904

    Default Re: An Intermediate Guide to Scripting

    ER,

    Sorry I was unclear. I meant to say "besieging a neutral city." Unless I'm missing something (certainly a possibility), I don't think those conditions would work with a city you do not own. Is there anything else I could try?

    Thanks much.
    "The mere statement of fact, though it may excite our interest, is of no benefit to us, but when the knowledge of the cause is added, then the study of history becomes fruitful." -Polybios


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