AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   AEROBOT.XYZ - Artificial Intelligence template for GoldSource engine (https://forums.alliedmods.net/showthread.php?t=343064)

1xAero 06-12-2023 07:02

AEROBOT.XYZ - Artificial Intelligence template for GoldSource engine
 
2 Attachment(s)

Description:

AEROBOT.XYZ is an Artificial Intelligence or just a simply computer controlled player directly written as an AMX Mod X plugin.
This script was developed for programmers who wanted to create AI, but not familiar with C++.
Does not requires making waypoints. Supports GoldSource based mods. Currently supported mods:

- Half-Life 25th Anniversary Update
- Deathmatch Classic
- Adrenaline Gamer - FFA and FFAX mode
- CSDM FFA Deathmatch
- CSDM Team Deathmatch - fy_ and aim_ maps
- Counter-Strike fy_ and aim_ maps
- partially default Counter-Strike maps - scenario scripts not implemented
- partially default Counter-Strike: Condition Zero maps - scenario scripts not implemented

AI actions implemented:

- Random movement at any direction.
- On the way objects detection and destroying attempt or turning around.
- Ragebot with random spray pattern.
- Trick movement: Double Duck, Duck Jump, Jump Peek, Show off with the Knife switch.
- Random Spray and flashlights usage (mp_flashlights must be set to 1)
- Trashtalk. Chatting and supporting Bugfixed HL.

Requirements:

Developed using required Metamod and AMX Mod X version, but should work fine with any else.

- Metamod-P 1.21p38: https://metamod-p.sourceforge.net/
- AMX Mod X 1.10: https://www.amxmodx.org/downloads-new.php?branch=master

Installation:

- open aerobot/0x0001_settings.sma and start setup AI depended on your game.

- IMPORTANT: Compile aerobot.sma and install like any other plugin.
- OPTIONAL*: Half-Life 25th Anniversary Update only. Compile and install apb_kill_confirmed.sma - statistical info.
- OPTIONAL*: Half-Life 25th Anniversary Update only. Compile and install apb_announcer.sma - Quake Champions statistical info.
- OPTIONAL*: Half-Life 25th Anniversary Update only. Compile and install apb_powerup.sma - Quad Damage powerup for gameplay.
- OPTIONAL*: Half-Life 25th Anniversary Update only. Compile and install apb_monster.sma - spawn monsters on players death.
- OPTIONAL*: Half-Life 25th Anniversary Update only. Compile and install apb_camera.sma - 3rd person camera.
- IMPORTANT: Half-Life 25th Anniversary Update only. Compile apb_firstspawn.sma and install like any other plugin.
- IMPORTANT: Compile apb_settings.sma and install like any other plugin.
- IMPORTANT: Download resources.zip, unpack and place into Half-Life directory

Server command usage Guide:

- apb_add - add one bot to the game.
- apb_fill - fill server with bots.
- apb_kickall - kick all bots from the server.
- apb_kill - kill bots. For Counter-Strike only.
- apb_hl_rocket - Kaboom mode Half-Life and AGHL. 1 to enable, 0 to disable.
- apb_difficulty - bot difficulty between 4 and 1, where 4 is the highest difficulty.
- apb_bot_amount - amount of bots, automatically joining after game start. Change this param by editing aerobot.cfg, values between 1 and 31.

Feel free to edit, continue work and improve.

- Updated, removed unneeded checks from code.
- Fixed bug with AMX Mod X error throw on Bot creation.
- Updated again, fixed bug with non existent client command.
- Max map spawn info limited to 32.
- Code cleanup.

- * template update (July 18 2023) Half-Life/Adrenaline Gamer:
- NOTE: Engine bug? Reaching over max map spawn points causes client kick without entity limits.
- Fixed Adrenaline Gamer chat (hud space allocation and correсt console text line transfer).
- Improved bot movement and reaction with RPG, added random AR Grenade usage for bot.
- Added delay to draw Weaponlist and item info properly at human spawn.
- Added 9mmAR with Grenades to human at spawn.

- * template update (July 19 2023) Half-Life/Adrenaline Gamer:
- Multiple weapon support: gauss, 9mmAR, 9mmAR Grenades, handgrenades, LOTS of snarks, hornet and gluon for bots.
- Fixed bot trying to attack spectator or dead body: Adrenaline Gamer and other.
- Fixed bot is not attacking and not switching to his primary weapon.

- * template update (July 20 2023) Half-Life/Adrenaline Gamer:
- Fixed bot spawning without weapon in Adrenaline Gamer FFAX mode: hornetgun replaced with weapon_9mmAR.
- Removed weapons from bots: weapon_egon, weapon_handgrenade, weapon_rpg, rifle grenades.
- Reason: bunch of bots or players with it causing huge lags on clientside (lots of TE_ effects flooding on netchan).
- Maxbots amount now equal to server maxplayers cvar - 1.
- Applied bottomcolor for bot skin.

- * template update (July 23 2023) Deathmatch Classic:
- Added Rocketlauncher to bots. Bots can wear now most powerful weapon.

- * template update (Nov 18 2023) Half-Life 25th Anniversary Update:
- Added delay to Bot chat. Fixed Host_Error: PF_MessageEnd_I.
- Added support for Half-Life 25th Anniversary Update

- * template update Fix (Nov 18 2023) Half-Life 25th Anniversary Update:
- Added Team Deathmatch support for Half-Life 25th Anniversary Update

- * template update (Nov 20 2023) Half-Life 25th Anniversary Update:
- Added Kaboom mode (Weapon RPG for Bots). Usage: apb_hl_rocket 1 enables weapon_rpg for everyone.

- * beta build: 0.1 (Nov 30 2023) Half-Life 25th Anniversary Update:
- Added spawn protection and player spawn from telefrag kill. Fixed client crash on death.
- Fixed client crashes with large amount of bots. Max amounts of gibs to draw at once is limited to 30.
- New weapons added: tripmine, satchel, handgrenades, crossbow, shotgun, gluon gun, ar grenades, all weapon with alternate fire.
- Engine bugfix ED_Alloc: no free edicts. Added bot autofill option.
- New items, available to player: randomly choosen gluon gun/gauss, ar grenades.

- * beta build: 0.2C (Nov 30 2023) Half-Life 25th Anniversary Update:
- Fully ported to new engine build. Incompatible Ham forwards changed to Fakemeta forwards.
- Added firstpawn script to fix first spawn and gear.

- * beta build: 0.2a (Nov 30 2023) Half-Life 25th Anniversary Update:
- Randomized satchels usage. Bots can throw randomly multiple packs now.

- * beta build: 0.3с (Dec 1 2023) Half-Life 25th Anniversary Update:
- Task data moved to task manager. Fixed first connected player announcement.

- * beta build: 0.3b (Dec 2 2023) Half-Life 25th Anniversary Update:
- Added Bot difficulty/reaction timer cvar. Fixed bug with firstpawn, no more second crowbar appears.
- Added bot amount setting. Added configuration file. For more open aerobot.cfg

- * beta build: 0.3a (Dec 6 2023) Half-Life 25th Anniversary Update:
- Added artifact powerup for gameplay

- * beta build: 0.4c (Dec 12 2023) Half-Life 25th Anniversary Update:
- Instead of giving armor banks, player receives armor with armorvalue at spawn.
- Fixed powerup crash on entity remove, added announcer info on kill.

- * beta build: 0.4b (Dec 12 2023) Half-Life 25th Anniversary Update:
- Announcer and powerup fixes

- * beta build: 0.4a (Dec 14 2023) Half-Life 25th Anniversary Update:
- Fixed health/armor value at spawn.

- * beta build: 0.5c (Dec 14 2023) Half-Life 25th Anniversary Update:
- Powerup: Changed MOVETYPE_NONE to MOVETYPE_STEP (fix for Quad gravity and collision)

- * beta build: 0.7a (Dec 21 2023) Half-Life 25th Anniversary Update:
- Bot movement for Half-Life: combat jumptricks and faster movement.
- Added optional thirdperson camera script, print /cam in chat to toggle, again to turn it off.
- Balanced bot difficulty/reaction time. By default the bot difficulty changed to 3 for trick movement.
- Added automated monster spawn, after player death houndeye or hgrunt will appear on dead player origin. Monster apache will spawn on some maps.

- * beta build: 0.8c (Dec 24 2023) Half-Life 25th Anniversary Update:
- Fixed crash on monsters death/spawn.

- * beta build: 0.8b (Dec 27 2023) Half-Life 25th Anniversary Update:
- Quality of Life for monster spawner script. Fixed 3rd person camera crash on death/respawn.

- * beta build: 0.8a (Dec 27 2023) Half-Life 25th Anniversary Update:
- Quality of Life for monster spawner script. Fixed pev_flags -> pev_spawnflags for SF_MONSTER_FALL_TO_GROUND. Removed additional gargantua checks.

- * beta build: 0.9c (Dec 27 2023) Half-Life 25th Anniversary Update:
- Quality of Life for monster spawner script: fixed crashes on maps, where weapon_9mmAR is spawning by default (like crossfire)

PHP Code:

Signatures to update manually for Half-Life server (amxmodx is not updated yetupdate it by yourself with this):

amxmodx\data\gamedata\common.games\functions_engine

SV_DropClient
"windows" "\x55\x8B\xEC\x81\xEC\x04\x06\x00\x00\xA1\x2A\x2A\x2A\x2A\x33\xC5\x89\x45\xFC\x56"
Cvar_DirectSet"windows" "\x55\x8B\xEC\x81\xEC\x04\x04\x00\x00\xA1\x2A\x2A\x2A\x2A\x33\xC5\x89\x45\xFC\x56\x8B\x75\x0C"

amxmodx\data\gamedata\common.games\globalvars_engine

g_pGameRules
"windows" "\x8B\x2A\x2A\x2A\x2A\x2A\x85\x2A\x74\x2A\x8B\x2A\xFF\x2A\x2A\xB8" // StartFrame() 

- links to full package (All-In-One) under Youtube description

okbede_123 06-12-2023 21:33

Re: AEROBOT.XYZ - Artificial Intelligence template for GoldSource engine
 
Are they can play zombie mode?

1xAero 06-12-2023 22:50

Re: AEROBOT.XYZ - Artificial Intelligence template for GoldSource engine
 
Quote:

Originally Posted by okbede_123 (Post 2805914)
Are they can play zombie mode?

Comment #define PB_WEAPON_MODE.
Make sure you give them a weapon on spawn.

1xAero 06-13-2023 02:43

Re: AEROBOT.XYZ - Artificial Intelligence template for GoldSource engine
 
Updated - i forgot to fix the bug with apb_fill command.

okbede_123 06-13-2023 03:16

Re: AEROBOT.XYZ - Artificial Intelligence template for GoldSource engine
 
So this bot dont need to create waypoint bro? How about make them attack entity?

okbede_123 06-13-2023 03:17

Re: AEROBOT.XYZ - Artificial Intelligence template for GoldSource engine
 
Have some api for this bot? Example make them follow human, of make them camp?

1xAero 06-13-2023 03:26

Re: AEROBOT.XYZ - Artificial Intelligence template for GoldSource engine
 
Quote:

Originally Posted by okbede_123 (Post 2805927)
So this bot dont need to create waypoint bro? How about make them attack entity?

Yes, they can attack entity.

1xAero 06-13-2023 03:28

Re: AEROBOT.XYZ - Artificial Intelligence template for GoldSource engine
 
Quote:

Originally Posted by okbede_123 (Post 2805928)
Have some api for this bot? Example make them follow human, of make them camp?

That need to be added.

P.S. Currently i'm trying to fix my Steam, because i have a tons of case farm accounts and looks like this all are affecting my local id, alot of errors on Valve's games, i can't even see chat ingame and my nickname is always Player.
Gonna reinstall Windows.

P.S. Updated again.

okbede_123 06-13-2023 03:36

Re: AEROBOT.XYZ - Artificial Intelligence template for GoldSource engine
 
I waiting for this bot to be update. Now in my sv i use sypb, maybe it out date but have some api in same good, hope so yout bot better :D

1xAero 06-13-2023 03:59

Re: AEROBOT.XYZ - Artificial Intelligence template for GoldSource engine
 
Quote:

Originally Posted by okbede_123 (Post 2805931)
I waiting for this bot to be update. Now in my sv i use sypb, maybe it out date but have some api in same good, hope so yout bot better :D

Sypb yes, designed for comfortable play, it's currently maybe most optimized Bot from POD-Bot pasted bots.
All the bots coded on metamod are mostly evolved from HPB bot, also CS bots like SyPB/YaPB evolved from POD-Bot.
What i don't like - too many math calculation inside main logic, maybe user don't need that?
So, why not trying to code bot with amxx... Not much difference actually, metamod side or amxx.
About this Bot - i usually play Half-Life or Adrenaline Gamer, so my main goal was FFA Deathmatch and this Bots are perfectly fitting this: Spawn, run and gun.


All times are GMT -4. The time now is 12:18.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.