Raised This Month: $45 Target: $400
 11% 

[L4D & L4D2] Mutant Tanks (v8.89, 9-11-2021)


Post New Thread Reply   
 
Thread Tools Display Modes
yuzumi
Junior Member
Join Date: Jul 2020
Old 10-25-2021 , 05:51   Re: [L4D & L4D2] Mutant Tanks (v8.89, 9-11-2021)
Reply With Quote #1121

when survivors is near a entity or wall, warp ability teleport tank sometimes teleport to the entity or wall making the tank unable to move..

Example:

This is Ghost Tank..The following is the warp setting.
PHP Code:
"Warp Ability"
{
    
"Open Areas Only" "1"
    "Human Ability" "0"
    "Human Ammo" "2"
    "Human Cooldown" "20.0"
    "Human Mode" "0"
    "Ability Enabled" "2"
    "Ability Effect" "0"
    "Ability Message" "0"
    "Warp Chance" "100.0"
    "Warp Interval" "20.0"
    "Warp Mode" "0"
    "Warp Range" "150.0"
    "Warp Range Chance" "0.0"
    "Warp Hit" "0"
    "Warp Hit Mode" "0"

This problem exists in multiple versions, including the latest 8.90~
yuzumi is offline
Psyk0tik
AlliedModders Donor
Join Date: May 2012
Location: Homeless
Old 10-25-2021 , 07:07   Re: [L4D & L4D2] Mutant Tanks (v8.89, 9-11-2021)
Reply With Quote #1122

Quote:
Originally Posted by yuzumi View Post
when survivors is near a entity or wall, warp ability teleport tank sometimes teleport to the entity or wall making the tank unable to move..

Example:

This is Ghost Tank..The following is the warp setting.
PHP Code:
"Warp Ability"
{
    
"Open Areas Only" "1"
    "Human Ability" "0"
    "Human Ammo" "2"
    "Human Cooldown" "20.0"
    "Human Mode" "0"
    "Ability Enabled" "2"
    "Ability Effect" "0"
    "Ability Message" "0"
    "Warp Chance" "100.0"
    "Warp Interval" "20.0"
    "Warp Mode" "0"
    "Warp Range" "150.0"
    "Warp Range Chance" "0.0"
    "Warp Hit" "0"
    "Warp Hit Mode" "0"

This problem exists in multiple versions, including the latest 8.90~
I haven't gotten around to addressing this issue yet. I'd appreciate it if anyone can show me a snippet of how to pick a random spot for teleporting players that can filter out solid objects/brushes because I'm not good with TraceRay stuff.
__________________
AFK like JFK
--
Donate to Motivate
--
Get latest L4D/L4D2 gamedata signatures here.
--
PM me if you need help with finding signatures and/or offsets in the following games: L4D1&2/CSGO/TF2/NMRIH/INS/DODS/CSS/HL2DM
Psyk0tik is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 10-25-2021 , 09:10   Re: [L4D & L4D2] Mutant Tanks (v8.89, 9-11-2021)
Reply With Quote #1123

I use Dragokas's - Tank anti-stuck (anti-block) together with Mutant Tanks and besides the tank getting stuck sometimes, his plugin unstuck the tank after a while.

I don't know if the plugin logic is embedded on MT but I use both in my servers.
__________________

Last edited by Marttt; 10-25-2021 at 09:10.
Marttt is online now
Psyk0tik
AlliedModders Donor
Join Date: May 2012
Location: Homeless
Old 10-25-2021 , 09:14   Re: [L4D & L4D2] Mutant Tanks (v8.89, 9-11-2021)
Reply With Quote #1124

Quote:
Originally Posted by Marttt View Post
I use Dragokas's - Tank anti-stuck (anti-block) together with Mutant Tanks and besides the tank getting stuck sometimes, his plugin unstuck the tank after a while.

I don't know if the plugin logic is embedded on MT but I use both in my servers.
MT doesn’t have any anti-stuck logic embedded, but the issue also refers to something that MT is causing, so I want to update the teleportation code because users shouldn’t have to rely on another plugin to fix MT’s flawed logic.
__________________
AFK like JFK
--
Donate to Motivate
--
Get latest L4D/L4D2 gamedata signatures here.
--
PM me if you need help with finding signatures and/or offsets in the following games: L4D1&2/CSGO/TF2/NMRIH/INS/DODS/CSS/HL2DM
Psyk0tik is offline
thewintersoldier97
Senior Member
Join Date: Aug 2021
Location: Vietnam
Old 10-26-2021 , 01:15   Re: [L4D & L4D2] Mutant Tanks (v8.89, 9-11-2021)
Reply With Quote #1125

Quote:
Originally Posted by Psyk0tik View Post
Spoiler
So I tried modify MT's health system, when the tank appear it has the health I set for it but immediately dropped down to default health...
PHP Code:
"Health"
        
{
            
"Base Health"                "10000"
            "Display Health"            "5"
            "Display Health Type"            "2"
            "Health Characters"            "|,-"
            "Minimum Humans"            "2"
            "Multiply Health"            "2"
        

Could you link me the SuperVersus version you're using Psyk0tik? I would like to try to see if my version is the cause.

Also, what does the "Items Chance" in the "Items Ability" actually do? Does it stand for the chance one survivor get one of these predetermined items or entire team? Cause I lowed the chance but seem like everyone will be rewarded with random items everytime. 8+ players.
PHP Code:
"Item Ability"
        
{
            
"Human Ability"                "1"
            "Ability Enabled"            "1"
            "Ability Message"            "1"
            "Item Chance"                "20"
            "Item Loadout"                "defibrillator,pain_pills,pain_pills,pain_pills,adrenaline"
            "Item Mode"                "0"
            "Item Pinata Body"            "0"
        

__________________

Looking for some fun!
thewintersoldier97 is offline
yuzumi
Junior Member
Join Date: Jul 2020
Old 10-26-2021 , 06:10   Re: [L4D & L4D2] Mutant Tanks (v8.89, 9-11-2021)
Reply With Quote #1126

Quote:
Originally Posted by thewintersoldier97 View Post
So I tried modify MT's health system, when the tank appear it has the health I set for it but immediately dropped down to default health...
PHP Code:
"Health"
        
{
            
"Base Health"                "10000"
            "Display Health"            "5"
            "Display Health Type"            "2"
            "Health Characters"            "|,-"
            "Minimum Humans"            "2"
            "Multiply Health"            "2"
        

Could you link me the SuperVersus version you're using Psyk0tik? I would like to try to see if my version is the cause.

Also, what does the "Items Chance" in the "Items Ability" actually do? Does it stand for the chance one survivor get one of these predetermined items or entire team? Cause I lowed the chance but seem like everyone will be rewarded with random items everytime. 8+ players.
PHP Code:
"Item Ability"
        
{
            
"Human Ability"                "1"
            "Ability Enabled"            "1"
            "Ability Message"            "1"
            "Item Chance"                "20"
            "Item Loadout"                "defibrillator,pain_pills,pain_pills,pain_pills,adrenaline"
            "Item Mode"                "0"
            "Item Pinata Body"            "0"
        

1. modified version SuperVersus of Shao's should be this? https://forums.alliedmods.net/showpo...postcount=1285
If you are using the tank health setting of MT, Please remove other tank health setting plugins to ensure normal operation.. MT health setting is working properly in my server..

2."Items Chance" is after tank death have how chance all survivor get item.
(if "Item Mode" set 0, all survivor get a "Item Loadout" set random one item. set 1, all survivor get a "Item Loadout" set all items.)

Last edited by yuzumi; 10-26-2021 at 06:11.
yuzumi is offline
thewintersoldier97
Senior Member
Join Date: Aug 2021
Location: Vietnam
Old 10-26-2021 , 07:49   Re: [L4D & L4D2] Mutant Tanks (v8.89, 9-11-2021)
Reply With Quote #1127

Quote:
Originally Posted by yuzumi View Post
1. modified version SuperVersus of Shao's should be this? https://forums.alliedmods.net/showpo...postcount=1285
If you are using the tank health setting of MT, Please remove other tank health setting plugins to ensure normal operation.. MT health setting is working properly in my server..

2."Items Chance" is after tank death have how chance all survivor get item.
(if "Item Mode" set 0, all survivor get a "Item Loadout" set random one item. set 1, all survivor get a "Item Loadout" set all items.)
1. I'm using this Shao's version along side with ABM, and pretty sure I've set the "director_tank_auto" cvar to 0 in the cfg. Don't know what's causing the bug here tho

2. I see, so is there any way to modified it so when the Tank die, each survivor get a chance to obtain such items? Though that randomness would make it more fun.

Thanks for replying yuzumi
__________________

Looking for some fun!
thewintersoldier97 is offline
BHaType
Great Tester of Whatever
Join Date: Jun 2018
Old 10-26-2021 , 08:42   Re: [L4D & L4D2] Mutant Tanks (v8.89, 9-11-2021)
Reply With Quote #1128

Quote:
Originally Posted by Psyk0tik View Post
I haven't gotten around to addressing this issue yet. I'd appreciate it if anyone can show me a snippet of how to pick a random spot for teleporting players that can filter out solid objects/brushes because I'm not good with TraceRay stuff.
You can try to use navigation meshes for warping.

Left 4 DHooks have those natives
PHP Code:
// Given a vector position, returns the relative NavArea.
native int L4D_GetNearestNavArea(const float vecPos[3]);

// Returns the nav address of the last known area.
native int L4D_GetLastKnownArea(int client); 
Should be something like this
PHP Code:
{

    
Address area view_as<Address>(L4D_GetLastKnownArea(client));
    
    if ( !
area )
    {
        
// Maybe here we can still use your old logic of warping
        
return;
    }
    
    
float vOrigin[3]
    
    
vOrigin[0] = view_as<float>(LoadFromAddress(area view_as<Address>(40), NumberType_Int32));
    
vOrigin[1] = view_as<float>(LoadFromAddress(area view_as<Address>(44), NumberType_Int32));
    
vOrigin[2] = view_as<float>(LoadFromAddress(area view_as<Address>(48), NumberType_Int32));
    
    
TeleportEntity(tankvOriginNULL_VECTORNULL_VECTOR);

but you still need to calculate if tank can fit into navigation mesh or after teleporting you can call CTerrorPlayer::WarpToValidPositionIfStuck

Im not sure if it will completely fix stucking but atleast this will reduce its frequency
__________________
cry
BHaType is offline
Send a message via AIM to BHaType
yuzumi
Junior Member
Join Date: Jul 2020
Old 10-26-2021 , 08:59   Re: [L4D & L4D2] Mutant Tanks (v8.89, 9-11-2021)
Reply With Quote #1129

Quote:
Originally Posted by thewintersoldier97 View Post
1. I'm using this Shao's version along side with ABM, and pretty sure I've set the "director_tank_auto" cvar to 0 in the cfg. Don't know what's causing the bug here tho :(

2. I see, so is there any way to modified it so when the Tank die, each survivor get a chance to obtain such items? Though that randomness would make it more fun.

Thanks for replying yuzumi :D
ABM and shao's version SuperVersus they all have tank health setting, ABM set "director_tank_auto" cvar to 0.

SuperVersus Comment out tank_spawn eventhook, This event in this plugin is set tank health if spawn tank.
PHP Code:
HookEvent("tank_spawn"Event_TankSpawnEventHookMode_Post); 
change to
PHP Code:
//HookEvent("tank_spawn", Event_TankSpawn, EventHookMode_Post); 

Last edited by yuzumi; 10-26-2021 at 10:16.
yuzumi is offline
Psyk0tik
AlliedModders Donor
Join Date: May 2012
Location: Homeless
Old 10-26-2021 , 10:57   Re: [L4D & L4D2] Mutant Tanks (v8.89, 9-11-2021)
Reply With Quote #1130

Quote:
Originally Posted by BHaType View Post
You can try to use navigation meshes for warping.

Left 4 DHooks have those natives
PHP Code:
// Given a vector position, returns the relative NavArea.
native int L4D_GetNearestNavArea(const float vecPos[3]);

// Returns the nav address of the last known area.
native int L4D_GetLastKnownArea(int client); 
Should be something like this
PHP Code:
{

    
Address area view_as<Address>(L4D_GetLastKnownArea(client));
    
    if ( !
area )
    {
        
// Maybe here we can still use your old logic of warping
        
return;
    }
    
    
float vOrigin[3]
    
    
vOrigin[0] = view_as<float>(LoadFromAddress(area view_as<Address>(40), NumberType_Int32));
    
vOrigin[1] = view_as<float>(LoadFromAddress(area view_as<Address>(44), NumberType_Int32));
    
vOrigin[2] = view_as<float>(LoadFromAddress(area view_as<Address>(48), NumberType_Int32));
    
    
TeleportEntity(tankvOriginNULL_VECTORNULL_VECTOR);

but you still need to calculate if tank can fit into navigation mesh or after teleporting you can call CTerrorPlayer::WarpToValidPositionIfStuck

Im not sure if it will completely fix stucking but atleast this will reduce its frequency
What would this look like in-game? The current logic for teleporting the Tank to a survivor is this:

When the teleporting occurs, it gets the current position of the survivor target. Then it will pick a random spot within a 50.0 radius of that position to teleport the Tank to.

So with your suggestion, will it have a similar effect? I ask because I don't want the Tank teleporting far away from the survivor target. That would go against the original purpose of the teleportation.
__________________
AFK like JFK
--
Donate to Motivate
--
Get latest L4D/L4D2 gamedata signatures here.
--
PM me if you need help with finding signatures and/or offsets in the following games: L4D1&2/CSGO/TF2/NMRIH/INS/DODS/CSS/HL2DM
Psyk0tik is offline
Reply


Thread Tools
Display Modes

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 12:44.


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