Changes

→‎Unique string IDs: mention Content Patcher's {{ModId}}
Line 155: Line 155:     
Best practices for mods:
 
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>. 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.
+
* 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]]).
 
* 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]]).
  
translators
8,404

edits