AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] ConVars Anomaly Fixer (https://forums.alliedmods.net/showthread.php?t=307804)

Dragokas 05-25-2018 15:35

[ANY] ConVars Anomaly Fixer
 
1 Attachment(s)
Description:
Cfg Console Variables anomaly happens time by time, and caused by Valve bug:
values can not be read from cfg-files and remains by default if you reach some limit
of the number of lines in server.cfg / or cfg-files in total / or by chance.

This problem is described more in the topic: https://forums.alliedmods.net/showthread.php?t=307696

Also, this plugin check:
- if some cfg files contain wrong values that exceed max/min value allowed or max. length.
- unused (non-existent) ConVars.
- duplicated ConVars.
Commands:
- "sm_convar_anomaly_show" - to compare values in cfg files with actual in-game Cvar to find anomalies/unused cvars.
- "sm_convar_anomaly_fix" - to attempt to fix Cvar anomalies (log will be short - only info about fixes).

By default, log-file is located at "addons/sourcemod/logs/CVar_Anomaly.log"
Settings (ConVars):
- "convar_anomaly_autofix" - fix Cvar anomaly automatically before each map start? (0 - off, 1 - on {default}).
- "convar_anomaly_roundstart" - Do additional check/fix on each round start (0 - Disabled, 1 - Enabled)
- "convar_anomaly_fix_nondefault" - Include all convars in fix even those who have non-default value, but different from cfg (0 - Fix default values only, 1 - Fix all)
- "convar_anomaly_server_last" - 0 - process cfg files in default Valve order [server.cfg go first], 1 - broke rules and overwrite convars by server.cfg file). This include files in 'convar_cfg_files_include'
- "convar_cvar_check_areas" - Areas to check for (-1 - All, 1 - difference in values, 2 - nonexistent convars, 8 - overflows, 16 - duplicate convars)
- "convar_anomaly_logpos" - where to write log? (1 - client conlose, 2 - server console, 4 - file, 1+2+4=7 - all places).
- "convar_cfg_files_include" - if you need more cfg-files to process, place them here, separated by star (*)
- "convar_cfg_files_exclude" - if you need exclude some cfg-files from processing, place them here, separated by star (*)
- "convar_cvar_names_exclude" - if you need concrete ConVars to exclude from processing, place them here, separated by star (*)
Warning: some plugins / game specifically change its ConVars in-game process, so the final report is not necessarily accurate.

Using:
TODO.
For most cases, it's enough just to copy .smx file to addons/sourcemod/plugins
Conflicts:
Map configs plugins:
- Extended Map configs by Milo, - if you using it, you have to set "convar_anomaly_roundstart" to 0
- Map configs from berni - incompatible at all
- some plugins may start to throw an error "Cannot create entity when no map is running". Fix for this error should come from plugin authors, not me.
Recommended plugins:
[ANY] Restart empty server
Credits:
Silvers - for initial parser and nice plugins I studied on.
hmmmmm - for floating point operation tips.
Neuro Toxin - for raw IsNumeric() function
Related plugins:
Buffer Overflow Fixer - Good to fix Cvar on earlier stage than my plugin, but require DHooks extensions and SM 1.8+
Cvar Configs Updater - good for commenting unused convars in cfg files to decrease probability of issue
Donate
Donates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
- Patreon
- BitCoin
- Ю.Money

Dragokas 05-25-2018 15:39

Re: [ANY] ConVars Anomaly Fixer
 
Here is example of report by manual show/fix, using my plugin:

Quote:



2018-05-25, 22:22:26 - show

[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/l4d_evil_witch.cfg, Cvar: l4d_witch_chance_followsurvivor, Value: 60.0 (default: 60.0), should be: 100.0
[CVar_Anomaly]: ConVar is not used: l4d_cs_alltalk, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_deadalltalk, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_enable, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_noinfected, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_respawntime, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_survivorglow, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_teambalance, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: sm_configs_comment, cfg: cfg/sourcemod/sm_configs.cfg
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/l4dinfectedbots.cfg, Cvar: l4d_infectedbots_boomer_limit, Value: 1 (default: 1), should be: 2
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/l4dinfectedbots.cfg, Cvar: l4d_infectedbots_ghost_time, Value: 2 (default: 2), should be: 3
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/l4dinfectedbots.cfg, Cvar: l4d_infectedbots_lifespan, Value: 40 (default: 40), should be: 80
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/l4dinfectedbots.cfg, Cvar: l4d_infectedbots_max_specials, Value: 4 (default: 4), should be: 6
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/l4dinfectedbots.cfg, Cvar: l4d_infectedbots_smoker_limit, Value: 1 (default: 1), should be: 2
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/l4dinfectedbots.cfg, Cvar: l4d_infectedbots_spawn_time_max, Value: 30 (default: 30), should be: 25
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/l4dinfectedbots.cfg, Cvar: l4d_infectedbots_spawn_time_min, Value: 25 (default: 25), should be: 15
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/l4dinfectedbots.cfg, Cvar: l4d_infectedbots_spawns_disabled_tank, Value: 0 (default: 0), should be: 1
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/l4d_cvar_test.cfg, Cvar: l4d_cvar_test_notify, Value: 1 (default: 1), should be: 0
[CVar_Anomaly]: ConVar is not used: sm_reserve_type, cfg: cfg/sourcemod/sourcemod.cfg
[CVar_Anomaly]: ConVar is not used: sm_reserved_slots, cfg: cfg/sourcemod/sourcemod.cfg
[CVar_Anomaly]: ConVar is not used: sm_hide_slots, cfg: cfg/sourcemod/sourcemod.cfg
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/sm_plugin_votemanager2.cfg, Cvar: l4d_vote_difficulty_access, Value: (default: ), should be: z
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/sm_plugin_votemanager2.cfg, Cvar: l4d_vote_level_access, Value: (default: ), should be: z
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/sm_plugin_votemanager2.cfg, Cvar: l4d_vote_restart_access, Value: (default: ), should be: z
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/sm_plugin_votemanager2.cfg, Cvar: l4d_vote_surv_restart_access, Value: (default: ), should be: z
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/sourcemod/sm_plugin_votemanager2.cfg, Cvar: l4d_vote_timeout, Value: 0 (default: 0), should be: 60
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: z_tank_rock_debug, Value: 0 (default: 0), should be: 1
[CVar_Anomaly]: ConVar is not used: log, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: logaddress_add, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: z_witch_speed, Value: 400 (default: 300), should be: 210
[CVar_Anomaly]: ConVar is not used: plugins_reset_after_campaign, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: z_hunter_lunge_distance, Value: 1500 (default: 750), should be: 950
[CVar_Anomaly]: ConVar is not used: sm_swm_msgtype, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: sm_swm_messagelines, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: z_hunter_health, Value: 270 (default: 250), should be: 280
[CVar_Anomaly]: ConVar is not used: sm_downloader_enabled, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: sm_downloader_normal, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: sm_downloader_simple, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: sv_allow_dlfile, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: director_no_human_zombies, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: l4d_maxplayers, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: mp_disable_autokick, cfg: cfg/server.cfg
[CVar_Anomaly]: Cfg value is too big. Cfg: cfg/server.cfg, Cvar: net_maxfilesize, CfgValue: 128 (max: 64.000000)
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: net_maxfilesize, Value: 16 (default: 16), should be: 128
[CVar_Anomaly]: ConVar is not used: director_no_human_zombies, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: l4d_maxplayers, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: sv_maxupdaterate, Value: 100 (default: 60), should be: 66
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: sv_minupdaterate, Value: 33 (default: 10), should be: 40
[CVar_Anomaly]: ConVar is not used: cl_witch_light_brightness, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: music_dynamic_witch_near_min, Value: 360 (default: 360), should be: 10
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: music_dynamic_witch_near_max, Value: 1800 (default: 1800), should be: 100
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: music_dynamic_witch_alert_interval, Value: 37 (default: 37), should be: 5
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: z_witch_anger_rate, Value: 1 (default: 0.2), should be: 0.1
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: z_witch_burn_time, Value: 55 (default: 15), should be: 75
[CVar_Anomaly]: Total Files: 38 (ConVars: 351)



2018-05-25, 22:22:34 - FIX

[CVar_Anomaly]: Successfully changed convar: l4d_witch_chance_followsurvivor
[CVar_Anomaly]: Successfully changed convar: l4d_infectedbots_boomer_limit
[CVar_Anomaly]: Successfully changed convar: l4d_infectedbots_ghost_time
[CVar_Anomaly]: Successfully changed convar: l4d_infectedbots_lifespan
[CVar_Anomaly]: Successfully changed convar: l4d_infectedbots_max_specials
[CVar_Anomaly]: Successfully changed convar: l4d_infectedbots_smoker_limit
[CVar_Anomaly]: Successfully changed convar: l4d_infectedbots_spawn_time_max
[CVar_Anomaly]: Successfully changed convar: l4d_infectedbots_spawn_time_min
[CVar_Anomaly]: Successfully changed convar: l4d_infectedbots_spawns_disabled_tank
[CVar_Anomaly]: Successfully changed convar: l4d_cvar_test_notify
[CVar_Anomaly]: Successfully changed convar: l4d_vote_difficulty_access
[CVar_Anomaly]: Successfully changed convar: l4d_vote_level_access
[CVar_Anomaly]: Successfully changed convar: l4d_vote_restart_access
[CVar_Anomaly]: Successfully changed convar: l4d_vote_surv_restart_access
[CVar_Anomaly]: Successfully changed convar: l4d_vote_timeout
[CVar_Anomaly]: Successfully changed convar: z_tank_rock_debug
[CVar_Anomaly]: Successfully changed convar: z_witch_speed
[CVar_Anomaly]: Successfully changed convar: z_hunter_lunge_distance
[CVar_Anomaly]: Successfully changed convar: z_hunter_health
[CVar_Anomaly]: FAILURE. Unable to fix value of convar: net_maxfilesize
[CVar_Anomaly]: Successfully changed convar: sv_maxupdaterate
[CVar_Anomaly]: Successfully changed convar: sv_minupdaterate
[CVar_Anomaly]: Successfully changed convar: music_dynamic_witch_near_min
[CVar_Anomaly]: Successfully changed convar: music_dynamic_witch_near_max
[CVar_Anomaly]: Successfully changed convar: music_dynamic_witch_alert_interval
[CVar_Anomaly]: Successfully changed convar: z_witch_anger_rate
[CVar_Anomaly]: Successfully changed convar: z_witch_burn_time
[CVar_Anomaly]: Total Files: 38 (ConVars: 351)



2018-05-25, 22:22:38 - show

[CVar_Anomaly]: ConVar is not used: l4d_cs_alltalk, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_deadalltalk, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_enable, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_noinfected, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_respawntime, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_survivorglow, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: l4d_cs_teambalance, cfg: cfg/sourcemod/l4d_cs.cfg
[CVar_Anomaly]: ConVar is not used: sm_configs_comment, cfg: cfg/sourcemod/sm_configs.cfg
[CVar_Anomaly]: ConVar is not used: sm_reserve_type, cfg: cfg/sourcemod/sourcemod.cfg
[CVar_Anomaly]: ConVar is not used: sm_reserved_slots, cfg: cfg/sourcemod/sourcemod.cfg
[CVar_Anomaly]: ConVar is not used: sm_hide_slots, cfg: cfg/sourcemod/sourcemod.cfg
[CVar_Anomaly]: ConVar is not used: log, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: logaddress_add, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: z_witch_burn_time, Value: 75 (default: 15), should be: 55
[CVar_Anomaly]: ConVar is not used: plugins_reset_after_campaign, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: sm_swm_msgtype, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: sm_swm_messagelines, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: sm_downloader_enabled, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: sm_downloader_normal, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: sm_downloader_simple, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: sv_allow_dlfile, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: director_no_human_zombies, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: l4d_maxplayers, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: mp_disable_autokick, cfg: cfg/server.cfg
[CVar_Anomaly]: Cfg value is too big. Cfg: cfg/server.cfg, Cvar: net_maxfilesize, CfgValue: 128 (max: 64.000000)
[CVar_Anomaly]: ConVar value is different. Cfg: cfg/server.cfg, Cvar: net_maxfilesize, Value: 64.000000 (default: 16), should be: 128
[CVar_Anomaly]: ConVar is not used: director_no_human_zombies, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: l4d_maxplayers, cfg: cfg/server.cfg
[CVar_Anomaly]: ConVar is not used: cl_witch_light_brightness, cfg: cfg/server.cfg
[CVar_Anomaly]: Total Files: 38 (ConVars: 351)

Psyk0tik 05-25-2018 15:48

Re: [ANY] ConVars Anomaly Fixer
 
Just out of curiosity, how often does this bug occur? I haven't encountered this bug before.

Dragokas 05-25-2018 16:01

Re: [ANY] ConVars Anomaly Fixer
 
I have 2 servers. Both show strange results on Cvars I sure not affected by another plugins / games / or original plugin itself. So their Cvar values should be exactly == as defined in .cfg file.

But once I touch some thing on my server (like remove/update some plugin or .cfg), sm_convar_anomaly show that absolutely new ConVars became disobedient.

Also, did you read previous topic, where 2 identical plugins with identical info in .cfg show different values of their Cvars? I reproduced that bug, and this plugin successfully fixed that case.
Actually, I faced this problem long time ago, but I didn't know at that time what is the cause, and how to track it, especially because it is soooo random. Shit, Valve. So much headache.

Anyway, you can install this plugin on your server and enter "sm_convar_anomaly_show" to see does your server have any problems.
It will not fix anything until you enter "sm_convar_anomaly_fix" command or set "convar_anomaly_autofix" ConVar to 1. It not touch files, just in-game Cvars (volatile).

Also, this (not only this) plugin show sometimes in client console complete garbage for unknown reason (another Valve bug ???). That's why we have here 3 options: display log in client / server console or to file.

ricksfishin 05-25-2018 22:33

Re: [ANY] ConVars Anomaly Fixer
 
I have 2 linux servers cfg sourcemod cfg's some don't execute. I have to put a bunch in server.cfg Have for a long time.

Visual77 05-26-2018 04:12

Re: [ANY] ConVars Anomaly Fixer
 
It's a linux srcds only issue on the only games l4d1+2. The linux srcds can't handle large cfg files without a buffer overflow.

Allower 07-19-2018 09:58

Re: [ANY] ConVars Anomaly Fixer
 
Quote:

Originally Posted by Visual77 (Post 2593907)
It's a linux srcds only issue on the only games l4d1+2. The linux srcds can't handle large cfg files without a buffer overflow.

No, CSGO have this problem on all platforms. CSGO love change bot_quota, mp_match_restart_delay, mp_match_end_restart, sv_full_alltalk as he wants, and some many other server cvars.

All of us know about CSGO's stuped bot_quota system.

You have large gamemode_MODE_NAME_server.cfg? you have cvar problems!
You have large server.cfg? you have cvar problems!
You have csgo server at years? You know about this sh**t problems!!!

Dragokas 07-19-2018 11:20

Re: [ANY] ConVars Anomaly Fixer
 
Updated to:

1.1 (27-May-2018 )
- Improved log format for fix/error msg a little bit.
- Added "convar_cvar_check_areas" ConVar to choose the area you need to check for (1 - difference in values, 2 - nonexistent convars, 3 - overflows, 4 - All {by default}).
- Little checks, like cfg file presence.


For some reason, plugin sometimes could not read its own variable "convar_anomaly_autofix" with AutoExecConfigSmart(),
so to activate plugin it's better to change line of code:
Code:

g_hCvarAutoFix = CreateConVar(                "convar_anomaly_autofix",                "0" <------ change to 1.

Dragokas 09-11-2018 03:30

Re: [ANY] ConVars Anomaly Fixer
 
Updated to:

1.2 (07-Sep-2018 )
- Fixed: log is not created when convar_anomaly_autofix == 0.
- Removed dependency of <regexp> because it can't be compiled for SM v.1.7.3 (due to SM core bug).

P.S.
There are no more reasons to use this plugin in SM v1.8+. SilverShot wrote a replacement that work on more earlier stage: Buffer Overflow Fixer
Still, this plugin is required for some servers, because "Buffer Overflow Fixer" not always work.

Or, if you just would like to test/analyze your server for bugs with cfg, you can also use my plugin.

Dragokas 02-11-2019 00:02

Re: [ANY] ConVars Anomaly Fixer
 
1.4 (24-Jan-2019)
- I made attempt to reduce conflicts with 3-rd party plugins that specially change global convars to non-default values during the game.
Such convars will no longer be fixed on map start (with the exception of convars that had been set to its defaults). To force fixing such convars (old behaviour), enable "convar_anomaly_fix_nondefault"
- Added current map name to the log.
- Corrected ArrayList buffer size and increased other buffers.
- Integrated all command list to excludes when evaluating convar that are not exist. No more need to add cmds like "exec", "setmaster" to "convar_cvar_names_exclude".
- "overflow" area check is expanded to cover: "Command too long" errors, which cause convar is completely ignored by server.
- added new area to check: "duplicated convars".
- Fixed the order of cfg files reading (according to Valve rules). 'server.cfg' is go first now. It will not overwrite convars if there are duplicated in cfg/sourcemod/ *.cfg files.
If you prefer vice versa order (old behaviour of this plugin) to allow server.cfg convars overwrite another convars, set "convar_anomaly_server_last" to 1.
- server.cfg is now not optional.
- "convar_cvar_check_areas" for "overflows" is replaced by index 8.
- Fixed case sensitivity errors like "z_difficulty (Value: Hard, should be: hard)".
- It is recommended you remove "cfg/sourcemod/sm_convar_anomaly.cfg" file before installing this version.

1.3 (13-Jan-2019)
- Added additional ConVar check on round start.
(some buggy servers known to change ALL convars to defaults after last player leave the game in the way even "command buffer overflow" Silver's fix doesn't help)
Be attentive! It can conflict with another plugins. Disable it by "convar_anomaly_roundstart" convar if you ensure your server has no such bug. Tip: you can check it by "sm_convar_anomaly_show" command.

iGANGNAM 03-29-2019 03:17

Re: [ANY] ConVars Anomaly Fixer
 
Quote:

[CVar_Anomaly]: Can't process cfg file. Not exist: "./cfg/server.cfg".
[CVar_Anomaly]: Total Files: 19 (ConVars: 202)
why it doesnt check for custom server.cfg file?

Dragokas 03-29-2019 04:38

Re: [ANY] ConVars Anomaly Fixer
 
Because I didn't know it can be custom. How to find it?

iGANGNAM 03-29-2019 06:11

Re: [ANY] ConVars Anomaly Fixer
 
Quote:

servercfgfile
"servercfgfile" = "csgoserver-2.cfg" ( def. "server.cfg" ) game

Dragokas 03-29-2019 06:21

Re: [ANY] ConVars Anomaly Fixer
 
Where this cvar is defined? (in autoexec.cfg?)

iGANGNAM 03-29-2019 06:29

Re: [ANY] ConVars Anomaly Fixer
 
Quote:

Originally Posted by Dragokas (Post 2645381)
Where this cvar is defined? (in autoexec.cfg?)

command line on startup +servercfgfile something.cfg

Dragokas 03-29-2019 07:05

Re: [ANY] ConVars Anomaly Fixer
 
Updated to:
Quote:

1.5 (29-Mar-2019)
- Added support for non-default server.cfg location defined by "servercfgfile" ConVar (thanks to iGANGNAM).

Dragokas 04-04-2019 12:47

Re: [ANY] ConVars Anomaly Fixer
 
Added notice about "recommended plugins".

Dragokas 12-18-2019 03:37

Re: [ANY] ConVars Anomaly Fixer
 
Updated.

Quote:

1.8 (18-Dec-2019)
- Added "sv_cheats" ON/OFF handling, caused some ConVars to reset to its defaults, when administrator (or 3rd party plugin) uses cheats ConVar.
- Added "exec" and "sm_execcfg" handling, when they are written in server.cfg file. Subsequent files are automatically parsed now.
- Performance optimizations.

1.7 (22-Nov-2019)
- Decreased server log size and optimized speed by temporarily removing NOTIFY flag while ConVar is being changed.
- Log file write access is fixed.

1.6 (12-May-2019)
- Fixed: log file is created even with logpos != 4 bit.
- now, by default, plugin is not create log anymore. Otherwise, set "convar_anomaly_logpos" ConVar to what you need.

Ruthless1 06-09-2020 12:34

Re: [ANY] ConVars Anomaly Fixer
 
Thank you for this plugin!

I've spent countless hours trying to work out why changes to my ConVars in FileZilla wasn't being reflected on my L4D2 server despite all files/changes being uploaded correctly.

Installed this plugin and all the changes I made in the past have now appeared and correct in my server.

Good work!

Tonblader 10-27-2020 16:42

Re: [ANY] ConVars Anomaly Fixer
 
This plugin generates conflicts with this plugin:

Extended Map configs

Overwrite values that you defined in Extended Map configs plugin.

The problem occurs, after restarting a round, the values previously defined in Extended Map configs are restored to the default values of the others plugins established in their respective *.cfg

Example:
[L4D2] Healing Gnome

In l4d2_gnome.cfg you can establish this cvar to:

l4d2_gnome_safe "1"

And in mapconfig\maps\c1m1_hotel.cfg of the Extended Map configs plugin

l4d2_gnome_safe "0"

So when you restart the round, the gnome appears, when it shouldn't.

Dragokas 10-27-2020 17:39

Re: [ANY] ConVars Anomaly Fixer
 
You can add your cfg files in the exclusion list:
Code:

- "convar_cfg_files_exclude" - if you need exclude some cfg-files from processing, place them here, separated by star (*)
If that plugin is popular, I could add a similar exclusion ConVar for the whole folder and add "mapconfig" there by default.

Dragokas 11-17-2020 14:06

Re: [ANY] ConVars Anomaly Fixer
 
Tonblader, I took a closer look.
You need to set "convar_anomaly_roundstart" to 0 for preventing the conflict.
That's about Extended Map configs by Milo.

As about similar one Map configs from berni, it is incompatible at all and cannot be used together with this plugin.

This happens because of ConVar Fix order. We are both using OnAutoConfigsBuffered(). If his plugin is first in load order, then my plugin thinks ConVar has a bugged value and overwrites it. I can't see how that can be resolved.

Wolfyy 02-14-2021 03:02

Re: [ANY] ConVars Anomaly Fixer
 
Hello, I have had problems reading individual cfg values on every server for years.
Nothing could help me so far and all attempts were unsuccessful.
Then I found this plugin and everything works perfectly now.
I can finally have a server just the way I want it and without compromise.
That's why I thank you a thousand times over.
You are my Hero ! ❤️*🔥

Dragokas 03-25-2022 12:57

Re: [ANY] ConVars Anomaly Fixer
 
Updated.

Quote:

1.10 beta (25-Mar-2022)
- ConVar default value for "convar_anomaly_fix_nondefault" forced to 1.

1.9 beta (29-Jan-2020) - Unfinished.
- added "ConVar handles leak" detection method and partial fix (Note: no more actual in SM v.1.10, SM v.1.11).
Details on bug: https://github.com/alliedmodders/sourcemod/issues/1166
(PS. This is already fixed 11-Feb-2020 in SM >= 1.10.6462, and SM >= 1.9.6462)
If you have a lower SM version, to check for leaking and fix it:
* set "convar_cvar_check_areas" to -1 (or to 32 for checking this area only).
* enable log "convar_anomaly_logpos" to -1 (or to 4 to write to logfile only).
* execute "sm_convar_anomaly_show"
* search log "logs/CVar_Anomaly.log" for [LEAK] lines.
* follow instruction from the log by renaming your ConVars to correct case of letters.
* wait for SourceMod update and install it, if possible, to fix leak competely.
* Note, "ConVar Anomaly fixer" is unable to find such leaks coming from 3rd party plugins at the moment,
use sm_dump_handles addons/sourcemod/handles.txt to make 2 dumps: current and after new map start,
and compare convar handles count using online service: https://hexer10.github.io/Sourcemod-HandleDumpParser/

- Included and extended ConVar precision fix made by asherkin: https://forums.alliedmods.net/showthread.php?t=300683
Technical info:
* fix is applied to both affected parts of ConVar: floating and integer;
* fix is limited by signed integer range, because it is SourceMod limitation;
* (TODO) when "string" part of value is exceeds signed integer range,
"Anomaly fixer" set ConVar float/int part to the maximum / or minimum value preserving the sign
to allow game correctly process < > arithmetics, e.g.: 9999999999 => +2147483647 (affected) and -9999999999 => -2147483648 (actually, usual behaviour),
nevertheless, "string" part is not touched;
* fix is checked against all numeric ConVars;
* fix is enabled for all games at the moment.

-todo: find the way to clarify the maximum value length of individual cvars (like sv_tags).

Other corrections:
- commands list, used for exclusions, is more complete now, retrieved on all plugins loaded stage.
- fixed missing CloseHandle of commands list iterator.
- nested config names are correctly displayed now in log when executed with "exec" command from the root config.
- improved "number" validation functions. Allowed "+" sign before numbers in ConVars (this is by design).

- Log lines are prefixed now, depending on the reason:

* [MISFORMAT] - incorrect value type
* [LIMIT] - out of bounds value
* [LENGTH] - value is exceed the maximum length allowed
* [DIFFERENT] - value differs from the one set in the cfg settings
* [FAILURE] - plugin is unable to fix the value
* [SUCCESS] - plugin is successfully fixed the value
* [WARNING] - some specific messages
* [UNUSED] - convar is not exist, possibly, the original plugin has been removed
* [LEAK] - incorrect ConVar name causes handles leak - you have to check letter case in the ConVar name or update your SM version.

// TODO: Add global forward OnConVarAnomalyFixed() to give ability for conflicting 3rd party plugins to replace the value if required.

shinubee 03-30-2022 05:07

Re: [ANY] ConVars Anomaly Fixer
 
Server restarts infinitely when plugin is used with HarryPotterInfected Bots Control Improved Version 2.6.8
Quote:

L 03/30/2022 - 16:43:30: Staying on original map c5m1_waterfront
L 03/30/2022 - 16.43.30 CDirector::RunScript, scriptedmode, level: 1
ScriptMode loaded coop and now Initializing
L 03/30/2022 - 16.43.30 CDirector::RunScript, director_base, level: 0
Initializing Director's script
Couldn't find any entities named spawn_fryingpan_demo, which point_template template_demo is specifying.
jukebox_script executing script: jukebox_main
L 03/30/2022 - 16.43.30 Preventing spawning
L 03/30/2022 - 16.43.30 CDirector::RunScript, scriptedmode, level: 1
ScriptMode loaded coop and now Initializing
L 03/30/2022 - 16.43.30: CDirector::RunScript, director_base, level: 0
Initializing Director's script
L 03/30/2022 - 16.43.30 World triggered "Round_Start"
Server waking up from hibernation
Server is hibernating
ConVarRef test_progression_loop doesn't point to an existing ConVar
L 03/30/2022 - 16.43.30 server_cvar: "sv_tags" "gravity,hidden"
L 03/30/2022 - 16.43.30 World triggered "L4D_Scenario_Restart" (Infected "0") (Survivor "0")
L 03/30/2022 - 16.43.30 Team "Infected" scored "0" with "0" players
L 03/30/2022 - 16.43.30 Team "Survivor" scored "0" with "0" players
L 03/30/2022 - 16.43.30 World triggered "Round_End"
L 03/30/2022 - 16.43.30 Staying on original map c5m1_waterfront
L 03/30/2022 - 16:43:30: CDirector::RunScript, scriptedmode, level: 1
ScriptMode loaded coop and now Initializing
L 03/30/2022 - 16:43:30: CDirector::RunScript, director_base, level: 0
Initializing Director's script
Couldn't find any entities named spawn_fryingpan_demo, which point_template template_demo is specifying.
jukebox_script executing script: jukebox_main
L 03/30/2022 - 16:43:30: Preventing spawning
L 03/30/2022 - 16:43:30: CDirector::RunScript, scriptedmode, level: 1
ScriptMode loaded coop and now Initializing
L 03/30/2022 - 16:43:30: CDirector::RunScript, director_base, level: 0
Initializing Director's script
L 03/30/2022 - 16:43:30: World triggered "Round_Start"
Server waking up from hibernation
Server is hibernating
ConVarRef test_progression_loop doesn't point to an existing ConVar
L 03/30/2022 - 16:43:30: server_cvar: "sv_tags" "gravity,hidden"
L 03/30/2022 - 16:43:30: World triggered "L4D_Scenario_Restart" (Infected "0") (Survivor "0")
L 03/30/2022 - 16:43:30: Team "Infected" scored "0" with "0" players
L 03/30/2022 - 16:43:30: Team "Survivor" scored "0" with "0" players
L 03/30/2022 - 16:43:30: World triggered "Round_End"
L 03/30/2022 - 16:43:30: Staying on original map c5m1_waterfront
L 03/30/2022 - 16:43:30: CDirector::RunScript, scriptedmode, level: 1
ScriptMode loaded coop and now Initializing
L 03/30/2022 - 16:43:30: CDirector::RunScript, director_base, level: 0
Initializing Director's script
Couldn't find any entities named spawn_fryingpan_demo, which point_template template_demo is specifying.
jukebox_script executing script: jukebox_main
L 03/30/2022 - 16:43:30: Preventing spawning
L 03/30/2022 - 16:43:30: CDirector::RunScript, scriptedmode, level: 1
ScriptMode loaded coop and now Initializing
L 03/30/2022 - 16:43:30: CDirector::RunScript, director_base, level: 0
Initializing Director's script
L 03/30/2022 - 16:43:30: World triggered "Round_Start"
./srcds_run: line 312: 864513 Alarm clock
$HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
Server restart in 10 seconds
sorry my english is not good, use google translate to do it

Dragokas 03-30-2022 10:06

Re: [ANY] ConVars Anomaly Fixer
 
shinubee, please, provide your cfg/sourcemod/l4dinfectedbots.cfg file.

Also, check if cfg/sourcemod/sm_convar_anomaly.cfg:
Code:

convar_anomaly_roundstart 0
convar_anomaly_fix_nondefault 0

helps.

shinubee 03-31-2022 01:30

Re: [ANY] ConVars Anomaly Fixer
 
Quote:

Originally Posted by Dragokas (Post 2775540)
shinubee, please, provide your cfg/sourcemod/l4dinfectedbots.cfg file.

Also, check if cfg/sourcemod/sm_convar_anomaly.cfg:
Code:

convar_anomaly_roundstart 0
convar_anomaly_fix_nondefault 0

helps.

l4dinfectedbots.cfg
Quote:

// This file was auto-generated by SourceMod (v1.11.0.6858)
// ConVars for plugin "l4dinfectedbots.smx"


// If server has more than 4+ alive players, increase the certain value to 'l4d_infectedbots_default_commonlimit' each 'l4d_infectedbots_add_commonlimit_scale' players joins
// -
// Default: "2"
// Minimum: "0.000000"
l4d_infectedbots_add_commonlimit "2"

// If server has more than 4+ alive players, zombie common limit = 'default_commonlimit' + [(alive players - 4) ÷ 'add_commonlimit_scale' × 'add_commonlimit'].
// -
// Default: "1"
// Minimum: "1.000000"
l4d_infectedbots_add_commonlimit_scale "1"

// If server has more than 4+ alive players, increase the certain value to 'l4d_infectedbots_max_specials' each 'l4d_infectedbots_add_specials_scale' players joins
// -
// Default: "2"
// Minimum: "0.000000"
l4d_infectedbots_add_specials "2"

// If server has more than 4+ alive players, how many special infected = 'max_specials' + [(alive players - 4) ÷ 'add_specials_scale' × 'add_specials'].
// -
// Default: "2"
// Minimum: "1.000000"
l4d_infectedbots_add_specials_scale "2"

// If server has more than 4+ alive players, increase the certain value to 'l4d_infectedbots_default_tankhealth' each 'l4d_infectedbots_add_tankhealth_scale' players joins
// -
// Default: "500"
// Minimum: "0.000000"
l4d_infectedbots_add_tankhealth "500"

// If server has more than 4+ alive players, how many Tank Health = 'default_tankhealth' + [(alive players - 4) ÷ 'add_tankhealth_scale' × 'add_tankhealth'].
// -
// Default: "1"
// Minimum: "1.000000"
l4d_infectedbots_add_tankhealth_scale "1"

// If 1, adjust and overrides zombie common limit by this plugin.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_adjust_commonlimit_enable "1"

// Reduce certain value to maximum spawn timer based per alive player
// -
// Default: "1"
// Minimum: "0.000000"
l4d_infectedbots_adjust_reduced_spawn_times_o n_player "1"

// If 1, The plugin will adjust spawn timers depending on the gamemode
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_adjust_spawn_times "1"

// If 1, adjust and overrides tank health by this plugin.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_adjust_tankhealth_enable "1"

// If 1, only admins can join the infected team in coop/survival. (Access: generic_admin)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_admin_coop_versus "1"

// 0=Plugin off, 1=Plugin on.
// -
// Default: "1"
l4d_infectedbots_allow "1"

// If 1, announce current plugin status when the number of alive survivors changes.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_announcement_enable "1"

// Sets the limit for boomers spawned by the plugin
// -
// Default: "2"
// Minimum: "0.000000"
l4d_infectedbots_boomer_limit "2"

// Sets the limit for chargers spawned by the plugin
// -
// Default: "2"
// Minimum: "0.000000"
l4d_infectedbots_charger_limit "2"

// If 1, players can join the infected team in coop/survival (!ji in chat to join infected, !js to join survivors)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_coop_versus "1"

// If 1, clients will be announced to on how to join the infected team
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_coop_versus_announce "1"

// If 1, attaches red flash light to human infected player in coop/survival. (Make it clear which infected bot is controlled by player)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_coop_versus_human_light "1"

// Sets the limit for the amount of humans that can join the infected team in coop/survival
// -
// Default: "2"
// Minimum: "0.000000"
l4d_infectedbots_coop_versus_human_limit "2"

// If 1, tank will always be controlled by human player in coop/survival.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_coop_versus_tank_playable "0"

// If 1, bots will only spawn when all other bot spawn timers are at zero
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_coordination "0"

// Sets Default zombie common limit.
// -
// Default: "30"
// Minimum: "1.000000"
l4d_infectedbots_default_commonlimit "30"

// Sets Default Health for Tank, Tank hp is affected by gamemode and difficulty (Example, Set Tank health 4000hp, but in Easy: 3000, Normal: 4000, Versus: 6000, Advanced/Expert: 8000)
// -
// Default: "4000"
// Minimum: "1.000000"
l4d_infectedbots_default_tankhealth "4000"

// Sets the limit for hunters spawned by the plugin
// -
// Default: "2"
// Minimum: "0.000000"
l4d_infectedbots_hunter_limit "2"

// Toggle whether Infected HUD announces itself to clients.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_infhud_announce "1"

// Toggle whether Infected HUD is active or not.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_infhud_enable "1"

// The spawn timer in seconds used when infected bots are spawned for the first time in a map
// -
// Default: "10"
// Minimum: "0.000000"
l4d_infectedbots_initial_spawn_timer "10"

// Sets the limit for jockeys spawned by the plugin
// -
// Default: "2"
// Minimum: "0.000000"
l4d_infectedbots_jockey_limit "2"

// Amount of seconds before a special infected bot is kicked
// -
// Default: "30"
// Minimum: "1.000000"
l4d_infectedbots_lifespan "30"

// Defines how many special infected can be on the map on all gamemodes(does not count witch on all gamemodes, count tank in all gamemode)
// -
// Default: "2"
// Minimum: "0.000000"
l4d_infectedbots_max_specials "2"

// Turn on the plugin in these game modes, separate by commas (no spaces). (Empty = all).
// -
// Default: ""
l4d_infectedbots_modes ""

// Turn off the plugin in these game modes, separate by commas (no spaces). (Empty = none).
// -
// Default: ""
l4d_infectedbots_modes_off ""

// Turn on the plugin in these game modes. 0=All, 1=Coop/Realism, 2=Survival, 4=Versus, 8=Scavenge. Add numbers together.
// -
// Default: "5"
l4d_infectedbots_modes_tog "5"

// If 1, spawn special infected before survivors leave starting safe room area.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_safe_spawn "0"

// Disable sm_zs in these gamemode (0: None, 1: coop/realism, 2: versus/scavenge, 4: survival, add numbers together)
// -
// Default: "6"
// Minimum: "0.000000"
// Maximum: "7.000000"
l4d_infectedbots_sm_zs_disable_gamemode "6"

// Sets the limit for smokers spawned by the plugin
// -
// Default: "2"
// Minimum: "0.000000"
l4d_infectedbots_smoker_limit "2"

// The minimum of spawn range for infected in final stage rescue. (coop/realism only)
// -
// Default: "0"
// Minimum: "0.000000"
l4d_infectedbots_spawn_range_final "0"

// The maximum of spawn range for infected. (default: 1500, coop/realism only)
// -
// Default: "2000"
// Minimum: "1.000000"
l4d_infectedbots_spawn_range_max "2000"

// The minimum of spawn range for infected. (default: 550, coop/realism only)
// -
// Default: "0"
// Minimum: "0.000000"
l4d_infectedbots_spawn_range_min "0"

// Sets the max spawn time for special infected spawned by the plugin in seconds.
// -
// Default: "60"
// Minimum: "1.000000"
l4d_infectedbots_spawn_time_max "60"

// Sets the minimum spawn time for special infected spawned by the plugin in seconds.
// -
// Default: "40"
// Minimum: "1.000000"
l4d_infectedbots_spawn_time_min "40"

// If 1, Plugin will disable spawning infected bot when a tank is on the field.
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_spawns_disabled_tank "0"

// Sets the limit for spitters spawned by the plugin
// -
// Default: "2"
// Minimum: "0.000000"
l4d_infectedbots_spitter_limit "2"

// Sets the limit for tanks spawned by the plugin (does not affect director tanks)
// -
// Default: "1"
// Minimum: "0.000000"
l4d_infectedbots_tank_limit "1"

// When each time spawn S.I., how much percent of chance to spawn tank
// -
// Default: "5"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d_infectedbots_tank_spawn_probability "5"

// If 1, The plugin will force all players to the infected side against the survivor AI for every round and map in versus/scavenge
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_versus_coop "0"

// Amount of seconds before a witch is kicked. (only remove witches spawned by this plugin)
// -
// Default: "200"
// Minimum: "1.000000"
l4d_infectedbots_witch_lifespan "200"

// Sets the limit for witches spawned by the plugin (does not affect director witches)
// -
// Default: "10"
// Minimum: "0.000000"
l4d_infectedbots_witch_max_limit "10"

// If 1, still spawn witch in final stage rescue
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_infectedbots_witch_spawn_final "0"

// Sets the max spawn time for witch spawned by the plugin in seconds.
// -
// Default: "120.0"
// Minimum: "1.000000"
l4d_infectedbots_witch_spawn_time_max "120.0"

// Sets the mix spawn time for witch spawned by the plugin in seconds.
// -
// Default: "90.0"
// Minimum: "1.000000"
l4d_infectedbots_witch_spawn_time_min "90.0"


When I put convar_anomaly_roundstart or convar_anomaly_fix_nondefault set to 0 All restored are normal

z282846139 01-11-2023 09:36

Re: [ANY] ConVars Anomaly Fixer
 
[SM] Displaying 14 extensions:
[01] Automatic Updater (1.11.0.6927): Updates SourceMod gamedata files
[02] Webternet (1.11.0.6927): Extension for interacting with URLs
[03] SDK Tools (1.11.0.6927): Source SDK Tools
[04] BinTools (1.11.0.6927): Low-level C/C++ Calling API
[05] Top Menus (1.11.0.6927): Creates sorted nested menus
[06] SDK Hooks (1.11.0.6927): Source SDK Hooks
[07] Client Preferences (1.11.0.6927): Saves client preference settings
[08] SQLite (1.11.0.6927): SQLite Driver
[09] DHooks (1.11.0.6927): Dynamic Hooks
[10] <OPTIONAL> file "steamtools.ext.so": /home/l4d2server/serverfiles/left4dead2/addons/sourcemod/extensions/steamtools.ext.so: cannot open shared object file: No such file or directory
[11] SteamWorks Extension (1.2.3): Exposes SteamWorks functions to Developers
[12] <OPTIONAL> file "curl.ext.so": /home/l4d2server/serverfiles/left4dead2/addons/sourcemod/extensions/curl.ext.so: cannot open shared object file: No such file or directory
[13] <OPTIONAL> file "socket.ext.so": /home/l4d2server/serverfiles/left4dead2/addons/sourcemod/extensions/socket.ext.so: cannot open shared object file: No such file or directory
[14] Source Scramble (0.7.1): Tools for working with memory.

Code:

l4d2server@kaze:~/serverfiles/left4dead2/addons/sourcemod/scripting$ ./compile.sh sm_convar_anomaly.sp

Compiling sm_convar_anomaly.sp...
SourcePawn Compiler 1.11.0.6927
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2021 AlliedModders LLC

sm_convar_anomaly.sp(312) : warning 242: function "Timer_FixCvars" should return an explicit value
Code size:        21700 bytes
Data size:        28372 bytes
Stack/heap size:      16600 bytes
Total requirements:  66672 bytes

1 Warning.

I compiled and it comes 1 warning.

Dragokas 01-11-2023 14:30

Re: [ANY] ConVars Anomaly Fixer
 
Skip it.


All times are GMT -4. The time now is 22:29.

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