Page 4 of 4 FirstFirst 1234
Results 91 to 98 of 98

Thread: Scripting

  1. #91

    Default Re: Scripting

    I have found a thing that could be interest you :

    AdviceThread Seasons_Thread 0

    If we replace the number from 1 to 0 then advice thread will run every turn .
    Please anyone know email of CA coder ?

  2. #92

    Default Re: Scripting

    I'm trying to write a script that gives missions to other factions beside the Romans. I have three questions:

    (1) Did the problem with restarting a script after reload ever get solved?
    (2) Where is the scripting manual that was mentioned above?
    (3) Is there a command that triggers a message?

  3. #93
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: Scripting

    Hi DimeBagHo, and welcome to the forums. The problem of restarting a script was corrected using a roundabout way by relaunching it every time you load. Check out the several turns a year thread in the general forum for more details..

    There is no scripting manual as such, just a list of commands with a few notes. Is this what you mean?

    I don't think there is a command that triggers a general message, but there is a command which allocates senate missions... I think it might be a console command, I can't remember off the top of my head, but it does exist.

  4. #94

    Default Re: Scripting

    Thanks Myrddraal. I'm trying to set up missions for a Greek Cities mod. Unfortunately giving Senate missions to the Greeks causes a CTD (no big surprise there). I think I might be able to use the advice system to do it though.

  5. #95

    Default Re: Scripting

    Sorry, perhaps I missed that posting, but I was unable to locate a description of how to write and run a script. Okay, perhaps It's not here because you all know how to ;)

    It seems to be a simple .txt-file and is located in data/scrips or in the campaign-folder? Can it be run in the command line itself? Or can I edit the strat-file like in the prologue, so it's executed after beginning? Because Thrace caused a ctd in my game (the problem seems to be solved) Simetrical suggested to create a script including this:

    script
    console_command kill_faction thrace
    end_script

    But how to run? I tried several things but I always get the message "err. command not recognized"

  6. #96
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: Scripting

    Read this:
    https://forums.totalwar.org/vb/showthread.php?t=44648

    Contains instructions on how to run a script using a show_me script.

  7. #97

    Default Re: Scripting

    okay i know this is nearly a decade after the last post but if someone still reads this coud you help me i have an error with my script and or advice thread

    my advice thread:
    ;------------------------------------------
    AdviceThread My_Script_Thread
    GameArea Campaign

    Item my_script_Item_1
    Uninhibitable
    Verbosity 0
    Threshold 1
    MaxRepeats 0
    RepeatInterval 1
    Attitude Normal
    Presentation Default
    Title my_script_Title_1
    On_display scripts\show_me\my_script.txt
    Text my_script_Text_1



    ;------------------------------------------

    my trigger:
    ;------------------------------------------
    Trigger my_script_trigger_1
    WhenToTest ButtonPressed

    Condition I_ThreadCount My_Script_Thread = 0

    AdviceThread My_Script_Thread 1

    ;------------------------------------------
    Trigger my_script_trigger_2
    WhenToTest CharacterSelected

    Condition I_ThreadCount My_Script_Thread = 0

    AdviceThread My_Script_Thread 1

    ;------------------------------------------
    Trigger my_script_trigger_3
    WhenToTest SettlementSelected

    AdviceThread My_Script_Thread 1

    My script:
    script
    spawn_army
    faction romans_julii
    character Flavius Julius, general, command 0, influence 0, management 0, subterfuge 0, age 20, x 95, y 77
    unit roman generals guard cavalry early, soldiers 25 exp 3 armour 1 weapon_lvl 1
    unit roman hastati, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman hastati, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman hastati, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman hastati, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman hastati, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman principes, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman principes, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman principes, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman principes, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman principes, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman light cavalry, soldiers 108 exp 3 armour 1 weapon_lvl 1
    unit roman light cavalry, soldiers 108 exp 3 armour 1 weapon_lvl 1
    unit roman light cavalry, soldiers 108 exp 3 armour 1 weapon_lvl 1
    unit roman light cavalry, soldiers 108 exp 3 armour 1 weapon_lvl 1
    unit roman triarii, soldiers 162 exp 3 armour 1 weapon_lvl 1
    unit roman triarii, soldiers 162 exp 3 armour 1 weapon_lvl 1
    unit roman triarii, soldiers 162 exp 3 armour 1 weapon_lvl 1
    unit roman velite, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman velite, soldiers 160 exp 3 armour 1 weapon_lvl 1
    unit roman velite, soldiers 160 exp 3 armour 1 weapon_lvl 1
    end_script



    could someone help and mebay fix it for me that would be appriciated

  8. #98

    Default Re: More than 2 turns a year?

    Hi Did this work

Page 4 of 4 FirstFirst 1234

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