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

[L4D2/CS:GO/TF2/NMRiH] VScript File Replacer (1.17) [28-Jan-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 07-14-2022 , 01:24   Re: [L4D2 & CS:GO & NMRiH] VScript File Replacer (1.12) [03-Jun-2022]
Reply With Quote #71

With the latest version, I get this error on startup:
Code:
L 07/13/2022 - 22:14:32: [SM] Exception reported: read_count (310590) is greater than buffer size (307200)
L 07/13/2022 - 22:14:32: [SM] Blaming: vscript_replacer.smx
L 07/13/2022 - 22:14:32: [SM] Call stack trace:
L 07/13/2022 - 22:14:32: [SM]   [0] File.ReadString
L 07/13/2022 - 22:14:32: [SM]   [1] Line 854, C:\Servers\L4D2\left4dead2\addons\sourcemod\scripting\vscript_replacer.sp::SaveFile
L 07/13/2022 - 22:14:32: [SM]   [2] Line 833, C:\Servers\L4D2\left4dead2\addons\sourcemod\scripting\vscript_replacer.sp::ValidateFileSave
L 07/13/2022 - 22:14:32: [SM]   [3] Line 798, C:\Servers\L4D2\left4dead2\addons\sourcemod\scripting\vscript_replacer.sp::SaveOverrides
L 07/13/2022 - 22:14:32: [SM]   [4] Line 625, C:\Servers\L4D2\left4dead2\addons\sourcemod\scripting\vscript_replacer.sp::ResetPlugin
L 07/13/2022 - 22:14:32: [SM]   [5] Line 228, C:\Servers\L4D2\left4dead2\addons\sourcemod\scripting\vscript_replacer.sp::OnPluginStart
L 07/13/2022 - 22:14:32: [SM] Unable to load plugin "vscript_replacer.smx": Error detected in plugin startup (see error logs)
Code:
<Error> "[L4D2 & CS:GO & NMRiH] VScript File Replacer" (1.12) by SilverShot
SourceMod Version: 1.11.0.6905
__________________
Psyk0tik is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-15-2022 , 05:02   Re: [L4D2 & CS:GO & NMRiH] VScript File Replacer (1.13) [15-Jul-2022]
Reply With Quote #72

Code:
1.13 (15-Jul-2022)
    - Increased buffer size. Thanks to "Psyk0tik" for reporting.
It's now 400 KB. If any VScripts are larger this error will trigger again. Must increase the "MAX_BUFFER" size. Hopefully this is good enough for a while, maybe I could just increase since those buffers are only temporarily used anyway.
__________________
Silvers is offline
GoGetSomeSleep
Senior Member
Join Date: Dec 2018
Location: Miami/Florida
Old 08-09-2022 , 08:48   Re: [L4D2 & CS:GO & NMRiH] VScript File Replacer (1.13) [15-Jul-2022]
Reply With Quote #73

can this replacer exec vscript hud's?
huds not working if out of gamemode.nut like coop.nut.
when trying to example.nut within coop.nut its gives errors.
GoGetSomeSleep is offline
moschinovac
Member
Join Date: Mar 2019
Location: Vietnam
Old 08-09-2022 , 14:10   Re: [L4D2 & CS:GO & NMRiH] VScript File Replacer (1.13) [15-Jul-2022]
Reply With Quote #74

Quote:
Originally Posted by GoGetSomeSleep View Post
can this replacer exec vscript hud's?
huds not working if out of gamemode.nut like coop.nut.
when trying to example.nut within coop.nut its gives errors.
From my knowledge, U can create Vscripts HUD inside coop.nut… if thats what u mean…
moschinovac is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 08-09-2022 , 17:31   Re: [L4D2 & CS:GO & NMRiH] VScript File Replacer (1.13) [15-Jul-2022]
Reply With Quote #75

gamemode.nut (an other vscripts) may not work if you are using addons (not plugin) that replaces these files as well. (e.g: Admin Commands), also, you weren't much clear about the issue I didn't understand what problem you are having.
__________________
Marttt is offline
GoGetSomeSleep
Senior Member
Join Date: Dec 2018
Location: Miami/Florida
Old 08-11-2022 , 04:14   Re: [L4D2 & CS:GO & NMRiH] VScript File Replacer (1.13) [15-Jul-2022]
Reply With Quote #76

Quote:
Originally Posted by Marttt View Post
gamemode.nut (an other vscripts) may not work if you are using addons (not plugin) that replaces these files as well. (e.g: Admin Commands), also, you weren't much clear about the issue I didn't understand what problem you are having.
i just can't exec hud vscript without coop.nut or versus.nut etc. gives errors
GoGetSomeSleep is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 12-20-2022 , 03:35   Re: [L4D2/CS:GO/TF2/NMRiH] VScript File Replacer (1.15) [20-Dec-2022]
Reply With Quote #77

Code:
1.15 (20-Dec-2022)
    - Added support for Team Fortress 2.
    - GameData file and plugin updated.
This is untested so please let me know if it's working or not.
__________________
Silvers is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 12-22-2022 , 16:25   Re: [L4D2/CS:GO/TF2/NMRiH] VScript File Replacer (1.15) [20-Dec-2022]
Reply With Quote #78

Quote:
Originally Posted by Silvers View Post
This is untested so please let me know if it's working or not.
I tried this on TF2 but it didn't seem to do what I wanted. Can you tell me what I'm doing wrong?

1. I type sm_vs_dump at the server console but no vscripts_dump directory appears in the /tf/scripts/ directory.

2. I'm trying to replace a variable in the vscript running on this map: https://steamcommunity.com/sharedfil...?id=2898876728

3. Within that map is a vscript labeled 'mvmupgrade.nut' which contains this code:
PHP Code:
ForceEnableUpgrades(2);

function 
OnGameEvent_player_death(params)
{
    
local player GetPlayerFromUserID(params.attacker)
    
local victim GetPlayerFromUserID(params.userid)

    if(
player != victim)
    {
        
local cash 75
        local killReward 
player.GetCurrency() + cash

        player
.SetCurrency(killReward)
    }
    else
    {
        
player.RemoveCurrency(150)
    }

}
__CollectGameEventCallbacks(this

4. The variable I want to replace is "cash" which is set within the code with this line: "local cash = 75". I want to change the amount from 75 to 0.

5. To do that, I made this vscripts_override.cfg file and placed it in /tf/addons/sourcemod/data/ directory.
PHP Code:
"vscript_replacer"
{
    
"ctf_2fort_mvmupgrades"
    
{
        
"nepjr_ctf_2fort_mvmupgrades"
        
{
            
"local cash = 75;"                "local cash = 0;"
        
}
    }
    
"ctf_turbine_mvmupgrades"
    
{
        
"nepjr_ctf_turbine_mvmupgrades"
        
{
            
"local cash = 75;"                "local cash = 0;"
        
}
    }

6. I used the filename of "nepjr_ctf_turbine_mvmupgrades" because while the actual filename is "mvm_upgrade.nut" the sm_vs_listen command showed the former as being executed.

Any idea what I'm doing wrong?
PC Gamer is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 12-22-2022 , 17:07   Re: [L4D2/CS:GO/TF2/NMRiH] VScript File Replacer (1.15) [20-Dec-2022]
Reply With Quote #79

Anything in the error logs?

1. Should appear in "/tf/scripts/vscripts/vscripts_dump/" folder, does the command reply anything after executing?

2. The map name is definitely "nepjr_ctf_2fort_mvmupgrades" ?

3. Did you try with "mvmupgrade" script name? Maybe try using that with the cash at a different value, although it seems you have it right if "sm_vs_listen" showed that script name. Does the map have "nepjr_ctf_turbine_mvmupgrades" script name?

4. You have ";" at the end of the string, the script you showed doesn't, so that would cause it to not match. Remove the extra ";" for the search string. Otherwise everything looks correct.
__________________
Silvers is offline
PC Gamer
Veteran Member
Join Date: Mar 2014
Old 12-22-2022 , 18:31   Re: [L4D2/CS:GO/TF2/NMRiH] VScript File Replacer (1.15) [20-Dec-2022]
Reply With Quote #80

Thanks for the help!

I was able to get parts of the plugin working.

I had the config wrong. This one works:
PHP Code:
"vscript_replacer"
{
    
"ctf_2fort_mvmupgrades"
    
{
        
"nepjr_ctf_2fort_mvmupgrades"
        
{
            
"cash = 75"                "cash = 0"
        
}
    }
    
"ctf_turbine_mvmupgrades"
    
{
        
"mvmupgrade"
        
{
            
"cash = 75"                "cash = 0"
        
}
    }

However, I couldn't get 'sm_vs_dump' or 'sm_vs_reload' to do anything when I typed it in the console. No output message and no errors. It didn't dump a file and it didn't reload the config.

Last edited by PC Gamer; 12-23-2022 at 06:54.
PC Gamer 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 01:46.


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