Results 1 to 30 of 53

Thread: Eureka! Running scripts automatically!

Hybrid View

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

    Default Running scripts without having to click on the 'Show Me How' button

    Summary: Traditionally, the advice thread in EDA used to run the script had a Script line in it. Replace the Script keyword with the OnDisplay keyword to have the script run automatically, without having to click on the 'Show me how' button.

    The full tutorial is posted here: http://www.twcenter.net/forums/showthread.php?t=169689

    This thread is for discussion only.
    Last edited by HouseOfHam; 06-23-2008 at 20:40.
    RTR VII Developer

  2. #2
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: Eureka! Running scripts automatically!

    And for reloading a saved game?

  3. #3
    Death and Glory TW modder Member Flying Pig's Avatar
    Join Date
    Dec 2007
    Location
    Looking for a place to land...
    Posts
    313

    Default Re: Eureka! Running scripts automatically!

    Congratulations! This is probably the most exciting recent find I can think of! Should a mod move it to Scriptorium?
    Last edited by Flying Pig; 05-28-2008 at 12:21.
    Death And Glory TW Needs You - Sign Up Now! All it takes is one PM!

    Ὦ ξεῖν', ἀγγέλλειν Λακεδαιμονίοις ὅτι τῇδε
    κείμεθα, τοῖς κείνων ῥήμασι πειθόμενοι.

    Ō zein', angellein Lakedaimoniois hoti tēide
    keimetha tois keinōn rhēmasi peithomenoi.

    Go, thou that passeth, to the Spartans tell
    That as per their orders, here we fell.

  4. #4
    Anything that isn't 'member' Member Squid's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    596

    Default Re: Eureka! Running scripts automatically!

    Quote Originally Posted by Monkwarrior
    And for reloading a saved game?
    Quote Originally Posted by HouseOfHam
    . . . and for loading a saved game, you only need to click on the advisor portrait and you're done.

    <snip>
    See the bolded mark of the OP.

    -Trait/Ancillary/Building Editor

    "Two things are infinite: the universe and human stupidity;
    and I'm not sure about the universe." -----Albert Einstein

  5. #5
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: Eureka! Running scripts automatically!

    But I don't understand how it is triggered when reloading.

    An additional trigger is needed, isn't it?

    What does on_display make? What's the difference with a "normal" advice thread?

    Sorry, maybe I've missed something.

    I used the system "campaign script -> background script" to launch it at the start of a campaign (this is not new for me), but I had to use a normal trigger (click on settlement for example) when reloading. I'd like to understand the difference.

  6. #6

    Default Re: Eureka! Running scripts automatically!

    You will still need to keep those triggers. But when loading a saved game, they'll only need need click on the advisor portrait and that's it.

    The best way to see what it does is to try it. :)
    Last edited by HouseOfHam; 05-28-2008 at 20:56.
    RTR VII Developer

  7. #7
    Indiana Jones of Modding! Member Patrizius's Avatar
    Join Date
    Oct 2007
    Posts
    103

    Default Re: Eureka! Running scripts automatically!

    EUREKAAA!

    i find a way to get ride of those annoying script activation,using this incredible thing.


    you make a trigger for the ADVICE like this:

    Trigger my_script
    WhenToTest FactionTurnStart

    Condition FactionIsLocal

    AdviceThread My_script_Thread

    this way as you see there is a problem cause the script will be activated each time you start a turn...but

    in the script write:
    suspend_unscripted_advice true

    this way no more advice will be displayed.ANd

    We you load a game you will have your script activated.
    and if you reload,it will reativate again

    Great work HouseOfHam
    Ideator,Scripter and Team Leader of RES BELLICAE modding project.Come visit us on http://www.twcenter.net/forums/forumdisplay.php?f=603

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