AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D2] Smart AI Tank [Jul.-31-2021] (https://forums.alliedmods.net/showthread.php?t=326221)

BRU7US 07-23-2020 09:34

[L4D2] Smart AI Tank [Jul.-31-2021]
 
3 Attachment(s)
About:

This plugin improves AI Tank behaviour. Now he ignore the Survivors who using mounted machinegun.

Now Tank find as target nearest survivor.

He don't let you cut his back by melee.

Also by Cvars he can ignore or choose as victim vomited and incapacitated survivors.

If you set Cvar to choose as victim incapacitated survivors then AI Tank will be chasing nearest incapacitated survivors only on Hard and Expert difficulties because he can kill them fast.

If you set Cvar to choose as victim incapacitated and vomited survivors then AI Tank will be also chasing nearest survivor who been incapacitated or vomited.

This plugin supports only Left 4 Dead 2!


CVars:

Saved to l4d2_smart_bot_tank.cfg in your server's \cfg\sourcemod\ folder.

PHP Code:

l4d2_sbt_high_difficulties_finish_off_incapacitated
//Values: 1 / 0.
//Description: Enable/Disable finishing off survivors who gets incapacitated on Hard/Expert difficulties.
//Note: This CVar doesn't work on Easy and Normal difficulties.

l4d2_sbt_targets_vomited_survivor 
//Values: 1 / 0.
//Description: Enable/Disable targeting survivors who gets vomited. 


Known Bugs:

None at the moment.


Requirements:

1. SourceMod 1.10

2. Left4DHooks Direct

3. Put l4d2_minigun_victim.txt to gamedata folder.


Supported Gamemodes:

Now this plugin working correctly only in CO-OP.


Special Thanks:

axelnieves2012 for this plugin which served as the idea for my plugin.

BHaType for his code which allows the tank to ignore the machine gun.


P.S.

This is my first public plugin and topic in this forum. Sorry for mistakes if there are any.

UPDATES
July 31, 2021:
- Updated l4d2_minigun_victim.txt (Thanks to BHaType)
- Fixed problem when Tank always chose as its victim a respawned player who died while being vomited even he isn't was vomited.

September 11, 2020 - Changed HookEvent declaration to the new style. (Thanks to rtokuda)

Silvers 07-23-2020 10:56

Re: [L4D2] Smart AI Tank
 
This has conflicting ideas with Target Override plugin. Sure I didn't add blocking minigun by patching the game but the linked plugin I guess should have covered for both games not just L4D2. I don't see the point of duplicating Target Override with fewer options just to patch minigun and add 1 small feature.

BRU7US 07-23-2020 11:34

Re: [L4D2] Smart AI Tank
 
Quote:

Originally Posted by Silvers (Post 2711283)
This has conflicting ideas with Target Override plugin. Sure I didn't add blocking minigun by patching the game but the linked plugin I guess should have covered for both games not just L4D2. I don't see the point of duplicating Target Override with fewer options just to patch minigun and add 1 small feature.

Ok, Thanks for this information! :)

gatitojamon 07-24-2020 15:34

Re: [L4D2] Smart AI Tank
 
nice plugin!

BRU7US 07-25-2020 05:23

Re: [L4D2] Smart AI Tank
 
Quote:

Originally Posted by gatitojamon (Post 2711525)
nice plugin!

Thanks!

rtokuda 09-09-2020 16:13

Re: [L4D2] Smart AI Tank
 
Compile with 7 errors :

PHP Code:

// by the SourceMod Dev Team


//// l4d2_smart_bot_tank.sp
//
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(44) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(45) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(46) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(47) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(48) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(49) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(50) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// Code size:            12880 bytes
// Data size:             4056 bytes
// Stack/heap size:      16384 bytes
// Total requirements:   33320 bytes
//
// 7 Warnings.
//
// Compilation Time: 0,41 sec
// ----------------------------------------

Press enter to exit ... 


BRU7US 09-11-2020 10:42

Re: [L4D2] Smart AI Tank
 
Quote:

Originally Posted by rtokuda (Post 2717310)
Compile with 7 errors :

PHP Code:

// by the SourceMod Dev Team


//// l4d2_smart_bot_tank.sp
//
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(44) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(45) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(46) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(47) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(48) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(49) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// E:\game\steam\steamapps\common\Left 4 Dead 2\left4dead2\addons\sourcemod\scripting\l4d2_smart_bot_tank.sp(50) : warning 240: 'EventHook:' is an old-style tag operation; use view_as<typeset>(expression) instead
// Code size:            12880 bytes
// Data size:             4056 bytes
// Stack/heap size:      16384 bytes
// Total requirements:   33320 bytes
//
// 7 Warnings.
//
// Compilation Time: 0,41 sec
// ----------------------------------------

Press enter to exit ... 



Thanks for this. Try a new version!

xiao333yue 07-29-2021 06:41

Re: [L4D2] Smart AI Tank
 
1 Attachment(s)
Attachment 190591


Failed to compile your source code. The above is the wrong picture. I hope it can be fixed. Sorry, my English is not very good.

BRU7US 07-29-2021 07:42

Re: [L4D2] Smart AI Tank
 
Quote:

Originally Posted by xiao333yue (Post 2753979)
Attachment 190591


Failed to compile your source code. The above is the wrong picture. I hope it can be fixed. Sorry, my English is not very good.

It seems like your compiler doesn't have access to write a compiled .smx file on your disk "D". Try to download a compiled .smx file from my first post.

xiao333yue 07-29-2021 22:13

Re: [L4D2] Smart AI Tank
 
1 Attachment(s)
Attachment 190608
Quote:

Originally Posted by bru7us (Post 2753983)
it seems like your compiler doesn't have access to write a compiled .smx file on your disk "d". Try to download a compiled .smx file from my first post.

Operation error, this is the error log


All times are GMT -4. The time now is 11:42.

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