Changes

Jump to navigation Jump to search
→‎Breaking changes for C# mods: add merged 'other ID changes' section to cover trees and such
Line 1,372: Line 1,372:  
</ul>
 
</ul>
   −
===Buff ID changes===
+
===Other ID changes===
: ''See also: [[#Buff overhaul|buff overhaul in what's new]].''
+
Many other things in the game now have unique string IDs too (including [[#Buff overhaul|buffs]], [[#String event IDs|events]], and fruit trees). To migrate existing code:
   −
Buffs now have unique string IDs. To migrate existing code:
+
* When referencing numeric IDs, you usually just need to convert them into a string (like <code>Game1.player.hasBuff("1590166")</code> or <code>Game1.player.eventsSeen.Contains("1590166")</code>).
 
  −
* When referencing buff IDs, convert the previous number into a string (like <code>Game1.player.hasBuff("1590166")</code>).
   
* When creating buffs, see [[#buff overhaul|buff overhaul]] for how to create buffs now.
 
* When creating buffs, see [[#buff overhaul|buff overhaul]] for how to create buffs now.
  −
===Event ID changes===
  −
: ''See also: [[#String event IDs|string event IDs in what's new]].''
  −
  −
Events now have unique string IDs. To migrate existing code:
  −
  −
* When referencing event IDs, convert the previous number into a string (like <code>Game1.player.eventsSeen.Contains("1590166")</code>).
      
===Player changes===
 
===Player changes===
translators
8,446

edits

Navigation menu