View Full Version : Adding & Removing Units via Console Command
Centurio Nixalsverdrus
07-27-2008, 18:39
Hi,
I fought a huge battle but unfortunately the game ctd'ed afterwards. So I replayed the battle with "auto_win defender", but you all know that the computer doesn't fight so well as you do. So I need to remove a bunch of Apeleutheroi fellas from Sidon.
How do I add or remove units via console command? What do I have to type in?
add_unit "apeleutheroi" Sidon
remove_unit "apeleutheroi" Sidon
:huh: How about that? Thank you. :smiley:
Connacht
07-27-2008, 19:06
As far as I know the "auto_win" command works only with automatically resolved battles, not if you choose to command directly your army.
For adding unit, the command is:
create_unit City/Character "internal name of the unit" #,#,#,#
The internal name of the unit is displayed in the export_descr_units file, in example the one of the freed slaves is "generic militia" if I don't remember bad, while for elite Seleucid phalanxes it is "hellenistic infantry argyraspidai". The four # aren't required and you can leave them, but if you want to create more units and choose their experience and weaponry upgrade they should be replaced with numbers.
So in example:
create_unit Rome "roman infantry polybian triarii" 3,8,2,1
This creates in Rome three Triarii with eight xp levels (two gold mark), two levels of upgrader armor (silver) and one level of upgraded weapon (bronze).
If you simply write:
create_unit Rome "roman infantry polybian triarii"
You'll get one clean triarius without upgrades.
You can add any unit you want unless the stack is full, but you need to give units to a city or to a character, you can't create an army from nothing in the map.
Again as far as I know, there isn't a remove_unit cheat, so enemy units must be killed in the traditional way. However your units can be disbanded by right clicking on them and pressin the specific button on the left of their scroll.
I hope I cleared your doubts. ;)
The "remove enemy unit cheat" is to create a unit by script (or easier, add_money if you can spare the recruitment slot in a city), then teleport it over and use auto_win, finally disbanding the extra created unit.
Centurio Nixalsverdrus
07-28-2008, 17:55
Thank you for the detailed explanation Connacht.
Bovi, sorry I don't get what you mean. :shrug:
*Create a unit or select one from a city you own
*Teleport it to the enemy army that you want gone
*Auto_win to win the battle against the enemy you want gone
*Disband your teleported unit.
*Add money to recompense for the unit you sent to do the work
Voila! You have cheated and the enemy unit is removed.
Centurio Nixalsverdrus
07-29-2008, 01:23
OK, but the problem is that auto_win does not delete the enemy units. There are always soldiers left and the enemy just retreats in most cases.
What's the cheat for teleporting?
move_character "xxx" ###,### ###,###
that way? What when the unit has a captain?
move_character "Captain Carrot" x,y
Does it matter that he has a unit with 10 people left? Anyway, that's as close as you get. It's a workaround.
Centurio Nixalsverdrus
07-30-2008, 00:01
Do Makedonians use internal names? Or just "Menelas Argeades" with space between the names?
show_cursorstat is the command to find out the coordinates, right?
Sorry for buggering. I just slaughtered that slave scum in Sidon yesterday btw. :2thumbsup:
vBulletin® v3.7.1, Copyright ©2000-2025, Jelsoft Enterprises Ltd.