Jump to content

Modding:Modder Guide/APIs/Multiplayer

From Stardew Valley Wiki
Revision as of 04:37, 28 May 2018 by imported>Pathoschild (move content from Modding:Modder Guide/APIs (only author is Pathoschild))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

← Modding:Index

Multiplayer

The multiplayer API provides methods to support modding in a multiplayer context:

// get a unique multiplayer ID (e.g. for animal IDs)
int uniqueID = this.Helper.Multiplayer.GetNewID();

// get the locations being sync'd from the main player
foreach (GameLocation location in this.Helper.Multiplayer.GetActiveLocations())