Fandom

Terraria Wiki

Comments7

Item Value in Infoboxes

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Hi there everyone.

This is both in celebration of the achievement I'm about to entail, and of my four-thousandth edit here on the Terraria Wiki.

Recently we came across the solution to the "templates within templates" issue, also known as "permanent source mode". However, I've come across a further solution, and proper scaling method to the Coin numbers. As a trial, I've subsituted the normal {{pc}}, {{gc}}, {{sc}} and {{cc}} templates in the |Sell, |sell and |Sells For parameters, for a raw value modifier in the |Value parameter which utilizes the {{CoinCalc}} template. In addition, a similar parameter was added to the Infobox-Monster template: |CoinsDropped. Exactly the same function as the |Value parameter, just for outputting the coins dropped by a monster. When using either of these, please only enter the base item value (Such as 10000 for 1 GoldCoin Small), nothing else.

tl;dr

I found a possible solution to the problems relating to the usage of the {{pc}}, {{gc}}, {{sc}} and {{cc}} inside templates. Instead of using the |Sell, |sell and |Purchase For parameters, you'd be using the |Value and |BuyValue parameters, with the syntax as follows.

Syntax

The new parameters are used just like the normal ones, but they only encompass the raw value of an item, and only a numerical value at that. For example: If a statue is worth 60 CopperCoin Small, the base value is 60. If an Accessory is worth 2 GoldCoin Small, the base value is 20000. Example below:

{{Infobox:Accessory
|Image = [[File:item_16.png]]
|Material In = [[3 Second Timer]]
|Crafted With = *10 [[Silver Bar]]
*1 [[Iron Chain]]
|Crafting Station = [[Wooden Table]] + [[Wooden Chair]]
|Rarity = t0
|Tooltip = Tells the time
|Value = 1000}}

Pay close attention to the |Value parameter. That calculates the value to 10 SilverCoin Small.

Ranges

I think the easiest way to display this info in it's simplest form, is with a table, as will be used below.

Value Range (10^x) Value Range (Raw) Output
1.0*10^6 1000000 1 PlatinumCoin Small
1.0*10^4 10000 1 GoldCoin Small
1.0*10^2 100 1 SilverCoin Small
1.0*10^0 1 1 CopperCoin Small
1.0*10^2 24528748 24 PlatinumCoin Small 52 GoldCoin Small 87 SilverCoin Small 48 CopperCoin Small
7.51859*10^5 751859 75 GoldCoin Small 18 SilverCoin Small 59 CopperCoin Small
6.7594*10^4 67594 6 GoldCoin Small 75 SilverCoin Small 94 CopperCoin Small
Conclusion

To simply state the purpose of this post, I've put together some new coding in the Infobox-Items, Infobox-Accessory, Infobox-Tool, Infobox-Potions, Infobox-Vanity Items and Infobox-Weapons so that you can express an items' selling or buying value in both an aesthetically pleasing and functional way. I do hope that this post has been of use to those who've read it. If a more comprehensive guide on other templates or functions of the wiki is required, please don't hesitate to leave me a message, or comment here! ^ᴗ^

Also on Fandom

Random Wiki