Talk:Spice

From Enter the Gungeon Wiki
Jump to navigation Jump to search

Formula for Spice

I removed the listed formula, which was listed as
static spiceItem(){
  SpiceItem.ONE_SPICE_WEIGHT = 0.1f;
  SpiceItem.ONE_SPICE_WEIGHT = 0.1f;
  SpiceItem.THREE_SPICE_WEIGHT = 0.3f;
  SpiceItem.THREE_SPICE_WEIGHT = 0.5f;
  SpiceItem.FOUR_SPICE_WEIGHT = 0.8f;
}

(although there were no newlines in the version I deleted...) I have a hard time believing this is actually a snippet from the source of Enter the Gungeon, as there are multiple redundant assignments.

More importantly, code snippets do not help most players understand game behavior, and should probably not be included in wikis that do not specifically relate to programming. Such information can be more effectively and more accessibly communicated. Consider the formula for "Tear Delay Calculation" at The Binding of Isaac: Rebirth wiki--this is a good (although more complicated) example.

I suspect the actual behavior is something like

  • If the player has used one Spice, then apply a 10% chance (i.e. 0.1f) of replacing found items/guns with Spice
  • If the player has used two Spice, then apply a 30% chance (i.e. 0.3f) of replacing found items/guns with Spice
  • If the player has used three Spice, then apply a 50% chance (i.e. 0.5f) of replacing found items/guns with Spice
  • If the player has used four Spice, then apply a 80% chance (i.e. 0.8f) of replacing found items/guns with Spice

but I am hesitant to add this to the wiki without a better source than this questionable code snippet. Gespacogelato (talk) 06:52, 15 October 2022 (UTC)