Results 1 to 30 of 53

Thread: Eureka! Running scripts automatically!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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.

  2. #2

    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

  3. #3
    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

  4. #4

    Default Re: Eureka! Running scripts automatically!

    Thanks. :)

    Does that event trigger immediately as you load a saved game or do you have to hit 'End turn' first?

    I'll give it a try tonight.
    RTR VII Developer

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

    Default Re: Eureka! Running scripts automatically!

    it can be that toghetr we have solved one of the greatest problems in the modding.Having the player to remember to activate the script.

    the characterTurnStart event should trigger immediantly when you firstly start a campaign,but i think not when you load....GameReloaded seems the event we need to make the last step,but i think FactionTurnEnd would work anyway(but in this way the player must pass a turn to have thee script activated).Let me know.I'll try with GameReloaded and let you know ;)
    Ideator,Scripter and Team Leader of RES BELLICAE modding project.Come visit us on http://www.twcenter.net/forums/forumdisplay.php?f=603

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

    Default Re: Eureka! Running scripts automatically!

    ok maded some extra tests.

    FactionTurnStart is useless there.and even gameReloaded seems a fake.

    indeed we can get ride of this problem in this way,unless it won't work for all kind of scripts(in the fact it will work almost for all kind of script ),using the combination SettlementSelected,CharacterSelected,factionTurnEnd.

    This way if the player touches anything in the strat map,it will activate the script.

    the only drawback is that this method requires the advice_frequence to be set to high,unless someone discover how to make advices to appear anyway(there is a big set of attributes added to an advice.Maybe someone will do the trick.)

    I'm gonna check right about now.Keep it up HouseOfHam.WE MUST DISCOVER THE SECRET
    Ideator,Scripter and Team Leader of RES BELLICAE modding project.Come visit us on http://www.twcenter.net/forums/forumdisplay.php?f=603

  7. #7

    Default Re: Eureka! Running scripts automatically!

    Yeah, I've never been able to detect the GameReloaded event, either. I don't think they ever implemented it.

    Anyhow, the remaining problem is not so much what trigger(s) to use but how to get the script to run without having to click on the advisor portrait. If that's not a concern, whatever triggers people used in their mod will still work just fine.
    RTR VII Developer

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

    Default Re: Eureka! Running scripts automatically!

    After an afternoon spent doing tests,here it's my conclusions:



    i used those advice and triggers



    ;------------------------------------------
    AdviceThread Help_Game_Options_Scroll_Thread
    GameArea Campaign

    Item Help_Game_Options_Scroll_Text_01
    Verbosity 0
    Priority 2
    MaxRepeats 0
    RepeatInterval 1
    Threshold 1
    Attitude Excited
    Presentation Default
    Title Help_Game_Options_Scroll_Text_01_Title
    On_display scripts\show_me\script.txt
    Text Help_Game_Options_Scroll_Text_01_Text1





    Trigger 3699_City_Construction_Build_temple_of_trade_pantheon_britons_Next_Trigger
    WhenToTest SettlementSelected

    AdviceThread Help_Game_Options_Scroll_Thread 1


    Trigger 3699_City_Construction_Build_temple_of_trade_pantheon_britons_Next_Trigger
    WhenToTest CharacterSelected

    AdviceThread Help_Game_Options_Scroll_Thread 1



    note that the line "Attitude Excited" force RTW to automaticcally open the advice(so you don't have to click on it).then you must write "suspend_unscripted_advice true" on your script

    the two drawback are:
    1)it doesn't start unless you select something on the map(factionturnend is completely useless).
    2)you have to select the advice frequency to low to get it to work.

    a big leap for our scripters.but still not perfection.This damn RTW has only one thing done well:THE BUGS
    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