Raised This Month: $51 Target: $400
 12% 

[TF2 & L4D & L4D2] Actions


Post New Thread Reply   
 
Thread Tools Display Modes
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 05-15-2022 , 19:33   Re: [L4D2] Actions
Reply With Quote #31

Quote:
Originally Posted by Voevoda View Post
installed everything still error
Atleast provide some info about your server. I have no idea what you did to install it but error clearly says that it can't find extension.

Just so you know installation steps:
1. Download archive
2. Put extension and autoload file to sourcemod/extension folder (Make sure you placed right extension since they all depends by game and OS)
3. Put gamedata file to sourcemod/gamedata folder
4. Restart server
5. Done
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 05-16-2022 , 02:22   Re: [L4D2] Actions
Reply With Quote #32

Updated

PHP Code:
Change std::vector to std::deque in actions_manager
Fix runtime action not working properly
Fix passing CBaseEntity args
Add runtime action check to deallocate native
Fixed post hooks 
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
Voevoda
Senior Member
Join Date: Aug 2016
Old 05-16-2022 , 05:37   Re: [L4D2] Actions
Reply With Quote #33

Quote:
Originally Posted by BHaType View Post
Atleast provide some info about your server. I have no idea what you did to install it but error clearly says that it can't find extension.

Just so you know installation steps:
1. Download archive
2. Put extension and autoload file to sourcemod/extension folder (Make sure you placed right extension since they all depends by game and OS)
3. Put gamedata file to sourcemod/gamedata folder
4. Restart server
5. Done

PHP Code:
L 05/16/2022 12:36:01SourceMod error session started
L 05
/16/2022 12:36:01Info (map "c5m1_waterfront") (file "/home/l4d2server/serverfiles/left4dead2/addons/sourcemod/logs/errors_20220516.log")
L 05/16/2022 12:36:01: [SMUnable to load extension "actions.ext": /home/l4d2server/serverfiles/left4dead2/addons/sourcemod/extensions/actions.ext.2.l4d2.soundefined symbol_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERjj
L 05
/16/2022 12:36:04: [SMUnable to load plugin "l4d2_shove_fix.smx"Native "BehaviorAction.OnShoved.set" was not found 
Quote:
[01] Stripper (1.2.2) by BAILOPAN
[02] L4DToolZ (1.0.0.9r1) by Ivailosp
[03] SourceMod (1.10.0.653 by AlliedModders LLC
[04] DHooks (2.2.0-detours17) by Dr!fter and Peace-Maker
[05] SDK Tools (1.10.0.653 by AlliedModders LLC
[06] SDK Hooks (1.10.0.653 by AlliedModders LLC
[07] VoiceHook (3.0) by Accelerator
[08] SteamWorks Extension (1.2.3) by Kyle Sanderson
Voevoda is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 05-16-2022 , 07:03   Re: [L4D2] Actions
Reply With Quote #34

Quote:
Originally Posted by Voevoda View Post
PHP Code:
/home/l4d2server/serverfiles/left4dead2/addons/sourcemod/extensions/actions.ext.2.l4d2.soundefined symbol_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERjj 
Just tested with linux server and extension loaded without any errors. I have no idea how to fix it.
It was issue with latest compilers
__________________
cry

Last edited by BHaType; 05-18-2022 at 01:35.
BHaType is offline
Send a message via AIM to BHaType
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 05-18-2022 , 01:34   Re: [L4D2] Actions
Reply With Quote #35

Updated
PHP Code:
Fixed link issue for latest compilers 
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 05-20-2022 , 02:46   Re: [L4D2] Actions
Reply With Quote #36

Updated
PHP Code:
CMake reconfigure
Add pending actions
Add handlers result safety check
Fix actor for OnActionCreated callback
Fix custom actions 
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 05-27-2022 , 03:17   Re: [L4D2] Actions
Reply With Quote #37

I would like to request adding information to the include file to make the whole library optional. This will allow plugins to make the extension an optional dependency.

Something like this:
Spoiler


Also, I think the thread title should be renamed with the prefix "[L4D & L4D2]" or something similar since you added support for L4D1.

Also, also, is there a consistent/reliable way to get the target of an action? In your example callback for "OnShovedPost" you have a "shover" param but I don't know where you got that. Then, in your block example, you use an offset to retrieve the target for the "OnFriendAction" callback, and I am wondering if that offset is always the same for every action or not.

Also, also, also, what are the different function prototypes for the callback functions? In your examples, you use different prototypes so I don't know which one to use for "TankAttack". Maybe a "typedef" or "typeset" in the include will help.
Spoiler


For my use case, I am experimenting with setting a Tank's target when his current behavior is "TankAttack" so my plugin can decide which survivors to focus.
__________________

Last edited by Psyk0tik; 05-27-2022 at 05:30.
Psyk0tik is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 05-27-2022 , 06:50   Re: [L4D2] Actions
Reply With Quote #38

Quote:
Originally Posted by Psyk0tik View Post
Also, also, is there a consistent/reliable way to get the target of an action? In your example callback for "OnShovedPost" you have a "shover" param but I don't know where you got that. Then, in your block example, you use an offset to retrieve the target for the "OnFriendAction" callback, and I am wondering if that offset is always the same for every action or not.

For my use case, I am experimenting with setting a Tank's target when his current behavior is "TankAttack" so my plugin can decide which survivors to focus.
In most cases offsets will be same for every action but it's still better to check it yourself if you not sure. I have already mentioned some pattern info about offsets.

Every special infected chooses his target by calling ChooseVictim in ...Attack::Update action handler and return of ChooseVictim is always stored by 0x34 offset. Actually getting current tank target via action is more reliable and proper way since game directly uses this var to make path and it also considers OnContact event handler which makes tank attack who touched him.

About event handlers params. Their params are always same for every action but event handlers in plugins have some differences/additions. First param is always action, then arguments of the default handler, the last is always ActionResult/ActionDesiredResult. I will add typeset soon.

For example default OnShoved handler looks like this
PHP Code:
OnShoved(Infected* <- actorCBaseEntity* <- shover
so in plugin OnShoved callback will look like this
PHP Code:
/* First param is always action, then arguments of the default handler, the last is always ActionResult/ActionDesiredResult */
OnShoved(BehaviorAction actionint actorint shoverActionDesiredResult result
ActionResult is used only for OnStart, Update, OnEnd, OnSuspend, OnResume others use ActionDesiredResult (reference)

Event handlers dump

typeset
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 05-27-2022 , 06:52   Re: [L4D & L4D2] Actions
Reply With Quote #39

Updated
PHP Code:
Docs reconfigure
Fixed crash for multiple hooks on same event handler and default action result
Renamed thread
Added extension optionality (Thanks to Psyk0tik
Edit:
Updated
PHP Code:
Added typeset to include 
__________________
cry

Last edited by BHaType; 05-27-2022 at 07:22.
BHaType is offline
Send a message via AIM to BHaType
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 05-27-2022 , 07:23   Re: [L4D2] Actions
Reply With Quote #40

Quote:
Originally Posted by BHaType View Post
...
Alright, thank you for all the information.

(Also thank you for the latest update!)
__________________
Psyk0tik 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 21:20.


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