lua and max gs chars and queryclientcvar

Recommended Posts

So first time I have used this. Don't know really the side effects of using this.

I am using et.G_QueryClientCvar() r_mode and r_customwidth and r_customheight to get an estimation on how many characters can fit in a client's console.

The reason I am coming here is I am trying to figure out if my lua is taking up of the MAX_GAMESTATE_CHARS because Tweek reported many of his players are getting kicked after latest update. He does have a lot of maps, but hasn't added any for a while, and only started getting kicked after the update.

So my question is can et.G_QueryClientCvar cause a spike in maxgamestatechars or something else in lua perhaps, I don't think I made any other major changes that could have caused this spike.

Also it goes to cheat.log when it does a query, is there some way to disable this so it doesn't fill up that log.

Share on other sites

• Management

There is no relation between the et.G_QueryClientCvar and config strings. MAX_GAMESTATE_CHARS means that there is too much text in the config strings.

Share on other sites

Ok thank you, the only reason I thought there was a link is because of the forcecvar and sv_cvars take up csinfo if I remembered correctly.

Am not sure what else it could be, besides the pk3s.

Share on other sites

Ok thank you, the only reason I thought there was a link is because of the forcecvar and sv_cvars take up csinfo if I remembered correctly.

Am not sure what else it could be, besides the pk3s.

Not complete list but from top of my mind:

server motd,

player names,

omni bot names,

extra mod pk3 names,

settings in mapconfigs aka forcecvar and sv_cvars

Share on other sites

I do have a sets LuaESMod to the version number so I can see it on gametracker. But that has been in there since the beginning.

Is there a way to see the full output of the gamestate? Maybe I could look for something that would be a little off.

I know of csinfo but that just tells me the length.

Edited by Zelly
Share on other sites

• Management

Maybe you could print the config strings with Lua http://mygamingtalk.com/wiki/Silent_Lua#trap_GetConfigstring?The first two strings are set by the engine and those can have larger size than the rest. The rest can have maximum length of 1024 bytes each. The total MAX is something like half of the total space (all strings combined), for some weird and unknown reason, if I remember correctly.

Share on other sites

I will give it a shot, thanks.
Share on other sites

What I have so far...

But my total is much higher than csinfo which is what you mean by "The total MAX is something like half of the total space (all strings combined), for some weird and unknown reason, if I remember correctly."

My total was 7081 while csinfo said 4089

local _writetofile = function(line) -- append to csinfo.log
if not line then return et.G_LogPrint("Line empty\n") end
local status,f,err = pcall(io.open,"csinfo.log","a")
if not f then return et.G_LogPrint(err .."\n") end
if not status then return et.G_LogPrint(f .."\n") end
f:write(line)
f:close()
end

local _ljust = function(s,l,sep) --- Justify to left
if not s then s = "" end
if type(s) ~= "string" then s = tostring(s) end
if not l then return s end
if not sep then sep = " " end
if s:len() == l then return s end
l = l - 1
for k=s:len() , l do s = s .. sep end
return s
end

function et_ConsoleCommand( cmd )
local Arg0 = string.lower( et.trap_Argv(0) )
if Arg0 == "getcsinfo" then
local LOG_WITH_ZERO_LENGTH = false
local cs = { }
local MAX_CONFIGSTRINGS = 1024
local total_length = 0
local Arg1 = string.lower( et.trap_Argv(1) )

if Arg1 == "true" then LOG_WITH_ZERO_LENGTH = true end

for cs_index=1, MAX_CONFIGSTRINGS do
local cs_str = et.trap_GetConfigstring( cs_index-1 ) -- index is -1 since it starts at 0
local cs_len = cs_str:len()
total_length = total_length + cs_len
if cs_len > 0 or LOG_WITH_ZERO_LENGTH then
cs[#cs+1] = _ljust(cs_index-1,4) .. " | " .. _ljust(cs_len,4) .. " | " .. cs_str
end
end

_writetofile("\n\n" .. os.date("%c") .. " " .. et.trap_Cvar_Get('fs_game') .. " " .. et.trap_Cvar_Get('mapname') .. "\nTotal length: " .. total_length .. "\n")
_writetofile(table.concat(cs,"\n"))

et.G_LogPrint("Total length: " .. total_length .. "\n")
end
end
Anything you notice that is off?
Share on other sites

• Management

I meant that MAX_GAMESTATE_CHARS, the value when the error is triggered, would not be close to the actual available space. I don't know why csinfo gives different results. The value 7081 is not much. Does the content look ok?

Share on other sites

It appears so. I couldn't notice anything strange.

Tue Mar 31 22:19:28 2015 silent fueldump
Total length: 10300
0    | 837  | \LuaESMod\v2.7.5d\sv_sac\1\omnibot_playing\-1\mod_url\http://mygamingtalk.com/\mod_version\0.8.2\P\2121211-2\g_antilagDelay\0\g_maxlivesRespawnPenalty\0\voteFlags\19854755\g_balancedteams\1\g_maxGameClients\0\g_bluelimbotime\14000\g_redlimbotime\18000\gamename\silEnT\g_damageXPLevel\50\g_damageXP\1\g_heavyWeaponRestriction\100\g_maxConnsPerIP\4\g_tyranny\1\omnibot_enable\1\.Website\www.rdaclan.com\.Clan\=RDA=\.Owner\Tonto\.Admin\BLADE\g_gametype\6\g_antilag\1\g_voteFlags\0\g_alliedmaxlives\0\g_axismaxlives\0\g_minGameClients\0\g_needpass\0\g_maxlives\0\g_friendlyFire\0\sv_allowAnonymous\0\sv_floodProtect\0\sv_maxPing\0\sv_minPing\0\sv_maxRate\36000\sv_hostname\^1ROGUE ^3DUCKS ^1ATTACK ^3MAIN\sv_privateClients\0\mapname\fueldump\protocol\84\timelimit\30\version\ET 3.00 - TB 0.7.3  - 2.60b compatible linux-i386\sv_maxclients\20
1    | 1023 | \pmove_msec\8\pmove_fixed\0\g_watermarkFadeTime\0\g_watermarkFadeAfter\0\g_fixedphysicsfps\125\g_fixedphysics\1\sv_fps\20\sv_referencedPakNames\silent/~~~~~rda_silentsound silent/~~~~rda-pack-v1-0 silent/~~~~MapNames_v002 silent/silent-0.8.2 silent/luaesmodsounds007                       etmain/pak0                    \sv_referencedPaks\-1237933932 961990800 -660680009 -1705202138 313448468 -1721695896 \sv_pakNames\silent/~~~~~rda_silentsound silent/~~~~rda-pack-v1-0 silent/~~~~MapNames_v002 silent/silent-0.8.2 silent/luaesmodsounds007 etmain/~~~~~~~~~~~~~~~~rda_36 etmain/wf_temple_c14 etmain/venice etmain/v2_factory etmain/v2base etmain/UJE_amsterdam_final etmain/trmfght_beta2 etmain/transmitter_spring etmain/teuthonia_final etmain/tc_base etmain/tankbuster_200 etmain/sw_oasis_b3 etmain/supplydepot2 etmain/sp_delivery_te etmain/snatch3 etmain/saberpeak_final etmain/rockeyes_b2 etmain/remove_stock_campaigns_maps2 etmain/reactor_final etmain/purefrag etmain/PlaySounds_001 etmain/pirates etmain/pak0 etmain/mlb
10   | 15   | Enemy Territory
11   | 8    | 65491600
13   | 45   | \numobjectives\7\defender\0\numspawntargets\4
14   | 9    | \winner\0
15   | 70   | \a4\0\x4\0\a1\1\x1\2\a2\1\x2\2\x6\0\a6\0\a3\1\x3\2\a5\1\x5\2\a7\1\x7\2
19   | 1    | 0
20   | 1    | 0
21   | 70   | \g_currentCampaignMap\0\g_nextTimeLimit\0\g_currentRound\0\gamestate\0
22   | 1    | 0
26   | 21   | \149\Churchill Mk VII
29   | 31   | 35 23 132 15 156 42 30 50 11 51
30   | 3    | 900
36   | 140  | \axs_sld\32000\ald_sld\24000\axs_mdc\50000\ald_mdc\37500\axs_eng\35000\ald_eng\26250\axs_lnt\50000\ald_lnt\37500\axs_cvo\35000\ald_cvo\26250
37   | 1    | 0
38   | 498  | \g_misc\1025\g_doubleJumpHeight\0.800000\g_staminaRecharge\1.750000\g_weapons\45870\g_coverts\1415\g_medics\961\g_throwableKnives\1\g_playerRating\27\g_killRating\3\mapX\0\mapY\0\t_P\19%\t_M\19%\t_F\19%\t_MG\1\t_G\34%\s_s\40 100 180 280\s_m\40 100 180 280\s_e\40 100 180 280\s_f\40 100 180 280\s_c\40 100 180 280\s_b\40 100 180 280\s_l\40 100 180 280\m_s\-1\m_m\34%\m_e\-1\m_f\34%\m_c\-1\ff\0\g_knifeChargeTime\1000\g_maxKnives\5\g_classWeapons\63\g_landmineNotifyType\1\g_hst\1\sid\D225\flags\2202
39   | 124  | \SVCV0\5 cg_fov 90 120\SVCV1\5 rate 32000 36000\SVCV2\0 r_rmse 0 \SVCV3\5 cl_maxpackets 60 100\SVCV4\0 cl_timenudge 0 \NUM\5
40   | 135  | \FCV0\snaps 20\FCV1\r_wolffog 0\FCV2\r_zfar 0\FCV3\cg_damagekick 1\FCV4\cg_thirdPerson 0\FCV5\r_shownormals 0\FCV6\r_softwareGL 0\NUM\7
65   | 37   | models/furniture/chair/sidechair3.md3
66   | 41   | models/mapobjects/tanks_sd/churchhill.md3
67   | 48   | models/mapobjects/tanks_sd/churchhill_broken.md3
68   | 47   | models/mapobjects/miltary_trim/sandbag1_45s.md3
69   | 44   | models/mapobjects/cmarker/cmarker_crates.md3
70   | 46   | models/mapobjects/cmarker/cmarker_sandbags.md3
71   | 42   | models/mapobjects/cmarker/cmarker_flag.md3
72   | 40   | models/furniture/chair/chair_office3.md3
73   | 55   | models/mapobjects/supplystands/stand_health_damaged.md3
74   | 53   | models/mapobjects/supplystands/stand_ammo_damaged.md3
75   | 47   | models/mapobjects/tanks_sd/churchhill_flash.md3
76   | 48   | models/mapobjects/tanks_sd/churchhill_turret.md3
83   | 35   | models/mapobjects/weapons/mg42b.md3
84   | 32   | models/multiplayer/mg42/mg42.md3
321  | 22   | sound/misc/referee.wav
322  | 19   | sound/misc/vote.wav
323  | 22   | sound/player/gurp1.wav
324  | 22   | sound/player/gurp2.wav
325  | 26   | sound/world/chaircreak.wav
326  | 36   | sound/props/throw/chairthudgrunt.wav
327  | 31   | sound/props/chair/chairthud.wav
328  | 33   | sound/vehicles/tank/tank_idle.wav
329  | 34   | sound/vehicles/tank/tank_revup.wav
330  | 33   | sound/vehicles/tank/tank_move.wav
331  | 36   | sound/vehicles/tank/tank_revdown.wav
332  | 33   | sound/vehicles/tank/tank_stop.wav
333  | 34   | sound/vehicles/tank/tank_start.wav
334  | 26   | sound/world/metalbreak.wav
335  | 30   | sound/player/hurt_barbwire.wav
336  | 33   | sound/movers/doors/door5_open.wav
337  | 33   | sound/movers/doors/door5_endo.wav
338  | 34   | sound/movers/doors/door5_close.wav
339  | 33   | sound/movers/doors/door5_endc.wav
340  | 34   | sound/movers/doors/door5_loopo.wav
341  | 34   | sound/movers/doors/door5_loopc.wav
342  | 35   | sound/movers/doors/door5_locked.wav
343  | 34   | sound/movers/doors/door5_openq.wav
344  | 34   | sound/movers/doors/door5_endoq.wav
345  | 35   | sound/movers/doors/door5_closeq.wav
346  | 34   | sound/movers/doors/door5_endcq.wav
347  | 38   | sound/movers/motors/motor_start_01.wav
348  | 37   | sound/movers/motors/motor_loop_01.wav
349  | 36   | sound/movers/motors/motor_end_01.wav
350  | 31   | sound/movers/switches/butn2.wav
351  | 32   | sound/movers/switches/switch.wav
352  | 42   | sound/movers/doors/default_door_locked.wav
353  | 42   | sound/movers/misc/garage_door_start_01.wav
354  | 41   | sound/movers/misc/garage_door_loop_01.wav
355  | 40   | sound/movers/misc/garage_door_end_01.wav
356  | 33   | sound/vehicles/tank/tank_fire.wav
357  | 35   | sound/vehicles/tank/turret_spin.wav
358  | 34   | sound/vehicles/tank/turret_end.wav
359  | 22   | sound/lua/register.wav
360  | 25   | fueldump_axis_bridge_stop
361  | 32   | fueldump_allies_bridge_construct
362  | 25   | axis_hq_compost_construct
363  | 21   | sound/world/build.wav
364  | 27   | axis_hq_compost_constructed
365  | 34   | allies_hq_compost_constructed_axis
366  | 28   | fueldump_axis_bridge_destroy
367  | 32   | fueldump_allies_bridge_reinforce
368  | 43   | sound/weapons/artillery/artillery_fly_3.wav
369  | 43   | sound/weapons/artillery/artillery_fly_2.wav
370  | 25   | sound/lua/killconfirm.wav
371  | 43   | sound/weapons/artillery/artillery_fly_1.wav
372  | 29   | fueldump_axis_grate_destroyed
373  | 31   | fueldump_allies_grate_destroyed
374  | 24   | sound/misc/vo_revive.wav
375  | 20   | axis_hq_tank_damaged
376  | 27   | allies_hq_tank_damaged_axis
377  | 27   | fueldump_allies_tank_bridge
378  | 31   | fueldump_axis_bridge_reinforced
379  | 33   | fueldump_allies_bridge_reinforced
380  | 28   | axis_hq_tank_repaired_allies
381  | 23   | allies_hq_tank_repaired
382  | 25   | fueldump_axis_tunnel_stop
383  | 26   | fueldump_allies_tank_depot
384  | 24   | fueldump_axis_gates_stop
385  | 32   | fueldump_axis_depotdef_construct
386  | 30   | fueldump_axis_tunnel_destroyed
387  | 27   | allies_hq_compost_construct
388  | 32   | fueldump_allies_depotdef_destroy
389  | 34   | fueldump_axis_depotdef_constructed
390  | 23   | axis_hq_compost_damaged
391  | 29   | fueldump_axis_gates_destroyed
392  | 29   | fueldump_axis_fueldump_defend
393  | 32   | fueldump_allies_fueldump_destroy
394  | 30   | fueldump_allies_tank_reardepot
395  | 34   | axis_hq_compost_constructed_allies
396  | 29   | allies_hq_compost_constructed
397  | 25   | allies_hq_compost_damaged
398  | 31   | fueldump_axis_depotdef_breached
399  | 34   | fueldump_allies_depotdef_destroyed
400  | 30   | fueldump_allies_wall_destroyed
577  | 33   | models/mapobjects/tanks_sd/bits_r
578  | 39   | models/mapobjects/tanks_sd/bits_forward
579  | 34   | models/mapobjects/tanks_sd/wheel_r
580  | 40   | models/mapobjects/tanks_sd/wheel_forward
581  | 33   | models/mapobjects/tanks_sd/bits_l
582  | 34   | models/mapobjects/tanks_sd/wheel_l
583  | 40   | models/mapobjects/tanks_sd/bits_backward
584  | 41   | models/mapobjects/tanks_sd/wheel_backward
585  | 17   | gfx/limbo/cm_fuel
586  | 21   | gfx/limbo/cm_dynamite
587  | 23   | gfx/limbo/cm_healthammo
608  | 52   | 1=1:65961.75@3=3:65961.75@5=5:65961.75@6=6:65961.75@
610  | 45   | models/mapobjects/cmarker/neutral_crates.skin
611  | 44   | models/mapobjects/cmarker/allied_crates.skin
612  | 46   | models/mapobjects/cmarker/allied_sandbags.skin
613  | 42   | models/mapobjects/cmarker/axis_crates.skin
614  | 44   | models/mapobjects/cmarker/axis_sandbags.skin
615  | 41   | models/mapobjects/cmarker/axis_cflag.skin
616  | 44   | models/mapobjects/cmarker/neutral_cflag.skin
617  | 43   | models/mapobjects/cmarker/allied_cflag.skin
689  | 104  | n\rocomex\t\2\c\2\r\9\m\0000000\s\4404444\df\0\dn\\dr\0\w\3\lw\3\sw\37\mu\0\ref\0\uci\152\lc\2\tv\0\sc\0
690  | 114  | n\^BBot^kWin\t\1\c\4\r\7\m\0000000\s\4422414\df\225\dn\kaneo\dr\0\w\33\lw\33\sw\50\mu\0\ref\1\uci\0\lc\4\tv\0\sc\0
691  | 108  | n\^uBilly^sGoat\t\2\c\3\r\7\m\0000000\s\4430414\df\0\dn\\dr\0\w\8\lw\8\sw\37\mu\0\ref\1\uci\0\lc\3\tv\0\sc\0
692  | 113  | n\^jMedic^q*^kMario\t\1\c\3\r\3\m\0000000\s\3001300\df\0\dn\\dr\0\w\39\lw\39\sw\2\mu\0\ref\1\uci\0\lc\3\tv\0\sc\0
693  | 104  | n\^dFireFly\t\2\c\1\r\8\m\0000000\s\4442424\df\0\dn\\dr\0\w\8\lw\8\sw\37\mu\0\ref\1\uci\0\lc\1\tv\0\sc\0
694  | 109  | n\^aEd^dW^3ard\t\1\c\2\r\6\m\0000000\s\4400402\df\0\dn\\dr\0\w\23\lw\23\sw\38\mu\0\ref\1\uci\0\lc\2\tv\0\sc\0
695  | 101  | n\Bolund\t\1\c\1\r\9\m\0000000\s\4444424\df\0\dn\\dr\0\w\8\lw\8\sw\38\mu\0\ref\1\uci\0\lc\1\tv\0\sc\0
697  | 101  | n\kaneo\t\2\c\2\r\0\m\0000000\s\0000000\df\0\dn\\dr\0\w\8\lw\8\sw\7\mu\0\ref\0\uci\225\lc\2\tv\0\sc\0
753  | 53   | \spawn_targ\Tunnel Store Room\x\-5440\y\-1920\t\2\c\4
754  | 42   | \spawn_targ\Garage HQ\x\-10853\y\-2036\t\2
755  | 50   | \spawn_targ\Axis Fuel Dump\x\-8680\y\-6296\t\1\c\4
756  | 56   | \spawn_targ\Allied Entrance Spawn\x\-512\y\-8000\t\2\c\0
769  | 15   | the Foot Bridge
770  | 13   | the Fuel Dump
771  | 10   | the Bridge
772  | 32   | the East Axis Base Fortification
773  | 32   | the West Axis Base Fortification
774  | 13   | the Tunnel MG
775  | 11   | the Road MG
776  | 11   | the Side MG
777  | 8    | the Tank
778  | 28   | the Health and Ammo Cabinets
779  | 28   | the Health and Ammo Cabinets
780  | 28   | the Health and Ammo Cabinets
781  | 26   | the Fuel Depot Front Gates
782  | 24   | the Fuel Depot Side Wall
783  | 16   | the Tunnel Doors
784  | 21   | the Axis Command Post
785  | 23   | the Allied Command Post
787  | 61   | \e\141\o\0\cix\0\cia\0\s\2\n\Footbridge\x\-1104\y\-4208\z\392
788  | 62   | \e\190\o\8\cix\9\cia\10\s\1\n\Fuel Dump\x\-10832\y\-7248\z\440
789  | 57   | \e\191\o\1\cix\0\cia\0\s\2\n\Bridge\x\-3992\y\-5408\z\232
790  | 70   | \e\197\o\0\cix\0\cia\0\s\1\n\East Fortification\x\-10344\y\-7008\z\192
791  | 70   | \e\200\o\0\cix\0\cia\0\s\1\n\West Fortification\x\-11344\y\-7424\z\200
792  | 60   | \e\201\o\0\cix\0\cia\0\s\1\n\Tunnel MG\x\-3400\y\-1912\z\712
793  | 58   | \e\205\o\0\cix\0\cia\0\s\2\n\Road MG\x\-2960\y\-7944\z\384
794  | 59   | \e\206\o\0\cix\0\cia\0\s\0\n\Side MG\x\-10128\y\-2712\z\496
795  | 56   | \e\215\o\22\cix\0\cia\0\s\14\n\Tank\x\-388\y\-7584\z\288
796  | 79   | \e\557\o\0\cix\11\cia\11\s\35\n\Health and Ammo Cabinets\x\-11054\y\-2484\z\612
797  | 78   | \e\559\o\0\cix\11\cia\11\s\35\n\Health and Ammo Cabinets\x\-5482\y\-1816\z\588
798  | 78   | \e\561\o\0\cix\11\cia\11\s\35\n\Health and Ammo Cabinets\x\-3066\y\-8412\z\480
799  | 48   | \e\584\o\8\cix\0\cia\0\s\0\x\-9792\y\-5360\z\296
800  | 49   | \e\585\o\8\cix\0\cia\0\s\0\x\-11584\y\-5568\z\296
801  | 48   | \e\586\o\8\cix\0\cia\0\s\0\x\-5368\y\-2816\z\328
802  | 70   | \e\607\o\32\cix\0\cia\0\s\65\n\Axis Command Post\x\-2136\y\-1396\z\720
803  | 73   | \e\614\o\64\cix\0\cia\0\s\66\n\Allied Command Post\x\-11268\y\-2424\z\632
830  | 18   | 144 149 tag_turret
831  | 18   | 215 149 tag_turret
832  | 18   | 556 149 tag_turret
833  | 18   | 563 149 tag_turret
834  | 17   | 555 563 tag_flash
893  | 28   | \id\0\l\0\c\0000000000000001
894  | 6    | \id\-1
895  | 6    | \id\-1
896  | 6    | \id\-1
897  | 6    | \id\-1
898  | 6    | \id\-1
899  | 6    | \id\-1
900  | 6    | \id\-1
901  | 6    | \id\-1
902  | 6    | \id\-1
903  | 6    | \id\-1
904  | 6    | \id\-1
905  | 27   |  ^zwww^1.^7rdaclan^1.^zcom
906  | 14   |  ^1RECRUITING
907  | 28   |  ^7MAPVOTE^1@^7INTERMISSION
908  | 36   |  ^3Be ^1Respectful ^3& ^1Have ^3Fun
909  | 26   |  ^7Play ^zThe ^7Objective
910  | 22   |  ^1Owner^7(^3Tonto^7)

Share on other sites

• Management

Looks fine.

Some notes:

893  | 28   | \id\0\l\0\c\0000000000000001
894  | 6    | \id\-1
895  | 6    | \id\-1
896  | 6    | \id\-1
897  | 6    | \id\-1
898  | 6    | \id\-1
899  | 6    | \id\-1
900  | 6    | \id\-1
901  | 6    | \id\-1
902  | 6    | \id\-1
903  | 6    | \id\-1
904  | 6    | \id\-1


Those are fireteams.

About the forced cvars, cg_damagekick doesn't exists, there is no need to force it enabled. Upper limit of 36000 for rate is low. It should be allowed to rise all the way up to 50000 if needed. There is no savings regarding bandwidth. All the same data must be transmitted by the server. Too low value causes the packets the server sends to fragment,  if there are bigger packets. I'm saying 36000 is too low because I've made rate autostepping based on fragmentation for the next version and it always stepped to 36000 pretty fast. There should be some room for even bigger data.

Share on other sites

Ok thank you. Going to send the script over to tweek to see if he has anything wrong.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.