Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 62

Thread: How-to: Spawn an army (spawn_army command: a closer look)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    I'm curious about the use of "TrueCondition" in the above recruitment script posted by HOH. What is it that this does? I was discussing it with GED the other day and wasn't seeing why it was any more advantageous to use TrueCondition than to just create an event with no conditions. Does RTW require a condition for each event, and thus it's legacy in M2? Or is the condition perhaps aiding the if statements, because I've never gotten a trigger-requiring condition to fire in an if statement.

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

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Quote Originally Posted by Augustus Lucifer View Post
    Does RTW require a condition for each event, and thus it's legacy in M2?
    Yes, RTW does. I don't have M2, but I'm pretty sure it requires a condition, as well.
    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

  3. #3

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Great Tutorial

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

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Obviously, if you use the same spawn_army command more than once (without following/preceding it with console_command kill_character to prevent it), you will have multiple generals with the same name. In theory, one/both of them could get adopted into the family and cause a ctd when they die at some future point, but I don't think anyone has actually demonstrated this.

    Clone ctds are much more common as a result of having generals who are not attached to a family tree in descr_strat.txt.
    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

  5. #5

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Once you have spawned an army how do you write a script forcing the spawned army to siege a city? I thought that there was a tutorial for this, but I can't find it.
    "What's the matter, kid? Don't ya like clowns?
    Don't we make ya laugh? Aren't we freakin' funny?" - CPT Spaulding in Devil's Rejects

  6. #6
    chris10's Avatar Primicerius
    Join Date
    Sep 2009
    Location
    Spain
    Posts
    3,239

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Quote Originally Posted by HouseOfHam View Post
    Obviously, if you use the same spawn_army command more than once (without following/preceding it with console_command kill_character to prevent it), you will have multiple generals with the same name. In theory, one/both of them could get adopted into the family and cause a ctd when they die at some future point, but I don't think anyone has actually demonstrated this.

    Clone ctds are much more common as a result of having generals who are not attached to a family tree in descr_strat.txt.
    I had a small conversation a few days ago in the RSII forum about clone CTD and Tone said that caracters have to be real clones (same name, traits,retinue,age,influence,command,management etc) and to be honest I was a bit astonished as mathematically it is highly unlikely that there can be 2 real clone Caracters for one Faction when having in mind all possible combinations of traits and abilitys .
    Iam confused as the info regading this issue is different everytime I read something about it.
    As well Dvk901 said that the game adds internally A,B,C,D to Gaius Julius Ceasar so that in fact there can be 4 of them with the same name AGaius,BGaius and so on while on the screen players only see the name.
    So...summarizing what you just said and what tone and dvk901 said:
    Nothing is clear,everybody is guessing and just assuming certain things but nobody knows it for sure......
    Is that basically it ?
    Last edited by chris10; December 09, 2010 at 05:19 AM.

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

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Only possible in M2TW. RTW doesn't have that command.

    ps: There is a way to set up descr_strat.txt so campaign starts with an army already besieging a settlement, but I'm guessing that's not what you want.
    Last edited by HouseOfHam; May 27, 2010 at 10:34 AM.
    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

  8. #8
    Blackwolf's Avatar Ordinarius
    Join Date
    Dec 2009
    Location
    Arizona, USA
    Posts
    702

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    This question I have might be somewhere already in the many posts before mine, but where exactly am I supposed to place the script code(s)? I thought it would go under the faction in data\world\maps\campaign\my_campaign\descr_strat but I guess not.

  9. #9
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

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

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    You're likely going to want to put in into a background script. If the mod you're altering has one toss it in at the end before loop to keep things going otherwise look at the background script tutorial in this forum.
    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

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

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    There are 2 places script code can go to:
    - campaign script, called at the very end of descr_strat.txt
    - background script, called using the export_descr_advice.txt thread/trigger mechanism, usually a file in scripts/show_me, but can be anywhere you point the thread to

    ps: heh, "script codes" sounds like "bank moneys" or "house electricities". It's a non-count noun.
    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. #11
    Blackwolf's Avatar Ordinarius
    Join Date
    Dec 2009
    Location
    Arizona, USA
    Posts
    702

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Oh ok. Because I am currently trying to make one of my own campaign maps again with this script included.

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

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Is something in what they said in disagreement with what I said?

    ps: Considering that none of us have access to the game's source code, it's all based on observation and experimentation. It might not be 100% accurate all the time, but usually is.
    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

  13. #13
    chris10's Avatar Primicerius
    Join Date
    Sep 2009
    Location
    Spain
    Posts
    3,239

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Quote Originally Posted by HouseOfHam View Post
    Is something in what they said in disagreement with what I said?

    ps: Considering that none of us have access to the game's source code, it's all based on observation and experimentation. It might not be 100% accurate all the time, but usually is.
    welll...dvk stated that the clone CTD where more a problem with the "adopted" and you are saying its the "not attached to a family tree"....this is indeed a little contradiction...but well...no prob...maybe a question of interpretation...

    Could this Problem not be solved by simply increasing the name pool of each faction and giving spawned Generals an advanced age and a fair amount of traits and abilitys thus making it mathematically nearly impossible getting a clone into the game before they die ?
    I assume that the game will not remember the dead and take them into consideration when it goes CTD because of a clone...that would be really nasty
    Last edited by chris10; December 09, 2010 at 01:19 PM.

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

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Why go to all that trouble when using console_command kill_character before spawn_army insures you won't ever run into that problem?
    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

  15. #15
    chris10's Avatar Primicerius
    Join Date
    Sep 2009
    Location
    Spain
    Posts
    3,239

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Quote Originally Posted by HouseOfHam View Post
    Why go to all that trouble when using console_command kill_character before spawn_army insures you won't ever run into that problem?
    yeah..thats clear..but it does not answer the question, does it?
    With patch 2.1 for RSII Tone killed all Generals of the spawning emergency Armys which is...hmmm..a pity (he himself admitted it) to say at least because it is a bit different fighting battles against Generals Armys or only against a bunch of units and I wonder If by Re-editing the existing script (making the spawning generals old with lots of traits) would maybe solve the problem of clone CTD.
    Last edited by chris10; December 09, 2010 at 01:45 PM.

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

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    You know, there is a reason they added the random_name feature to spawn_army in M2TW.
    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. #17
    chris10's Avatar Primicerius
    Join Date
    Sep 2009
    Location
    Spain
    Posts
    3,239

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    It seems like that slave armys can not be spawned in any way.
    Its 100% CTD
    I tried it in any form:

    monitor_event FactionTurnEnd FactionType "player"
    monitor_event FactionTurnStart FactionType "player"
    monitor_event SettelmentTurnEnd SettelmentName "xxxx"

    when its a slave army it goes always CTD....
    so maybe the explanaition "not to spawn during slave turn" should be made a bit clearer like "slaves can not be spawned under any condition"

    or did somebody found a way ?

  18. #18
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    I think you can only spawn a slave army with a 'named character' and not with a 'general' as the leader - pretty sure it's only trying to use the general that causes the CTD

    not spawning during slave turn is probably slightly different issue.

  19. #19
    chris10's Avatar Primicerius
    Join Date
    Sep 2009
    Location
    Spain
    Posts
    3,239

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Quote Originally Posted by makanyane View Post
    I think you can only spawn a slave army with a 'named character' and not with a 'general' as the leader - pretty sure it's only trying to use the general that causes the CTD

    not spawning during slave turn is probably slightly different issue.
    The army had a named character but I used console_command kill character in the script to avoid the clone CTD at a later stage.
    Not sure if this could cause the CTD ?! ...are you sure that I have to let him alive ? (lol...was that the question god had to ask himself when he made Adam ?... "Should I let him alive? Maybe he will cause me a CTD in Paradise " ...what finally he did )

    EDIT: Nevermind....I made it work...only thing that does not work is give_trait while give_ancillary works perfect
    Last edited by chris10; December 20, 2010 at 07:17 PM.

  20. #20

    Default Re: How-to: Spawn an army (spawn_army command: a closer look)

    Hi, Houseofham,

    thanks for the guide. I have a question. does name of the spawned generals have to be in descr_names.txt under the faction that owns the generals?

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