Author Topic: WOB bot system  (Read 3311 times)

The topic of the bot system

My latest creation is pulled from my RPG and reworked-- my bot system.  It runs through events, uses a profile system, and is extremely effective.



Profiles
Profiles are currently pre-scripted, there will later be a mid-game creation and saving feature, and a way to take your profiles from server to server. The following section refers to the pre-scripted method which will be cleaned up for later release.

The profile determines everything about the bot type, so say we were to have an event spawn a bot of the type "jb_guard"
Code: [Select]
$Monster_istype["jb_guard"]=1;

$Monster_maxhp["jb_guard"]=225;//hp at which it dies


$Monster_weapon["jb_guard"]="krakenimage";//weapon it wields
$Monster_firewait["jb_guard"]=2;//ticks(250 ms) between shots

$Monster_comein["jb_guard"]=10;//battle mod: determines offset at which it moves and strafes around enemy
$Monster_hop["jb_guard"]="0 0 7";//hop velocity
$Monster_fleehp["jb_guard"]="200";//damage at which it flees
$Monster_maxtargetdist["jb_guard"]=6;//distance at which it detects an enemy player
$Monster_morealert["jb_guard"]=5;//added to its alert count

$Monster_nohop["jb_guard"]=0;//disable hopping?
$Monster_lurches["jb_guard"]=0;//enable lurching?
$Monster_lurche["jb_guard"]="1 1 1";//lurch velocity if used
$Monster_lurchechance["jb_guard"]=20;//20% chance of lurching

$Monster_scales["jb_guard"]=1;//will it be scaled?
$Monster_scale["jb_guard"]="0.8 0.8 0.8";//scale size

$Monster_faction["jb_guard"]="creep";//faction, determines alliance with player and other bots.

$Monster_respawn["jb_guard"]=1;//time before it can be spawned again.

$Monster_datablock["jb_guard"]="PlayerFastNoJetMissionArmor";//datablock it uses

$Monster_score["jb_guard"]=3;//score for killing

$Monster_afterticks["jb_guard"]=3;//advanced targeting system set at level 3

$Monster_head["jb_guard"]="headskin";//appearance stuff
$Monster_chest["jb_guard"]="chest";
$Monster_rhand["jb_guard"]="rhand";
$Monster_lhand["jb_guard"]="lhand";
$Monster_rshoe["jb_guard"]="rshoe";
$Monster_lshoe["jb_guard"]="lshoe";
WOB_monstersetcolor_head("jb_guard","30","37","31","35","36","36");//random color values
WOB_monstersetcolor_chest("jb_guard","30","30","300","30","30","30");
WOB_monstersetcolor_hands("jb_guard","30","37","31","35","36","36");
WOB_monstersetcolor_shoes("jb_guard","20","27","21","25","26","36");
Any bot spawned with that name will have those properties. This allows for mass creation of bots of the same type.

Detection
Bots search in a radius to detect players, the size of which is determined in the profile. When alert(upon finding a player or being shot at) its radius doubles in size until it calms down. If you are not moving or are behind a bot, it will have more trouble detecting you, making it possible to make like a spy and sneak by.

Paths
Bots can be moved along a path through events very easily using bricks as path nodes. Through complex events, you can handle paths for many bots and have them weigh their options. For example, I had a test build where bots would move along a path towards a player that was standing at one end of the build, kill the player, and return to the start.

Fighting
The bots are trained fighters, strafing effectively and hoping over obstacles. They aim extremely effectively and pose a challenge to players without bogging down a server.
The bots can handle almost any weapon (basically everything besides the spear) effectively and will also flee once they have been reduced to a certain hp specified by profile.

Unified minigame system
Bots automatically adapt to whatever minigame the person who has shot them or the person they have detected is in, allowing for you to spawn bots and simply start a minigame.

Optimization
On a low-player server, up to 30 bots can be active at once with little or no lag. This number may in fact go higher, but we have only tested it with 30 bots for the moment. On a medium-player server, 10-20 bots are your best bet, but 10-20 are all you need. Simply place a delayed deletion timer on the bots with events, and bots that aren't being used will be deleted, ready to respawn when needed again. Bots use a simplified detection search that is much more effective-- simply place the targeting event on any brick and when a player touches it, the player will be checked against the bots' detection radii that you specify. Pathfinding is handled by the eventer, who has access to events that allow for waypoint systems and preset obstacle hopping. The bots can't and won't go far on their own, but if you're willing to spend a small bit of time they will be as smart as bots who spam raycasts without spamming raycasts.

Factions
Bot faction determines who they fight and who they help. Using the WOB_setplayerfaction event you can modify which faction a player is in, allowing for 2-sided battles with bots, security drones, and other various things. Bot vs bot combat is still in the works Bots with no one to fight will wander about, but if you attack your own kind you will become wanted and your own faction will attack you.

Options for: RPGs
Use the bots as monsters, townsfolk, bosses, etc. Its what I do for mine and it works fine. You can link WOB_onmonsterdeath to the spawning brick in order to increase player EXP and such things. You can have townsfolk who wander about the town, and guards who will protect them from criminals who become wanted. Make factions and players will raid enemy towns. Add a jail to spend time in to reduce your wanted rating. Make soldiers and caravanners who follow paths along the world.

Options for: FPS ( co-op )
The bots were partially designed for this. You can set up ambushes, bricks that trigger hordes of bots, and the general monsters who wander aboot the lands.(yes, aboot)
Consider having one player control a bot spawner and the rest of the players under seige.

Options for: FPS (teams)
Use the bots as security drones, assistants in battle, or a third side to the battle that is against everyone. Use civilians as a neutral party that will reduce your pointage when killed. More options will open here when bot vs bot is done.

Options for: Town builds
Have bots stand in your shops and wander around your streets, make a lively city for screen shots and other presentations.

Options (other)
The options are near-limitless!





Alright, but how can I get involved now?
Glad I forced you to ask. Build the best co-op build you can, drawing inspiration from doom, serious sam, and L4D. Show a detailed lay out of the enemy's paths, spawns, and other various things related to the bots. My judges and I will pick the best builders to be accepted into the beta and sent a version with which to make their builds function and stress-test the bots.

The build should:
- Look good
- Have gameplay in mind
- Be well thought out

Post a gallery topic with [WOB-app] in its name, with screens and an overview of how you think you would set up the events.(i.e where will the bots come from, what triggers them, etc)

You should be able to host your own server so it does not get circulated further than the winner. If you can't, co-build it with someone who can. You also must pledge to not send the files to anyone, and it will help you immensely if you are someone I know and can trust.



Note: if you happen to be Miga you win automatically.



Questions? Comments? OMGKEWLIMAEKBILDNOWK?

I take it this is the bot mod you made that will be released sometime in the next 4 months?
This is even better than I thought! Can you post any pictures of the bot system?

I'm thinking about making a coop thing.

I remember this on your server. Good times. :cookieMonster:
Anyways, this looks pretty nice! Hope you get a reward from it

This looks like it will be really good. I like how it is event controlled.

Lookin epic

Perhaps make it so we can change the faction in game. Haking terminals and removing the targeting data from the terminals makes fun happen :D

making a map right now. It's sounding lovey.

Perhaps make it so we can change the faction in game. Haking terminals and removing the targeting data from the terminals makes fun happen :D
I will do this immediately.

Edit: Implemented.
« Last Edit: April 23, 2009, 04:28:56 PM by rkynick »

I never see the server up :/.

This Sounds Pretty sweet! :)

Is there any word to describe epic only stronger?

Build the best co-op build you can, drawing inspiration from serious sam.

Gah, too bad someone has my Serious Sam: the Second Encounter. I could've made a few builds from that. D:

Needs moar TDM integration?

He said he wanted co-op builds and such. :o

I won't integrate it directly into TDM but you can give the bots a faction and the players a faction.

1) spawn some bots with faction Team 1
2) place an event somewhere that sets Team 1 player's factions to Team 1.
3) the bots you spawned and set factions to will not attack those players

Do the same with the other team and you're set.

Need moar navmesh generator.