Client v23 discussion

Page:1  

  • Zi;

    Hello everyone! As many of you might have already noticed, there has been a release of new client version with some new features. The most significant are as follows: - Add weather system using synchronized server storage - Add combat organization using radio - Add advertising system into the client - Add health bars over enemies - Add new interactive modes for vehicles - Add support for open/close weapon customization using number keys I created this thread, so we can all discuss on some of them that might be a little bit controversial such as advertising system. But I also created this thread so you, dear server owners, don't feel left out and can implement these features on your server as well! ☺️ New server CVars To allow some of these new features, you will need to add few new CVars to your server. Now doing this requires some C++ knowledge, but if you are using SSM SafeWriting, I prepared a ZIP that you can just extract to your server folder and restart the server. Here is the download link https://crymp.org/static/CVars.zip Afterwards, you should have the following CVars: mp_circleJump 0.123: set circle-jump strength, 0 = no circle-jump, 1 = 100% like on 1.0.0 version mp_wallJump 0/1/123: 0 disables wall-jump, 1 keeps wall-jump as is, >1 = max height, i.e. mp_wallJump 20 = max 20m mp_radioTagging 0/1: enable or disable radio tagging mp_healthBars 0/1: enable or disable health bars, *see health bars below to make it work Weather system Maybe you already visited the VIBING server or not (I recommend doing so), but weather system basically lets you, server owners, modify the weather that players see and experience. This feature can be enabled pretty easily on your servers by using synchronized server storage. Here is an example with explanation down below: g_gameRules.game:SetSynchedGlobalValue(2000, true) g_gameRules.game:SetSynchedGlobalValue(2001, "5") g_gameRules.game:SetSynchedGlobalValue(2002, "snow.snow.snow;x=3;i=6") g_gameRules.game:SetSynchedGlobalValue(2003, "frozen") g_gameRules.game:SetSynchedGlobalValue(2104, "0.03") g_gameRules.game:SetSynchedGlobalValue(2106, "v0.7,0.8,1.0") g_gameRules.game:SetSynchedGlobalValue(2108, "v0.7,0.8,1.0") g_gameRules.game:SetSynchedGlobalValue(2109, "0.035") g_gameRules.game:SetSynchedGlobalValue(2110, "0.025") g_gameRules.game:SetSynchedGlobalValue(2115, "0") g_gameRules.game:SetSynchedGlobalValue(2140, "") Syntax for values is as follows: empty string: used for setting default value 0.12345: percentage between 0 and 100% of effect strength r0.12345: absolute value of effect strength (what you can find in Sandbox under Time Of Day) v0.123,0.234,0.345: x, y, z vector used for directions effect.name: name of an effect effect.name;i=Number of instances;x=Scale: effect with more detailed specification frozen, wet or empty string: global environment setting To specify multiple effects, separate them with space, i.e. snow.snow.snow rain.HQ_fleet.rain to enable both snow and rain at same time. These are the synchronized global variables that you need to set to make everything work. Everything except variable 2000 is optional. 2000: weather system enabled or disabled, set to true to enable, false to disable 2001: wind coefficient or wind direction vector 2002: active effects 2003: global environment setting 2101 ... 2150 = time of day settings that you can find in Sandbox 2104: sun multiplier 2106: sun color 2107: sky color 2109: fog color multiplier 2110: fog density You can find full list of them here: https://github.com/crymp-net/crymp-client/blob/881aab7d2a3bbd94a080f060bc328a12b1601b11/Code/Cry3DEngine/TimeOfDay.h#L18. It's simply 2100 + enum index, i.e. FOG_COLOR_MULTIPLIER is 10th, so that's 2100 + 10 - 1 = 2109. Health-bars Health-bars are an another new feature and it must be enabled on server side. To do so, mp_healthBars must be set to 1 and health of each player must be synchronized using synchronized entity value 901. If you are using SSM SafeWriting, this is how to achieve that: HealthBars = {} function HealthBars:UpdatePlayer(player) g_gameRules.game:SetSynchedEntityValue(player.id, 901, math.max(0, player.actor:GetHealth())) end function HealthBars:PrepareAll() System.SetCVar("mp_healthBars", 1) end LoadPlugin(HealthBars) Other features I would be really happy if Comrade or FAPP collaborated here with me and gave you details how to implement other features on your server ☺️

    ❤️ 6
  • Comrade

    Nice documentation! I did only bug fixing and internal stuff in v23, so nothing to add here from my side.

    ❤️ 2
  • TunSalat

    Nice Zi; maybe you/we could find some good weather mood combinations, and you could store them somehow for fast easy callback again later Would be cool with like 50+ different weather vibes to pick and activate fast. Or changing in rotation (if it doesn't already) Maybe that's a Vibing server thing dunno

    ❤️ 1
  • ctaoistrach

    Server can change model of player SetSynchedEntityValue(playerId, 1000+teamId, modelPath); Option to show HUD display "Locked by name" (id:10) or "Reserved for name" (id:11) instead of "ENTER VEHICLE" (enabled on 7OXICiTY) SetSynchedEntityValue(vehicleId, 10/11, ownerId); Note: server still needs to block vehicle access manually And yes, it would be nice to have some predefined settings for fog/winter/sun etc so admins can add them easily Btw, v23 also added support for open/close weapon customization anytime, allowing for super fast attachment changes (use number keys)

    ❤️ 3
  • Zi;

    @TunSalat
    Would be cool with like 50+ different weather vibes to pick and activate fast. Or changing in rotation (if it doesn't already) Maybe that's a Vibing server thing dunno
    Indeed, on Vibing server, weather rotates albeit slowly, so it's subtle. But if you wait long enough and stare at the screen, it should be apparent that it's changing over time. @ctaoistrach, @TunSalat Here is a couple of pre-defined weathers for default, snowy, rainy and foggy that I use on Vibing server: Weather = { default = function(self) g_gameRules.game:SetSynchedGlobalValue(2000, false) ForceSet("e_terrain_texture_debug", "0") end, snow = function(self) g_gameRules.game:SetSynchedGlobalValue(2000, true) g_gameRules.game:SetSynchedGlobalValue(2001, "5") g_gameRules.game:SetSynchedGlobalValue(2002, "snow.snow.snow;x=3;i=6") g_gameRules.game:SetSynchedGlobalValue(2003, "frozen") g_gameRules.game:SetSynchedGlobalValue(2104, "0.03") g_gameRules.game:SetSynchedGlobalValue(2109, "0.035") g_gameRules.game:SetSynchedGlobalValue(2110, "0.025") g_gameRules.game:SetSynchedGlobalValue(2115, "0") ForceSet("e_terrain_texture_debug", "1") end, rain = function(self) g_gameRules.game:SetSynchedGlobalValue(2000, true) g_gameRules.game:SetSynchedGlobalValue(2001, "3") g_gameRules.game:SetSynchedGlobalValue(2002, "rain.HQ_rain.fleet") g_gameRules.game:SetSynchedGlobalValue(2003, "") g_gameRules.game:SetSynchedGlobalValue(2104, "0.15") g_gameRules.game:SetSynchedGlobalValue(2105, "0.15") g_gameRules.game:SetSynchedGlobalValue(2109, "0.085") g_gameRules.game:SetSynchedGlobalValue(2110, "0.017") g_gameRules.game:SetSynchedGlobalValue(2115, "") ForceSet("e_terrain_texture_debug", "0") end, fog = function(self) g_gameRules.game:SetSynchedGlobalValue(2000, true) g_gameRules.game:SetSynchedGlobalValue(2001, "3") g_gameRules.game:SetSynchedGlobalValue(2002, "") g_gameRules.game:SetSynchedGlobalValue(2003, "") g_gameRules.game:SetSynchedGlobalValue(2104, "0.15") g_gameRules.game:SetSynchedGlobalValue(2105, "0.15") g_gameRules.game:SetSynchedGlobalValue(2109, "0.085") g_gameRules.game:SetSynchedGlobalValue(2110, "0.024") g_gameRules.game:SetSynchedGlobalValue(2115, "") ForceSet("e_terrain_texture_debug", "0") end } AddChatCommand("weather", function(self, player, msg, type) local fn = Weather[type] or Weather["default"] fn(Weather) end, {TEXT}, {AdminOnly = true}) AddChatCommand("ss", function(self, player, msg, a, b) if b == "nil" then b = "" end g_gameRules.game:SetSynchedGlobalValue(a, b) end, {NUMBER, WORD}, {AdminOnly = true}) Use !weather default/fog/snow/rain or !ss 2101 0.123 to manually set values and try it yourself. To reset, use !ss 2101 nil

    ❤️ 3
  • ctaoistrach

    Nice, btw using number keys was always possible to change attachments, but difference is you don't have to wait for menu to fully open :)

    ❤️ 0
Page:1