Custom Variable Definition
This was an idea I have been talking to a couple of Modders about. It came to me after the player stat conditionals were added in 3.23.7.0, what if players modders could implement their own variables/conditionals?
I’m still unsure of how it would work, but it could be defined as another type of Asset
. It would have a key
, the name of the variable, and a value
. The value could be of multiple types, say an Int
, a bool
, or even a custom numeric type using binary flags.
Inside the Asset file, you could define certain events, such as On_Player_Death +10
or something similar to that, NPCs would also be able to read through a similar manner to the player stats, and modify based on certain events such as On_Item_Purchase +50
.
Possibilities with server-side plugins or modules
By defining a custom collection attached to one of the player classes, such as SDG.Unturned.Player
for example, a server-side plugin could also modify and read this value. This could be done through the creation of a custom collection type similar to a Dictionary, but it could call a SteamCall
whenever the value is modified. I could also implement this through the Community Module, but I am unsure of how I could define a custom asset type through this method.
The reason for the Client knowing the value would be so that certain NPCs could display this value somehow during dialogue.
-Thanks for considering, ChubbyQuokka