Page 3 of 4 FirstFirst 1234 LastLast
Results 41 to 60 of 70

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

  1. #41

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

    The
    Parameter CharacterName
    bit in your advice thread looks a bit out of place - is that meant to be there or did it just get copied over from something else?

  2. #42
    Caligula Caesar's Avatar Horse Lord
    Join Date
    Dec 2008
    Location
    England
    Posts
    5,510

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

    @HoH: what do you mean?

    @makanyane: Since I don't really know what I am doing, I copied another entry and changed the necessary things. That ceratainly wasn't meant to be there.
    Last edited by Caligula Caesar; January 30, 2009 at 03:05 PM.

  3. #43

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

    Your advice thread
    AdviceThread Saka_Thread 1
    GameArea Campaign
    Item Saka_Thread 1
    Suppressible y
    Uninhibitable
    Verbosity 3
    Threshold 1
    MaxRepeats 0
    RepeatInterval 3
    Attitude Normal
    Presentation Default
    Parameter CharacterName
    Title Saka
    Script scripts\show_me\Saka_Armies.txt
    Text 4tpy_Text_01_Text1
    looks like the threads that are normally used for things triggered by character related stuff like
    Code:
    ;------------------------------------------
    AdviceThread Character_Details_Be_A_General_Thread
        GameArea Campaign
    
        Item Character_Details_Be_A_General_Text_01
            Suppressible y 
            Uninhibitable
            Verbosity  3 
            Threshold  1 
            MaxRepeats  0 
            RepeatInterval  3 
            Attitude Normal
            Presentation Default
            Parameter CharacterName
            Title Character_Details_Be_A_General_Text_01_Title
            Text Character_Details_Be_A_General_Text_01_Text1
            Text Character_Details_Be_A_General_Text_01_Text2
            Text Character_Details_Be_A_General_Text_01_Text3
    which is triggered from ' WhenToTest CharacterPanelOpen'
    if you're triggering from
    'WhenToTest SettlementSelected'
    then it maybe isn't returning a CharacterName parameter...

    if you look at HouseOfHam's other thread http://www.twcenter.net/forums/showthread.php?t=169689
    the advice suggested is:
    Code:
    ;------------------------------------------
    AdviceThread BackgroundScriptThread
        GameArea Campaign
    
        Item BackgroundScriptItem1
            Uninhibitable
            Verbosity  0
            Threshold  1
            MaxRepeats  0
            RepeatInterval  1
            Attitude Normal
            Presentation Default
            Title BackgroundScriptTitle1
            On_display scripts\show_me\background_script.txt
            Text BackgroundScriptText1
    without that bit - I was wondering if that was part of problem

    EDIT: - missed your edit, before posting that, try without that line and see if it works....

  4. #44
    Caligula Caesar's Avatar Horse Lord
    Join Date
    Dec 2008
    Location
    England
    Posts
    5,510

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

    Now I get a CTD as soon as I select a settlement.

  5. #45

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

    I'm guessing that now the advice thread is actually triggering but that you didn't add the required text to
    data/text/export_advice.txt
    when you added the new thread...??

    if you had
    Title Saka
    and
    Text 4tpy_Text_01_Text1

    you'd have needed:
    {Saka} blah, blah
    and
    {4tpy_Text_01_Text1} blah blah

    lines in the text file so it had something to look up for text to be displayed in game when that thread was called, otherwise it will crash...

  6. #46
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

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

    Yep, that looks like the most likely reason.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  7. #47
    Caligula Caesar's Avatar Horse Lord
    Join Date
    Dec 2008
    Location
    England
    Posts
    5,510

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

    Actually, I just copied the Text 4tpy_Text_01_Text1 from the 4 turns per year script because I wasn't sure where I was supposed to put a new one (presumably export_advice), so that shouldn't be a problem. Is there an "...enums" file or whatever they are called where I have to list the scripts in curly brackets? I haven't done that.

  8. #48

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

    the enums files aren't actually used by RTW if it's patched to version 1.5/ BI 1.6,

    how about the
    Title Saka
    bit though? whatever you have after 'Title' also needs an entry in export_advice, eg.
    {Saka} xxxxxxxx

  9. #49
    Caligula Caesar's Avatar Horse Lord
    Join Date
    Dec 2008
    Location
    England
    Posts
    5,510

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

    It works now. The only problem is that it overwrites the 4tpy script. I think I need to change the trigger somehow.

  10. #50
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

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

    What? Are you trying to run 2 background scripts at once? Just merge the monitor_event block into the 4tpy script (before the first date change line there) and remove the Saka_thread and its trigger.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  11. #51

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

    I've got a question, what does the numbers at the end mean?

    Spoiler Alert, click show to read: 

    "roman slinger" 3 2 0 0

  12. #52

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

    3 units (of slingers), 2 experience each, 0-level armour upgrades, 0-level weapon upgrades.

  13. #53

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

    Okay.

    Got another question!

    Does the, this is just an example, "soldier 240" command used in historical battles to determine the size of units work in a script?

  14. #54

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

    Now, scripts can define only the number of units, the units get spawned at full strength of their default unit size though.

  15. #55

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

    Hmm, would appear that making a line like this:

    Code:
    unit hellenistic infantry spartiateshoplitai, soldiers 99 exp 1 armour 0 weapon_lvl 0
    would make the unit appear with 99 soldiers in the unit.

  16. #56
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

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

    This post explains the spawn_army command parameters in more detail. I think it will answer most of your questions.
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

  17. #57
    Sotogo's Avatar Foederatus
    Join Date
    Jul 2009
    Location
    The Netherlands
    Posts
    39

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

    Hi i need someone to help me with the spawning of armies for my submod for Roma Surrectum

    Leader of 100BC. The last years of the Republic
    Working on World At War Text Mod for SS and KGCM

  18. #58
    Senator
    Join Date
    Apr 2009
    Location
    Estonia
    Posts
    1,151

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

    How i can what turn number is?
    I have 4 turn per year script and campaign started at 215 BC.

  19. #59
    Keyser Soze's Avatar Domesticus
    Join Date
    Jul 2008
    Location
    Bratislava
    Posts
    2,437

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

    if I´m right to spawn army is possible only in any date (turn)? it is not possible to spawn army by conditions? for example if player holds several specific regions the army of enemies will spawn?
    sorry my english.

  20. #60
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,760
    Blog Entries
    3

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

    You can use spawn army in whatever condition you feel like. A given date, holding a specific region, a specific event occurs, a building is built, etc. It's just a matter of creating the correct script to fire at the correct moment.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

Page 3 of 4 FirstFirst 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
  •