How to make a bot?
Watch the video
In many computer games for the revitalization andexpansion of the game process provides for the possibility of including a bot in the game. Bot is a special program that simulates a partner or opponent in the game - artificial intelligence, in some way. The article below describes ways to create bots in CS 1.6, Battlefield 2 and Minecraft.
Counter Strike 1.6
So, how to make a bot in such, for example,a popular game like Counter Strike 1.6? To start, the player needs to call the console, in which and type all the commands. The console in CS is called with the "E" key. Further all is easy, it is necessary to remember, and it is better to write down, several commands:
- bot_add_ct - the creation of a bot that is in favor of the counterterrorist team.
- bot_add_t - creating a bot that plays for terrorists.
- bot_add - creating bots without enrolling in a specific command.
Remember, each team adds only one of its bot to the game.
Sometimes problems arise when a player wants onefight against the army, albeit small. The maximum size of the army, by the way, 20 bots. For everything to work out correctly, remember the following commands. You need to enter them in the same place, in the console:
- mp_limitteams 20 - this command increases the size of the squad to 20 ally.
- mp_autoteambalance 0 - and this one, just, andwill allow the player to feel great. She turns off the balance. If you do not enter it, the program will automatically distribute the bots to the team with fewer players. And no 1:20 will not.
- Another cunning command: bot_quota 19 - creates 19 bots at a time. The number at the end determines the number of bots.
Battlefield 2 - a game where without bots, too, notdo without. Especially if the player wants to practice before the online game. Here we need not just bots, but real Artificial Intelligence. To do this, you have to play with the settings settings.
- The settings are stored in the modsbf2Ai directory. The player will find the necessary characteristics in the file AIDefault.ai. This is aiSettings.setMaxNBots, which is responsible for the number of bots and aiSettings.setBotSkill - the level of intelligence of the enemy. The values of the parameters themselves are separated from the name by a space, so they will not change their labor.
- In another parameter, aiSettings.maxBotsIncludeHumans, replace the value zero, which is there by default, by one. And do not get carried awaynumber of bots. 128 opponents will be forced to brake even a very powerful computer.
- Very useful setting: aiSettings.setBotSkill. The higher its value - the higher the complexity of the game. It changes from zero to one.
- And the main thing is to make everything work, the player needs to insert aiSettings.overrideMenuSettings before the aiSettings.setMaxNBots line.
- And in order to make their own, exceptionalyou need to go to the BotNames.ai file. The directory is the same modsbf2Ai. Here, as is clear from the title, the names of computer opponents are stored. Each line of the file is a separate soldier and looks like this: aiSettings.addBotName X. Instead of "X", the bot name is set by default. Changing it, the player renames it.
And, at last, we'll see how to make your bot appear in the popular Minecraft game.
To help the player there is a wonderful plugin with a "talking" name: Custom NPC. This mod adds new residents with whom you can communicate, trade, etc. The mod is installed very simply:
- If this is not already done, install Minecraft Forge. This mod allows you to work with other Minecraft mods.
- You must delete the folder: META-INF. Next, move the mod to the mods folder and start the game.
Making a tool for a bot
We make the tool for the bot. Then we take the tool in hand and click the right mouse button on any block. A menu with several tabs will appear on the screen. In it, the player sets up a new bot.
- Display: the first tab of the menu. Here you specify the name of the bot, its appearance and position. I'll have to experiment, but there's nothing complicated here.
- The second tab: Stats. Here are the following options:
- Health is the "health" of the bot.
- AttackRange - the distance from which the bot will attack
- Normal WalkingSpeed - speed of movement of the bot
- Respawn of / on - this parameter specifies whether the bot will "resurrect" after death. And if so, then after what period of time.
- Strenght - Bot attack power
- AttackSpeed - Attack Speed
- Attack WalkingSpeed - attack speed in motion.
- A very important Advanced tab. Here the role of the bot and its fraction is determined:
- Trader is a trader. A fully configurable parameter, you can set 36 values.
- Follower - mercenary. This will have to be paid out of his pocket. True, how much to pay, the player tunes himself.
- Bank - respectively, the bank. Works on the principle of the chest of the Edge.
- Transporter - this bot will carry you to another similar one.
Do not be afraid to experiment and make your bot - this is also a game, and very exciting.