Unfortunately it's not good news yet but I've managed to figure out some of the correct syntax. Maybe somebody else would pick up from here, maybe Jerome Grasdyke form CA would give us a hint ;) or maybe I'll find out more in the future.
So here is what I've done and the results I've got so far:
I started with the recommended syntax:
I knew already that unit was not recognized, so my first test was with this structure: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 game started but Foedus wasn't anywhere to be seen (the coordinates should have made him show up at the crossroad west of Arretium). I closed the game to see the error message and it said that faction is an unrecognized token. Which means the "official" syntax is incorrect also about faction, not only about unit. Even knowing what doesn't work is a step forward ;)spawn_army
faction romans_julii
character Foedus Chaerea, general, command 0, influence 0, management 0, subterfuge 0, age 20, , x 89, y 80
end
At that moment I realised that the first goal should be to identify what tokens/keywords does that command accept. I removed faction from the structure of the command making it:
The game loaded again with no Foedus on the map. The error message after closing the program was telling me that end is also an unrecognized token.spawn_army
romans_julii
character Foedus Chaerea, general, command 0, influence 0, management 0, subterfuge 0, age 20, , x 89, y 80
end
However romans_julii and character Foedus Chaerea, general, command 0, influence 0, management 0, were parsed and accepted as valid.
Next logical step was to remove end and see what happens. I expected of course problems because there was no way the computer would know what units should go into Foedus' stack.
The game progressed as far as the end of the loading bar but then crashed to desktop without of an error message. Now this was actually good news, because crashing at the end of the loading bar without an error message means the computer had actually tried to put Foedus on the map. So I turned to the descr_strat.txt to take a closer look at the syntax used there for putting troops on the map.
Here is a sample for Julii:
and here is one for the rebles:character Flavius Julius, named character, leader, command 0, influence 0, management 0, subterfuge 0, age 47, , x 89, y 82
traits GoodCommander 2, NaturalMilitarySkill 1, GoodDefender 1, PoliticsSkill 3, GoodAdministrator 2, Austere 1
ancillaries aged_retainer
army
unit roman generals guard cavalry early exp 1 armour 0 weapon_lvl 0
unit roman hastati exp 1 armour 0 weapon_lvl 0
unit roman hastati exp 1 armour 0 weapon_lvl 0
unit roman triarii exp 1 armour 0 weapon_lvl 0
unit roman archer exp 1 armour 0 weapon_lvl 0
I notticed that in both cases the parser that handles descr_strat doesn't need the keyword "end" at the end of the army list. It probably uses the keywords character, character_record or a blank line in order to decide when the army list ends. Also I've noticed the army keyword at the begining of the army list.character, sub_faction carthage, Gelon, general, command 0, influence 0, management 0, subterfuge 0, age 20, , x 96, y 19
army
unit carthaginian city militia exp 1 armour 0 weapon_lvl 0
unit carthaginian city militia exp 1 armour 0 weapon_lvl 0
My new test was with this structure:
Of course I was expecting unit to return error, but the purpose was to see if army is accepted or not. The game loaded, Foedus was nowhere and after closing RTW the error message said that unit was not recognized. Which means that army is an accepted keyword for the spawn_army command.script
spawn_army
romans_julii
character character Foedus Chaerea, general, command 0, influence 0, management 0, subterfuge 0, age 20, , x 89, y 80
army
unit roman generals guard cavalry early exp 1 armour 0 weapon_lvl 0
unit roman hastati exp 1 armour 0 weapon_lvl 0
unit roman hastati exp 1 armour 0 weapon_lvl 0
unit roman triarii exp 1 armour 0 weapon_lvl 0
unit roman archer exp 1 armour 0 weapon_lvl 0
end_script
I think this discovery is important for two reasons:
1) It's an undocumented feature, unknown to the modding comunity till now (as far as I can tell);
2) The fact the undocumented token is accepted makes me think that probably the command is operational but we don't know the right syntax for it.
The next structure tried was:
which allowed the game to load but upon exit showed that roman is an unrecognized token. It was kind of what I was expecting because the units are either refered to like unit roman generals guard cavalry early (keyword unit in front, descr_strat.txt style) or "roman generals guard cavalry early" (with quotes, like in console_command create_unit "Gaius Julius" "roman generals guard cavalry early") and I haven't used any of those forms.script
spawn_army
romans_julii
character character Foedus Chaerea, general, command 0, influence 0, management 0, subterfuge 0, age 20, , x 89, y 80
army
roman generals guard cavalry early exp 1 armour 0 weapon_lvl 0
roman hastati exp 1 armour 0 weapon_lvl 0
roman hastati exp 1 armour 0 weapon_lvl 0
roman triarii exp 1 armour 0 weapon_lvl 0
roman archer exp 1 armour 0 weapon_lvl 0
end_script
Putting in quotes the units' names also didn't help. Then I thought that maybe the command would look up the units in some table based on their rank, so i replaced the whole unit lines with numbers. The numbers themselves were considered unrecognized tokens.
To summarize, we know now that:
1) faction names are accepted;
2) army is accepted;
3) end and unit are not accepted;
4) unit names are not accepted neither with nor without quotes;
5) numbers instead of unit names seem not to work either
6) the game does try to put the army on the map if the command contains only accepted tokens/keywords but crashes because so far we don't know how to add units. So what we need to research now is the accepted encoding for units for this command.
I'll keep trying various formats for coding the units. Maybe Jerome Grasdyke would be kind enough to point us in the right direction.
Edit:
After some more testing I discovered that traits is accepted but ancillaries not
Bookmarks