Table of Contents

Class StableHash

Namespace
Valheim.Testing.Game
Assembly
Valheim.Testing.Game.dll

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
object
StableHash

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

hash int
names IEnumerable<string>

Returns

string

Of(string)

public static int Of(string text)

Parameters

text string

Returns

int