Changes

Jump to navigation Jump to search
→‎General concepts: remove unique string IDs (moved to Modding:Common data field types)
Line 148: Line 148:     
: You can test whether your mod accounts for this correctly by setting the zoom to maximum and the UI scale to minimum (''i.e.,'' have them at opposite values) or vice versa; in particular check any logic which handles pixel positions, like menus clicking.
 
: You can test whether your mod accounts for this correctly by setting the zoom to maximum and the UI scale to minimum (''i.e.,'' have them at opposite values) or vice versa; in particular check any logic which handles pixel positions, like menus clicking.
  −
===Unique string IDs===
  −
{{upcoming|1.6}}
  −
  −
The game identifies data using unique string IDs. For example, <code>Town</code> is the unique ID for the [[Pelican Town]] location; no other location can use that ID. The IDs are used for a wide range of purposes, from internal game logic to [[Modding:Content Patcher|content pack edits]].
  −
  −
Best practices for mods:
  −
* Use namespaced IDs prefixed with your [[Modding:Modder Guide/APIs/Manifest#Basic fields|mod's unique ID]]. For example, if your mod ID is <code>Example.PufferchickMod</code> and you're adding a pufferchick plushy, your item ID would look like <code>Example.PufferchickMod_PufferchickPlushy</code> (or optionally <code><nowiki>{{ModId}}_PufferchickPlushy</nowiki></code> in a [[Modding:Content Patcher|Content Patcher pack]]). Although the game doesn't validate the ID format, you're '''strongly encouraged''' to use this exact format to maintain good mod compatibility, avoid ID conflicts, and allow automatically determining which mod added custom content.
  −
* Only use alphanumeric (a–z, A–Z, 0–9), underscore (<code>_</code>), and dot (<code>.</code>) characters in string IDs. This is important because they're often used in places where some characters have special meaning (like file names or [[Modding:Game state queries|game state queries]]).
      
==Multiplayer concepts for C# mods==
 
==Multiplayer concepts for C# mods==
translators
8,411

edits

Navigation menu