Talk:Nature's Gift

Visual Distinction
Both Nature's Gift and the Water Tome are visually distinct from grass and books, respectively. I'll try and get a screenshot of a Nature's Gift tomorrow morning. For now, bed.Thursday 03:49, 23 May 2011 (UTC)
 * Not grass, jungle roses. Roses are red, and Nature's Gift is blue. --Barhandar 05:55, 23 May 2011 (UTC)

Hardcore Mode
So are these going to be worthless in hardcore mode? I would assume so. Would be cool if instead it gave a different bonus though. Like slight mana/health regen.

Hardcore? hardcore is the difficulty which you die permanently so it wouldnt do anything. You probably mean hardmode but it still doesn't do anything to it and you can craft mana flower which is very good for mages.

Trivia point: Only accessory harvested directly from environment?
Is this (and for vanity, the Jungle Rose) the only accessory -- or even the only wearable item -- that is obtained directly by harvesting an object in world? (I exclude pot drops for obvious reasons) --MentalMouse42 (talk) 20:00, 3 October 2019 (UTC)

Incorrect profit tip
The page claims that a Mana Flower sells for, but the real sell price is. I looked into the source and the data templates/other things used confused me beyond these simpler templates that I'm used to, so I'm uncertain the problem and how to correct it. 2057clones (talk) 15:13, 4 February 2021 (UTC)


 * I'll try to break it down, and insert some linebreaks and indentations for better readability of the paragraph:

 A Mana Flower can be sold for , while its ingredients, one Nature's Gift and one Mana Potion, only sell for

together. Therefore, it is

more profitable to craft spare Nature's Gifts into Mana Flower before selling them.
 * The parameter of the first coin template call can be described as follows: Take the result of Mana Flower – –, store it to a variable named , and pass it to coin (coin), resulting in an output of . This way, we stored the result of the dynamic data fetch via iteminfo and displayed it at the same time, in one go.
 * The second coin template call is similar: Take the result of recipes/extract – –, store it to a variable named , and pass it to coin (coin), resulting in an output of.
 * The percent call now receives the quotient of the two variables defined above, subtracted by 1, as input: / -1. The result of the expression is, and the template displays that as.


 * Now onto the original error. iteminfo has two modes: "normal" and "raw", toggled via the  parameter. In "normal" mode, the template automatically applies some "intuitive" formatting to the requested value, in order to display it properly in article text. For instance, Swiftness Potion wraps the buff duration in duration (which includes automatic translation): . This isn't always useful, however – e.g. when we want to store the value in a variable so we don't have to perform another iteminfo call with the same parameters (a somewhat performance-intensive operation, and since it's a duplicate, it's avoidable), like in our paragraph above. For that reason, the "raw" mode can be used to return the "raw" numerical value as it is in Terraria's source code, with no formatting applied to it whatsoever. This can be seen in Swiftness Potion:  – we get the "raw" number of ticks✅.
 * iteminfo allows using aliases for the different stats. For instance, we could write Swiftness Potion (which is actually preferable because of its better readability), Swiftness Potion, or Swiftness Potion instead of Swiftness Potion, all without a change in output. However, as described at the bottom of Template:Iteminfo § Usage, these aliases do not work in raw mode. This is the crucial error that is present in Mana Flower –  is an alias, not an original variable name (can be seen in the table)! In fact, there isn't even an original variable name for an item's sell value, because that is not stored in Terraria's code; instead it is simply determined by dividing the buy price by 5. Due to the way iteminfo is coded, what happens is that requesting   causes it to fetch the buy price from the game's code, but not divide it by 5 then (because   is not recognized as an original variable name) and return it as-is. As always in software development, some design choices just have to be made at the beginning, and sometimes, when they reveal themselves to be hindering in the further development and are worked around somehow, you end up with a system that has somewhat unintuitive parts in it, like in this case: The template gives unexpected output (instead of nothing or an error) when an alias is used in raw mode, at least for sell values.


 * So, what to do, how to fix? One possibility would be to retrieve the raw buy price and divide it by 5 (#expr: /5 – #expr:/5, resulting in ), but this is quite awkward and rather hard to read (and understand; the division by 5 in particular can easily seem arbitrary to some). For this exact reason, because there were a lot of these constructs used on Guide:Making money, a handy helper template was developed: sell expr. It is originally intended for combining several sell values in more complex expressions, but it's fine to use it as a way to display the raw sell value of a single item. Mana Flower gives – success! I already changed it.


 * I know this is a lot, but I hope it helped you a bit. I understand that things may be hard to grasp at times (have been and still am in that position myself often), so please ask if you have questions. There might be other people with the same questions, and me and others would be happy to assist! --Rye Greenwood (talk) 21:26, 4 February 2021 (UTC)