: ''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.