Results 1 to 8 of 8

Thread: Creating a money script

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Now sporting a classic avatar! Member fallen851's Avatar
    Join Date
    Oct 2005
    Posts
    799

    Default Creating a money script

    Similar to EB, I created a script that gives the AI money because the AI is lacking (to put it nicely).

    Now to activate the script in the game, I want to make it so the advisor pops up (it is a show me script) everytime I click on a city or an army. How do I create these triggers?

    This unforunately isn't in the guides to scripting.

    Thanks for any and all help.
    "It's true that when it's looked at isolated, Rome II is a good game... but every time I sit down to play it, every battle, through every turn, I see how Rome I was better. Not unanimously, but ultimately." - Dr. Sane

    http://www.youtube.com/watch?v=L6eaBtzqqFA#t=1h15m33s

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

    Default Re: Creating a money script

    Quote Originally Posted by fallen851
    Similar to EB, I created a script that gives the AI money because the AI is lacking (to put it nicely).

    Now to activate the script in the game, I want to make it so the advisor pops up (it is a show me script) everytime I click on a city or an army. How do I create these triggers?
    I don't understand how do you want to launch the script.
    Do you want to give money to the AI each time you click on a city?
    That would be really annoying for the player, as the advisor would appear lots of times each turn (at least that annoys me ).

    It would be better to have a background script that would check the money of the AI at the beginning (or end) of the turn, and would give money in case the AI resources were very low.

  3. #3
    Now sporting a classic avatar! Member fallen851's Avatar
    Join Date
    Oct 2005
    Posts
    799

    Default Re: Creating a money script

    "script
    declare_counter loop
    set_counter loop 0

    monitor_event FactionTurnStart Treasury < 10000
    and FactionType romans_julii
    and not I_LocalFaction romans_julii

    console_command add_money romans_julii, 10000

    end_moniwhile
    I_CompareCounter loop = 0
    end_while
    end_script"



    Ok so there is my script (if there are any problems tell me!), with one of those for each faction. Now I want to create a trigger, so that this script will be activated once and only once after I click on an army or a city (sorry for the confusion, the advisor only appears once, similar to what you outlined above).

    So how do I create the trigger in the advice text for this?
    Last edited by fallen851; 02-14-2006 at 01:40.
    "It's true that when it's looked at isolated, Rome II is a good game... but every time I sit down to play it, every battle, through every turn, I see how Rome I was better. Not unanimously, but ultimately." - Dr. Sane

    http://www.youtube.com/watch?v=L6eaBtzqqFA#t=1h15m33s

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

    Default Re: Creating a money script

    Quote Originally Posted by fallen851
    Now I want to create a trigger, so that this script will be activated once and only once after I click on an army or a city (sorry for the confusion, the advisor only appears once, similar to what you outlined above).

    So how do I create the trigger in the advice text for this?
    I tried to do the same, but the advisor appeared each time I clicked in each settlement.
    In view of that, I used the F1 key to launch the script in the way explained in this thread:
    https://forums.totalwar.org/vb/showthread.php?t=59729

  5. #5

    Default Re: Creating a money script

    You need to use the suspend_unscripted_advice command to prevent it being triggered twice.
    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

  6. #6
    Simulation Monkey Member The_Mark's Avatar
    Join Date
    Dec 2004
    Location
    Helsinki, Finland
    Posts
    2,613

    Default Re: Creating a money script

    Quote Originally Posted by Epistolary Richard
    You need to use the suspend_unscripted_advice command to prevent it being triggered twice.
    Preferably within that last loop, there are some events that cancel the suspend command.

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