Bot classes

Currently viewing this thread:

Nikephoros

Section Moderator
M&BWB
Best answers
0
Is there any way to set the bot numbers AND class types before the battle?

We would like to begin some sort of multiplayer campaign involving bots, but right now we are facing the huge limitation of the equal distribution of bot classes (on 100 bots, 34 will be footmen, 33 ranged and 33 cavalry, for example).

Is there any way to change it somehow?

(p.s. i know bots are dumb etc., but that's not the point).
 

Dante.

Reverse Fake ID
Grandmaster Knight
M&BWBWF&SNW
Best answers
0
I thought you could choose the percentage ratio of class types?
 

Arch3r

Count
M&BWBNW
Best answers
0
Nikephoros said:
Is there any way to set the bot numbers AND class types before the battle?

We would like to begin some sort of multiplayer campaign involving bots, but right now we are facing the huge limitation of the equal distribution of bot classes (on 100 bots, 34 will be footmen, 33 ranged and 33 cavalry, for example).

Is there any way to change it somehow?

(p.s. i know bots are dumb etc., but that's not the point).
Well, certainly there is a way, just look at how multiplayer spawns bots. I don't even think "(on 100 bots, 34 will be footmen, 33 ranged and 33 cavalry, for example)." is true as I'm pretty sure it's random. But I was planning on making the same thing so why not have a look at it now.

It seems to do the spawning in the mission_template trigger called
Code:
multiplayer_server_spawn_bots
in a rather complicated code that spawns one selected troop, the troop selection is based on what the player has selected in the equipment menu (if anything is selected at all). It selects a troop by calling this script:
Code:
script_multiplayer_find_bot_troop_and_group_for_spawn
It's probably a good idea to just rewrite this whole thing, as it seems way to complicated for what it's supposed to do.

EDIT: I'd probably go for a manage bots menu for admins, where you can select how bots you want of type 1 for team one, how many of type 2, etc. Maybe even go as far as selecting a player and than assigning him these bots. Allows for much more flexible and transparent bots assigning and would make it perfect for stuff like campaigns or bot battle events.
 

apsod

Master Knight
M&BWBNW
Best answers
0
Hey Arch3r, what about the script you used in Full Invasion, it spawns specific bots in specific numbers, doesn`t it?
 

Arch3r

Count
M&BWBNW
Best answers
0
apsod said:
Hey Arch3r, what about the script you used in Full Invasion, it spawns specific bots in specific numbers, doesn`t it?
Yes, it sort of does, but it just cycles randomly through all the troops belonging to a certain wave and spawns these.