Class StableHash
The game's stable string hash (string.GetStableHashCode()), by which Valheim keys prefabs, dungeon rooms and ZDO
fields. Two accumulators over alternate UTF-16 code units, stopping at the end or at a '\0', as Valheim 1.0.16
computes it. Use it to name the hashes an observation reports: a client that cannot resolve a hash cannot name it.
public static class StableHash
- Inheritance
-
objectStableHash
Methods
Name(int, IEnumerable<string>?)
The first of names whose hash is hash, or null.
public static string? Name(int hash, IEnumerable<string>? names)
Parameters
hashintnamesIEnumerable<string>
Returns
- string
Of(string)
public static int Of(string text)
Parameters
textstring
Returns
- int