Results 1 to 30 of 44

Thread: Some modest results with spawn_army

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member Dromikaites's Avatar
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    151

    Default Re: Some modest results with spawn_army

    Hi!

    Some more tests with negative results. Still they're worth reporting so other people know what was tried already (helps saving time).

    I tried feeding the names of those mercenary units that are offered as rewards by the Senate ("you will be given an exotic unit"). My assumption is they are hardcoded because they seem to be always the same. Here is the list:
    merc barbarian cavalry

    merc numidian cavalry

    merc barbarian infantry

    merc greek hoplites

    merc rhodian slingers

    merc sarmatian cavalry

    merc horse archers

    merc elephants

    merc bastarnae


    Unfortunately they don't work (error report: "unrecognized token merc"). Maybe only rebels can be spawn? Jerome, please help!!!!

  2. #2

    Default Re: Some modest results with spawn_army

    Maybe try with underscores instead of spaces, i.e. merc_numidian_cavalry, or else try to find some other identifiers for those units that are a single word. Clearly the game gets caught up by the fact that there's more than one word in the identifier, i.e. 1) merc 2) numidian 3) cavalry (because in the error, it shows you that it sees, and does not understand only the first word). Therefore, try to find ways in which to pass that unit in as a ONE word. If this is a general problem for the game to find it hard to process identifiers that consist of multiple words, then there MUST be a description somewhere where a single word is also assigned to the same army, OR it is assumed by convention that the multiple-word identifier is equivalent to some single-word version. Usually, in RTW, this means that

    "word1 word2" = "word1_word2"
    Last edited by SigniferOne; 09-19-2005 at 20:59.

  3. #3
    CA CA JeromeGrasdyke's Avatar
    Join Date
    Dec 2002
    Location
    At a new top-secret (non-CA) location, surrounded by lots of steel and glass, high atriums, hordes of lovely marketing ladies, and with a new and spacious desk with plenty of room for body-moving.
    Posts
    257

    Default Re: Some modest results with spawn_army

    Hm, have you guys ever seen the docudemon output for the scripting language? I believe I've mentioned it before, but it's these three text files... they're a bit long so i'm not going to quote them, but these are the file names:

    docudemon_commands.txt
    docudemon_conditions.txt
    docudemon_events.txt
    "All our words are but crumbs that fall down from the feast of the mind."
    -- from 'The Prophet' by Kahlil Gibran

  4. #4
    Ja mata, TosaInu Forum Administrator edyzmedieval's Avatar
    Join Date
    May 2005
    Location
    Fortress of the Mountains
    Posts
    11,441

    Default Re: Some modest results with spawn_army

    Thanks for throwing us a magic wand, Jerome.

    And excellent Dromikaites. Romanians rule!!!
    Ja mata, TosaInu. You will forever be remembered.

    Proud

    Been to:

    Swords Made of Letters - 1938. The war is looming in France - and Alexandre Reythier does not have much time left to protect his country. A novel set before the war.

    A Painted Shield of Honour - 1313. Templar Knights in France are in grave danger. Can they be saved?

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

    Default Re: Some modest results with spawn_army

    Nice to see you here, Jerome

    Yes, they are our holy documents, we have a whole thread dedicated to them here, pretty much everything we use is from those. The problem is that they seem to be outdated, so there are quite a lot of commands that don't work for us, e.g. the spawn_army command.

  6. #6
    Member Member Stuie's Avatar
    Join Date
    Aug 2001
    Location
    Upper Gwynedd, PA
    Posts
    406

    Default Re: Some modest results with spawn_army

    Quote Originally Posted by The_Mark
    Nice to see you here, Jerome

    Yes, they are our holy documents, we have a whole thread dedicated to them here, pretty much everything we use is from those. The problem is that they seem to be outdated, so there are quite a lot of commands that don't work for us, e.g. the spawn_army command.
    Problem is, we're working off the ones that came with the demo. I don't think anyone has found them (if they exist) in the final release.

    If some nice developer were to release them... I'm sure we could pool our money for a case of lager or something as a reward.


  7. #7
    CA CA JeromeGrasdyke's Avatar
    Join Date
    Dec 2002
    Location
    At a new top-secret (non-CA) location, surrounded by lots of steel and glass, high atriums, hordes of lovely marketing ladies, and with a new and spacious desk with plenty of room for body-moving.
    Posts
    257

    Default Re: Some modest results with spawn_army

    Ok, i've had a quick look at spawn_army for you... the syntax you worked out above is essentially correct -- the command expects a sequence of "unit" commands followed by unit id's as phrases ... the following should work:

    spawn_army
    faction romans_julii
    character Foedus Chaerea, general, command 0, influence 0, management 0, subterfuge 0, age 20, x 89, y 80
    unit roman generals guard cavalry, soldiers 20 exp 9 armour 1 weapon_lvl 0
    unit roman legionary first cohort ii, soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman legionary cohort ii, soldiers 60 exp 0 armour 0 weapon_lvl 0
    unit roman praetorian cohort i, soldiers 60 exp 0 armour 0 weapon_lvl 0
    end

    The reason why unit and end appeared not to be recognised was because the data after and before (respectively) were incomplete.

    This error is typical; understanding the Rome descr parser could have helped some. Essentially it works by parsing Words, which are letter sequences ended by whitespace, Phrases, which are word sequences ended by comma's, and Lines, which are word and phrase sequences ended by newline characters. In this case, there had to be a phrase terminator (comma) after the unit id, because otherwise the parser couldn't know where the unit id ends as a unit id is a phrase - a sequence of arbitrary words.

    This is why some identifiers in the game use underscores and others not - internally some things are typed as Words and others as Phrases. If you look out for this kind of pattern it may help you spot wrongly-formed scripts... I'll see about getting you guys some docudemon files up-to-date for Barbarian Invasion.
    Last edited by JeromeGrasdyke; 09-20-2005 at 14:56.
    "All our words are but crumbs that fall down from the feast of the mind."
    -- from 'The Prophet' by Kahlil Gibran

  8. #8
    Member Member Stuie's Avatar
    Join Date
    Aug 2001
    Location
    Upper Gwynedd, PA
    Posts
    406

    Default Re: Some modest results with spawn_army

    Quote Originally Posted by JeromeGrasdyke
    I'll see about getting you guys some docudemon files up-to-date for Barbarian Invasion.



    Thanks Jerome!!

  9. #9

    Default Re: Some modest results with spawn_army

    Will someone be making a small tutorial on how this is done. ie. which files to put the script into. Kinda new to this. Thnx

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

    Default Re: Some modest results with spawn_army

    BTW, I have used call_object_shortcut before and it works fine

  11. #11
    Member Member Dromikaites's Avatar
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    151

    Default Re: Some modest results with spawn_army

    Yes, I can confirm that Jerome's sintax works!


    Thank you very much, Jerome!
    Last edited by Dromikaites; 09-20-2005 at 15:25. Reason: Posted before seeng Jerome's tips

  12. #12
    CA CA JeromeGrasdyke's Avatar
    Join Date
    Dec 2002
    Location
    At a new top-secret (non-CA) location, surrounded by lots of steel and glass, high atriums, hordes of lovely marketing ladies, and with a new and spacious desk with plenty of room for body-moving.
    Posts
    257

    Default Re: Some modest results with spawn_army

    I gave the correct syntax above... look for the comma's
    "All our words are but crumbs that fall down from the feast of the mind."
    -- from 'The Prophet' by Kahlil Gibran

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

    Default Re: Some modest results with spawn_army

    Beautiful.. Simply beautiful. Thank you, Jerome, we are ever in debt to you

    I have one question about this phrase parser, would the SettlementName condition check a multi-word settlement name if it was fed into the command as a phrase? It's a curious problem we have faced, as having a settlement name with two words, separated by whitespace, cannot be checked with the condition. We're even more curious about why the SettlementName condition checks the external name of the settlement, as opposed to the internal tag.. but that's not relevant right now.

  14. #14
    Member Member Dromikaites's Avatar
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    151

    Default Re: Some modest results with spawn_army

    The spawned army of Captain Kaeso:

  15. #15

    Default Re: Some modest results with spawn_army

    Trying the new syntax with the commas, right now.


    EDIT: Success! The syntax works just as Jerome said

    Last edited by SigniferOne; 09-20-2005 at 15:13.

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