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