Raised This Month: $32 Target: $400
 8% 

[New] Bots Using Keydown Powers


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
heliumdream
Senior Member
Join Date: Aug 2006
Old 10-25-2021 , 18:28   [New] Bots Using Keydown Powers
Reply With Quote #1

Our bots now use keydown super powers!
You can see bots using powers, live on the server in my sig!

This is a bit unprecedented! The lead developer of the SH mod can be quoted as saying this wasn't possible. Well, a new user picked up the superheroes code, created a server, made innovations and in the last two years figured out how to do it.

Credits to evileye / iburai / landfall.
https://github.com/ibiruai/cstrike-superhero-server

His implementation took advantage of the new dev version of amx 1.9, instead of the stable 1.8.2 build. This allowed him to use amxclient_cmd to fake key presses and trigger plugin command hooks.

This is a clever workaround, but I figured out that the bots don't need to bother faking the keypress, all the bots_use_powers code is written as an include and packaged inside the main superheromod; so I went ahead and copied the keydown and keyup functions and created duplicate functions for the bots to use.

And voila, ~400 lines of code later and we have support for the following heroes:
The Hulk
Meteorix
Megaman
Bass
Aquaman
Human Torch
Dazzler
Electro
Storm
Goku's Kaioken
Neo Reloaded
Shadow the Hedgehog
Yoda
Yuna

AI is rudimentary, with the following logic determining how often a power is invoked;
random_num(1, 6) > N)
Lower values for N increase the frequency of use for a power!

It also includes some new amx commands in the playground include file that help you control which bots have which slot occupied by which power.

Bots still select heroes the same way they always did, at random, but I may write some logic on my server to be a bit more choosey about which heroes they take, letting them take full advantage of this new system.

Unbelievable; a feature the community has wanted and dreamed about since its inception finally realized!!!

---

Code available at:
https://github.com/heliumdream/db-cs...er/keydownbots

Unsupported release - You hopefully already know what you're doing.

*Notes:
my shnvault is additionally modded to support SH Show Damage Anubis, a new Cooldown Display System, and my custom version of Protoman // ibiruai's shnvault also has additional modifications, and has #defines that clearly outline the mods and tidy include files - his code is certainly cleaner. they were both authored to support specific gameplay and features we wanted in our respective servers. they arent quite the same, so examine them closely to figure out what they even offer and if you want to bother implementing anything for yourself. Best of luck!
__________________

Last edited by heliumdream; 10-25-2021 at 18:47.
heliumdream is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:57.


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