Page 1 of 4 1234 LastLast
Results 1 to 20 of 70

Thread: How to:Script spawn armies(make your own spartacus and hannibal!)

  1. #1

    Default How to:Script spawn armies(make your own spartacus and hannibal!)

    NOTE: The example provided here by the author of the tutorial is buggy, please see this post instead.



    hi,
    this is an example for a script spawn army.
    it let you see in the campaign map at a year an army how you want
    a complete new army
    this script helps you to simulate rebellions:like here spartacus or other armies:hannibal,gauls in greece,

    1.all spawn armies beginn with a word called scripts
    2.in the second line,you have to put the name of the faction
    3.in the third line you have to write,after how many turns
    4.all armies get 1 letter like A,B,C
    5.put spawn_army at the top
    6.the the faction again
    7.the character(or the general)+traits+location on the map
    8.the units
    9.then put this:terminate_monitor
    end_monitor
    end_script


    use that as example for a script if you want to do a script spawn army:

    script

    monitor_event FactionTurnStart FactionType slave
    and I_TurnNumber = 415

    if spawn_armyA=0

    spawn_army
    faction slave
    character Spartacus, named character, command 5, influence 5, management 3, subterfuge 2, age 38, , x 104, y 67
    unit aor thrace infantry custom, exp 5 armour 0 weapon_lvl 2
    unit aor thrace infantry custom, exp 5 armour 0 weapon_lvl 2
    unit aor thrace infantry custom, exp 5 armour 0 weapon_lvl 2
    unit aor thrace infantry custom, exp 5 armour 0 weapon_lvl 0
    unit aor italy swordsmen custom, exp 4 armour 0 weapon_lvl 0
    unit aor italy swordsmen custom, exp 4 armour 0 weapon_lvl 0
    unit aor italy swordsmen custom, exp 4 armour 0 weapon_lvl 0
    unit aor italy swordsmen custom, exp 4 armour 0 weapon_lvl 0
    unit aor gaul swordsmen custom, exp 3 armour 0 weapon_lvl 0
    unit aor gaul swordsmen custom, exp 3 armour 0 weapon_lvl 0
    unit aor gaul swordsmen custom, exp 3 armour 0 weapon_lvl 0
    unit aor gaul swordsmen custom, exp 3 armour 0 weapon_lvl 0
    unit aor gaul swordsmen custom, exp 3 armour 0 weapon_lvl 0
    unit aor gaul swordsmen custom, exp 3 armour 0 weapon_lvl 0
    unit aor gaul swordsmen custom, exp 3 armour 0 weapon_lvl 0
    unit aor gaul swordsmen custom, exp 3 armour 0 weapon_lvl 0
    unit aor gaul spearmen custom, exp 3 armour 0 weapon_lvl 0
    unit aor gaul spearmen custom, exp 3 armour 0 weapon_lvl 0
    unit aor gaul spearmen custom, exp 3 armour 0 weapon_lvl 0
    unit aor gaul spearmen custom, exp 3 armour 0 weapon_lvl 0
    set_counter spawn_armyA 1
    end_if


    terminate_monitor
    end_monitor
    end_script


    10.Dont forget to put this .txt file in data\scripts

    EDIT:
    You must also ADD the Script(i dont know a better word)

    See here for how to a show_me script:

    http://forums.totalwar.org/vb/showthread.php?t=46738
    Last edited by Aradan; February 16, 2009 at 02:42 PM.


    Busy!!!

  2. #2
    BNS's Avatar ...
    Join Date
    Feb 2007
    Location
    Miami, FL/U.S.A.
    Posts
    2,103

    Default Re: An example for a script(for all who wants to make a script spawn army)

    thanks alot , now is there a way for these armies to spawn only when i play as a specefic faction, for example when i play as Rome i would like Hannibal and his army to spawn, but if i play as Carthage i dont want Hannibal to spawn....



  3. #3

    Default Re: An example for a script(for all who wants to make a script spawn army)

    i think there isnt any way
    but when you start a game you can put the script from the scripts folder to the desktop and when you play as carthage it dont appears
    and when you play as romans go back and put the txt file to the scripts folder again


    Busy!!!

  4. #4

    Default Re: An example for a script(for all who wants to make a script spawn army)

    Quote Originally Posted by BNS View Post
    thanks alot , now is there a way for these armies to spawn only when i play as a specefic faction, for example when i play as Rome i would like Hannibal and his army to spawn, but if i play as Carthage i dont want Hannibal to spawn....
    Just add to the condtions:

    and I_LocalFaction romans_julii

  5. #5
    KALI's Avatar Senator
    Join Date
    Feb 2005
    Location
    Here and there
    Posts
    1,054

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    Nice tutorial Turk,
    I came, I saw, I went away again.


  6. #6
    Turnus's Avatar il Flagello dei Buffoni
    Join Date
    Oct 2004
    Location
    Melbourne, Australia
    Posts
    1,093

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    Thanks Turk. Are there any other triggers we can use apart from a specific turn?
    Force Diplomacy Modifications for Rise of Persia 2.11 Beta and Roma Surrectum 1.5a.
    Member of S.I.N.
    Under the patronage of Obi Wan Asterix

  7. #7

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    Thanks Kali

    @turnus
    Which trigger do you want?
    Be more specific and i can help you
    Last edited by Turk; April 22, 2007 at 12:01 PM.


    Busy!!!

  8. #8
    Fresco's Avatar Semisalis
    Join Date
    Jun 2006
    Location
    Pescara,Italy
    Posts
    422

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    What's my mistake,I've inserted a file .txt in data/scripts folder for MedTWII(in data of Stainless Steel 3.0,a new mod that have inserted a new faction:Knight_Templar!).
    This is my .txt file:

    script

    monitor_event FactionTurnStart FactionType Knights_Templar
    and I_TurnNumber = 2

    if spawn_armyA=0

    spawn_army
    faction Knights_Templar
    character Karl Roth, named character, command 5, influence 5, management 3, subterfuge 2, age 38, , x 251, y 65
    unit Templar Guard, exp 5 armour 0 weapon_lvl 2
    unit Templar Guard, exp 5 armour 0 weapon_lvl 2
    unit Templar Guard, exp 5 armour 0 weapon_lvl 2
    unit Templar Guard, exp 5 armour 0 weapon_lvl 2
    unit Templar Squires, exp 5 armour 0 weapon_lvl 2
    unit Templar Squires, exp 5 armour 0 weapon_lvl 2
    unit Templar Squires, exp 5 armour 0 weapon_lvl 2
    unit Templar Longbowmen, exp 5 armour 0 weapon_lvl 2
    unit Templar Longbowmen, exp 5 armour 0 weapon_lvl 2
    unit Templar Longbowmen, exp 5 armour 0 weapon_lvl 2
    unit Swiss Guard, exp 5 armour 0 weapon_lvl 2
    unit Templar Longbowmen, exp 5 armour 0 weapon_lvl 2
    unit Templar Longbowmen, exp 5 armour 0 weapon_lvl 2
    unit Templar Longbowmen, exp 5 armour 0 weapon_lvl 2
    set_counter spawn_armyA 1
    end_if


    terminate_monitor
    end_monitor
    end_script
    CAMPIONI del MONDO!!!!!

  9. #9
    Jubal_Barca's Avatar Master Engineer
    Join Date
    Dec 2006
    Location
    Cloud Cuckoo Land
    Posts
    2,355

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    Quote Originally Posted by Fresco View Post
    What's my mistake,I've inserted a file .txt in data/scripts folder for MedTWII(in data of Stainless Steel 3.0,a new mod that have inserted a new faction:Knight_Templar!).
    You're following a RTW tutorial, you want to find one in the M2TW workshop.

    Turk, how do you set the location of the army?
    Sine remo flumine adverso - Latin, 'up the creek without a paddle'.
    Mod leader of Warhammer Total War, Narnia Total War, and A Game of Colleges: Total War



    Under the patronage of Aden of Woodstock, The Black Prince.

  10. #10

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    x 104, y 67

    In my example script are that the map coordiantes of the map
    you have to put the Coordinate at the end of the character line


    Fresco:You have to put the name of the text file(where the script is) at the end of the descr_strat file which is located in data/world/maps/campaign/imperial campaign

    but i am not sure because i havent got m2tw
    Last edited by Turk; April 22, 2007 at 12:05 PM.


    Busy!!!

  11. #11
    Ducenarius
    Join Date
    Nov 2004
    Location
    MA
    Posts
    929

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    is there a way to add actual traits and ancilliaries, rather than just the attributes (command, influence, etc)? i've tried syntax similar to descr_strat, but when i do, the script no longer loads.

  12. #12

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    Last edited by Turk; August 20, 2007 at 11:08 AM.


    Busy!!!

  13. #13
    Ducenarius
    Join Date
    Nov 2004
    Location
    MA
    Posts
    929

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    hi turk,

    may i ask for help about my question concerning traits and ancilliaries?

    is there a way to spawn admirals, diplomats, etc?

  14. #14

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    Characters are spawnable
    diplomats too

    Traits can you add and give traits how much is possible and not hardcoded

    I would suggest you to look at the script folder if you are playing EB because it is the best source to find already existing scripts and learn from them
    Last edited by Turk; May 06, 2007 at 01:39 PM.


    Busy!!!

  15. #15
    boofhead's Avatar Dux Limitis
    Join Date
    Aug 2006
    Location
    Mining Country, Outback Australia.
    Posts
    19,332

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    What would happen if the faction was destroyed by the time the script was triggered off? e.g. if I had Hannibal appear in northern Italy in 218BC but Carthage was destroyed prior to this?

    Also, if Rome was at peace with Carthage at the time, can you script the diplomacy also so that he is at war with Rome the moment he appears?

    I play RTRPE.
    Last edited by boofhead; May 06, 2007 at 06:59 PM.

  16. #16
    Ducenarius
    Join Date
    Nov 2004
    Location
    MA
    Posts
    929

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    Quote Originally Posted by Turk View Post
    Traits can you add and give traits how much is possible and not hardcoded
    huh?

    I would suggest you to look at the script folder if you are playing EB because it is the best source to find already existing scripts and learn from them
    sorry, i don't play EB

  17. #17

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    Quote Originally Posted by boofhead View Post
    What would happen if the faction was destroyed by the time the script was triggered off? e.g. if I had Hannibal appear in northern Italy in 218BC but Carthage was destroyed prior to this?

    Also, if Rome was at peace with Carthage at the time, can you script the diplomacy also so that he is at war with Rome the moment he appears?

    I play RTRPE.
    1.you catch me i dont know but the biggest possibility is that there is nothing which will happen

    2.yes there is a way to make diplomatic scripts


    Busy!!!

  18. #18
    Ducenarius
    Join Date
    Nov 2004
    Location
    MA
    Posts
    929

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    nm - please delete this reply
    Last edited by tai4ji2x; June 04, 2007 at 05:09 AM.

  19. #19

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    Just to answer a prior question:

    Code:
    spawn_army
    faction romans_scipii
    character Publius, admiral, command 5, influence 5, management 1, subterfuge 1, age 34, , x 61, y 125
    unit naval triremes, exp 0 armour 0 weapon_lvl 0
    unit naval triremes, exp 0 armour 0 weapon_lvl 0
    end
    Sorry for invading your thread, Turk

  20. #20
    Ducenarius
    Join Date
    Nov 2004
    Location
    MA
    Posts
    929

    Default Re: How to:Script spawn armies(make your own spartacus and hannibal!)

    i seem to be able to spawn named characters as generals, but not actual family members which have a place on the family tree. is it even possible to spawn actual family members? if so, what's the syntax?

Page 1 of 4 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •