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

[L4D & L4D2] Target Override (2.29) [25-Mar-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Maur0
Senior Member
Join Date: Aug 2020
Old 07-06-2021 , 14:48   Re: [L4D & L4D2] Target Override (2.15) [06-Jul-2021]
Reply With Quote #81

Quote:
Originally Posted by Silvers View Post
Follow the installation instructions, extract the folders/files to their respective place. You don't have to mess with the gamedata if you do that. Put "sm plugins load l4d_target_override" in console. Which game? What does "sm plugins list" return? Have you checked error logs?
Ok I was able to try and I had to deactivate ALL the plugins and leaving only this plugin. The result was that it works perfectly, but when I put all the plugins that I deactivated again, it did not work again.

Right there I have the errors that I throw when the plugin does not work for me:
Code:
l4d_target_override.smx ([L4D & L4D2] Target Override): Error detected in plugin startup (see error logs)
L 07/06/2021 - 15:43:37: [SM] Exception reported: Failed to load, byte mis-match @ 1496832654 (0x90 != 0x8D)
L 07/06/2021 - 15:43:37: [SM] Blaming: l4d_target_override.smx
L 07/06/2021 - 15:43:37: [SM] Call stack trace:
L 07/06/2021 - 15:43:37: [SM]   [0] SetFailState
L 07/06/2021 - 15:43:37: [SM]   [1] Line 340, C:\Servers\L4D2\left4dead2\addons\sourcemod\scripting\l4d_target_override.sp::OnPluginStart
[SM] Plugin l4d_target_override.smx failed to reload: Error detected in plugin startup (see error logs).
Here is what I noticed about the sp file of the plugin.
Code:
public void OnPluginStart()
{
	// =========================
	// GAMEDATA
	// =========================
	char sPath[PLATFORM_MAX_PATH];
	BuildPath(Path_SM, sPath, sizeof(sPath), "gamedata/%s.txt", GAMEDATA);
	if( FileExists(sPath) == false ) SetFailState("\n==========\nMissing required file: \"%s\".\nRead installation instructions again.\n==========", sPath);

	Handle hGameData = LoadGameConfigFile(GAMEDATA);
	if( hGameData == null ) SetFailState("Failed to load \"%s.txt\" gamedata.", GAMEDATA);

	// Detour
	g_hDetour = DHookCreateFromConf(hGameData, "BossZombiePlayerBot::ChooseVictim");

	if( !g_hDetour ) SetFailState("Failed to find \"BossZombiePlayerBot::ChooseVictim\" signature.");



	// =========================
	// PATCH
	// =========================
	if( g_bLeft4Dead2 )
	{
		g_iFixOffset = GameConfGetAddress(hGameData, "TankAttack::Update");
		if( !g_iFixOffset ) SetFailState("Failed to find \"TankAttack::Update\" signature.", GAMEDATA);

		int offs = GameConfGetOffset(hGameData, "TankAttack__Update_Offset");
		if( offs == -1 ) SetFailState("Failed to load \"TankAttack__Update_Offset\" offset.", GAMEDATA);

		g_iFixOffset += view_as<Address>(offs);

		g_iFixCount = GameConfGetOffset(hGameData, "TankAttack__Update_Count");
		if( g_iFixCount == -1 ) SetFailState("Failed to load \"TankAttack__Update_Count\" offset.", GAMEDATA);

		g_iFixMatch = GameConfGetOffset(hGameData, "TankAttack__Update_Match");
		if( g_iFixMatch == -1 ) SetFailState("Failed to load \"TankAttack__Update_Match\" offset.", GAMEDATA);

		g_BytesSaved = new ArrayList();

		for( int i = 0; i < g_iFixCount; i++ )
		{
			g_BytesSaved.Push(LoadFromAddress(g_iFixOffset + view_as<Address>(i), NumberType_Int8));
		}

		if( g_BytesSaved.Get(0) != g_iFixMatch ) SetFailState("Failed to load, byte mis-match @ %d (0x%02X != 0x%02X)", g_iFixOffset, g_BytesSaved.Get(0), g_iFixMatch);
	}

	delete hGameData;

Last edited by Maur0; 07-06-2021 at 14:55.
Maur0 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-06-2021 , 15:02   Re: [L4D & L4D2] Target Override (2.15) [06-Jul-2021]
Reply With Quote #82

Quote:
Originally Posted by Maur0 View Post
Ok I was able to try and I had to deactivate ALL the plugins and leaving only this plugin. The result was that it works perfectly, but when I put all the plugins that I deactivated again, it did not work again.

Right there I have the errors that I throw when the plugin does not work for me:
Code:
l4d_target_override.smx ([L4D & L4D2] Target Override): Error detected in plugin startup (see error logs)
L 07/06/2021 - 15:43:37: [SM] Exception reported: Failed to load, byte mis-match @ 1496832654 (0x90 != 0x8D)
L 07/06/2021 - 15:43:37: [SM] Blaming: l4d_target_override.smx
L 07/06/2021 - 15:43:37: [SM] Call stack trace:
L 07/06/2021 - 15:43:37: [SM]   [0] SetFailState
L 07/06/2021 - 15:43:37: [SM]   [1] Line 340, C:\Servers\L4D2\left4dead2\addons\sourcemod\scripting\l4d_target_override.sp::OnPluginStart
[SM] Plugin l4d_target_override.smx failed to reload: Error detected in plugin startup (see error logs).
That looks like it's already been patched. Do you have "l4d2_minigun_victim" or something running patching this already? Or maybe you have 2 copies of the plugin running.
__________________
Silvers is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 07-06-2021 , 15:02   Re: [L4D & L4D2] Target Override (2.15) [06-Jul-2021]
Reply With Quote #83

Maybe you have other plugin messing with the gamedata in memory,
Try to check your gamedata folder for these signatures and disable any plugin using the same name.
Then test again.
__________________
Marttt is online now
Maur0
Senior Member
Join Date: Aug 2020
Old 07-06-2021 , 16:06   Re: [L4D & L4D2] Target Override (2.15) [06-Jul-2021]
Reply With Quote #84

@Silvers @Marttt - OMG as I could not notice it before, I look like an Internet Explore. I just removed a plugin and in the end it works perfectly.

All because there is precisely a plugin that I already had and it had the same gamedata file that Silvers told me.

Smart AI Tank
HTML Code:
https://forums.alliedmods.net/showthread.php?p=2711270
Now if it works perfectly. Thank you very much and sorry for the fuss

Last thing: I don't know if it's worth allowing this plugin that I told you to conflict with to match together? Or is it not necessary? Since that plugin that I had allowed to improve the Tank:
Code:
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.
I do not know if it is worth it or not because from what I see of this plugin is it very similar or is it the same but better updated? Anyway thank you very much!
Maur0 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-06-2021 , 16:20   Re: [L4D & L4D2] Target Override (2.15) [06-Jul-2021]
Reply With Quote #85

Nice well done! I don't see anything about melee weapons in that plugin and it looks like all the other features are covered by Target Override.
__________________
Silvers is offline
Maur0
Senior Member
Join Date: Aug 2020
Old 07-06-2021 , 16:40   Re: [L4D & L4D2] Target Override (2.15) [06-Jul-2021]
Reply With Quote #86

Quote:
Originally Posted by Silvers View Post
Nice well done! I don't see anything about melee weapons in that plugin and it looks like all the other features are covered by Target Override.
Of the 170 plugins that I have in L4D2. They all work perfect for me, and even the extensions. Thank you very much for telling me about the problem and thanks as always Marttt!

And forget what I said before wanting to make compatible the other plugin that I mentioned before. I have seen that both are the same, the difference with this one is that you apply to all the Specials apart from the Tank. And it is more complete and improved. Thanks.
Maur0 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-08-2021 , 15:01   Re: [L4D & L4D2] Target Override (2.15) [06-Jul-2021]
Reply With Quote #87

Uploading this here until I can verify the gamedata is correct.

Please let me know if it works.


Updated first post with new gamedata.
__________________

Last edited by Silvers; 07-09-2021 at 08:54.
Silvers is offline
tRololo312312
Senior Member
Join Date: Apr 2015
Old 07-08-2021 , 19:59   Re: [L4D & L4D2] Target Override (2.15) [06-Jul-2021]
Reply With Quote #88

Quote:
Originally Posted by Silvers View Post
Uploading this here until I can verify the gamedata is correct.

Please let me know if it works.
Seems to crash when tanks are around.

EDIT: Scratch that, it seems to be working fine. The crash seems to be actually caused by this plugin. https://forums.alliedmods.net/showthread.php?t=315405
Latest update seems to have broken it.

Last edited by tRololo312312; 07-09-2021 at 00:14.
tRololo312312 is offline
vikingo12
Member
Join Date: Nov 2018
Old 08-31-2021 , 17:07   Re: [L4D & L4D2] Target Override (2.15a) [09-Jul-2021]
Reply With Quote #89

I have this problem (with tank mostly):
When player disconnets(also when incapped) tank starts rushing to him to kill even if another survivor is super close to him

"tank"
{
"order" "1,3,5,2,7,8,9" // Preference: Last attacker, Vomited Special Infected, then Vomited Survivors, then Incapped, then normal Survivors.
"pinned" "15"
"incap" "1"
"voms" "0"
"voms2" "0"
"range" "0.0"
"wait" "0.5"
"last" "1"
"safe" "0"
}

Last edited by vikingo12; 08-31-2021 at 17:08.
vikingo12 is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 09-01-2021 , 14:33   Re: [L4D & L4D2] Target Override (2.15a) [09-Jul-2021]
Reply With Quote #90

I've sent you a PM with some changes to the code, please let me know if that works.

Code:
2.16 (09-Sep-2021)
    - Fixed not reading the entire data configs "order" value when the string was longer than 15 characters.
__________________

Last edited by Silvers; 09-09-2021 at 03:04.
Silvers 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 23:06.


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