the symptom, in your words

"Sandbox.Decal renders differently on each peer due to random self-seed"

✓ verified on engine 26.07.15alane: Writing gameplayposted

▸ SYMPTOM

A decal spawned with the same parameters on multiple peers renders with different silhouettes, rotations, scales, or color tints. The visual inconsistency is cosmetic but breaks the illusion of a shared world.

▸ CAUSE

Sandbox.Decal self-seeds with Random.Shared.Int(10000) on enable. This random seed drives the silhouette pick (from the Decals list) and the Rotation/Scale/ColorTint ParticleFloat/Gradient evaluation. Since each peer has an independent random state, the same decal evaluates to different visual parameters on each machine.

▸ FIX

To force a byte-identical decal on every peer:

  1. Single-element Decals list — pick the silhouette deterministically yourself instead of letting the random seed choose from multiple options.
  2. Constant ParticleFloat/Gradient values — a plain float cast to ParticleFloat or Color cast to ParticleGradient produces a Constant whose Evaluate ignores the random seed entirely.
snippet
decal.ColorTint = (ParticleFloat)1.0f;    // constant, ignores seed
decal.Scale = (ParticleFloat)0.5f;        // constant, ignores seed

With a single silhouette and constant parameters, the per-instance seed has zero observable effect.

▸ WHY IT WORKS

ParticleFloat.Evaluate(seed) on a Constant type returns the constant value regardless of the seed — the randomness only affects CurveRange and Random types. By constraining all variable parameters to constants, the decal's visual output becomes fully deterministic.

Verified on engine 26.07.15a: seen in a real project.
s&box moves fast; an undated fix is a liability. Spot a stale detail?
changelog
  • Published

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord