How can I make unique bots, such as one King amongst 50 bots?

Users who are viewing this thread

elhermoso

Recruit
(for warband multiplayer)
I've made a multiplayer faction and everything, with archers, horsemen, infantry (ai and human classes) etc. I want to add in another AI troop called "The King" or something, and I want only one of them to spawn (ie. at any time). So when I choose to go up against 50 or 100 bots in battle mode, I want only one "King" and say 49 or 99 regular troops.

I've tried using the flag tf_hero, but I don't know what it does as far as bots go - multiple "heroes" will still spawn like regular troops. The other thing I've tried is just increasing the ratio of the regular AI troops to the "King" troop. For example, have 10 lots of archers defined (in module_troops), 15 lots of infantry, 10 lots of horsemen, and only 1 lot of "King". This way, in a battle against 100, sometimes none will spawn (which is fine), sometimes only 1 will spawn (which is desired), but other times 6 or 7 will spawn, which is not fine.

So is there any way to actually achieve a "unique" or individual bot?
 
in mission_templates.py, find the mission_template: "multiplayer_bt"

Code:
(ti_after_mission_start, 0, ti_once, [],
       [
         (add_visitors_to_current_scene,<entry_no>,<troop_id>,<number_of_troops>, <team_no>, <group_no>),
        ]),

 
Thanks for the reply, that gives me some possibilities. But is there any way to make this faction specific? So if I wanted to battle against the English on a scene, King Richard would spawn, but if I went up against the French, King Louis would spawn (or for the native Swadian King etc.).

Perhaps some "if clause" like try_begin, if faction is "English" then "spawn Richard" (via SonKidd's method above) ... try_else, if faction is "French" then "spawn Louis".

What command can I write to compare factions? For example, what should I put in the bold part here:
(eq, faction?, fac_kingdom_england) -- I'm trying to write the "if faction is "English"" part here.
 
You may with to check out the Module System Syntax link in my sig to help you work through how to 'phrase' statements like these in the module system. Feel free to post in that thread, too, if there are things that could be added/clarified.
 
SonKidd said:
in mission_templates.py, find the mission_template: "multiplayer_bt"

Code:
(ti_after_mission_start, 0, ti_once, [],
       [
         (add_visitors_to_current_scene,<entry_no>,<troop_id>,<number_of_troops>, <team_no>, <group_no>),
        ]),

could you give example?and where exactly you put it?
 
Back
Top Bottom