Open main menu
Home
Random
Log in
Settings
About Stardew Valley Wiki
Disclaimers
Stardew Valley Wiki
Search
Changes
← Older edit
Newer edit →
Modding:Modder Guide/APIs
(view source)
Revision as of 22:10, 6 May 2018
370 bytes added
,
22:10, 6 May 2018
→Mod APIs
:
+ Multiplayer
Line 748:
Line 748:
// get manifest info for all loaded mods
// get manifest info for all loaded mods
foreach(IManifest manifest in this.Helper.ModRegistry.GetAll()) { … }
foreach(IManifest manifest in this.Helper.ModRegistry.GetAll()) { … }
+
</source>
+
+
===Multiplayer===
+
The multiplayer API provides methods to support modding in a multiplayer context:
+
<source lang="c#">
+
// 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())
</source>
</source>
Pathoschild
translators
8,446
edits