Template:Infobox crop: Difference between revisions
Appearance
Add description, trellis, special fields |
Compute store payouts from base value via universal multipliers |
||
| Line 10: | Line 10: | ||
{{#if:{{{trellis|}}}|<div class="sh-infobox-row"><div class="sh-infobox-label">Grows on</div><div class="sh-infobox-value">Trellis</div></div>|}} | {{#if:{{{trellis|}}}|<div class="sh-infobox-row"><div class="sh-infobox-label">Grows on</div><div class="sh-infobox-value">Trellis</div></div>|}} | ||
{{#if:{{{step_cost_plant|}}}|<div class="sh-infobox-row"><div class="sh-infobox-label">Planting</div><div class="sh-infobox-value">{{Steps|{{{step_cost_plant}}}}}</div></div>|}} | {{#if:{{{step_cost_plant|}}}|<div class="sh-infobox-row"><div class="sh-infobox-label">Planting</div><div class="sh-infobox-value">{{Steps|{{{step_cost_plant}}}}}</div></div>|}} | ||
{{#if:{{{sell_price | {{#if:{{{sell_price|}}}|<div class="sh-infobox-section">Selling</div><div class="sh-infobox-row"><div class="sh-infobox-label">Base value</div><div class="sh-infobox-value">{{Gold|{{{sell_price}}}}}</div></div><div class="sh-infobox-row"><div class="sh-infobox-label">{{Quality|regular}}</div><div class="sh-infobox-value">{{Gold|{{#invoke:StepHarvest|storePayout|{{{sell_price}}}|regular}}}}</div></div><div class="sh-infobox-row"><div class="sh-infobox-label">{{Quality|silver}}</div><div class="sh-infobox-value">{{Gold|{{#invoke:StepHarvest|storePayout|{{{sell_price}}}|silver}}}}</div></div><div class="sh-infobox-row"><div class="sh-infobox-label">{{Quality|gold}}</div><div class="sh-infobox-value">{{Gold|{{#invoke:StepHarvest|storePayout|{{{sell_price}}}|gold}}}}</div></div><div class="sh-infobox-row"><div class="sh-infobox-label">{{Quality|pristine}}</div><div class="sh-infobox-value">{{Gold|{{#invoke:StepHarvest|storePayout|{{{sell_price}}}|pristine}}}}</div></div><div class="sh-infobox-note">Store payouts for a fresh sale by quality. See [[Marketplace]].</div>|}} | ||
{{ | |||
{{#if:{{{id|}}}|<div class="sh-infobox-row sh-infobox-id"><div class="sh-infobox-label">Internal id</div><div class="sh-infobox-value"><code>{{{id}}}</code></div></div>|}} | {{#if:{{{id|}}}|<div class="sh-infobox-row sh-infobox-id"><div class="sh-infobox-label">Internal id</div><div class="sh-infobox-value"><code>{{{id}}}</code></div></div>|}} | ||
</div> | </div> | ||
| Line 27: | Line 23: | ||
|step_cost_plant=Integer | |step_cost_plant=Integer | ||
|sell_price=Integer | |sell_price=Integer | ||
|description=Text | |description=Text | ||
|trellis=Boolean | |trellis=Boolean | ||
| Line 56: | Line 49: | ||
</pre> | </pre> | ||
* <code>sell_price</code> is the raw base value from the game data. Per quality store payouts are computed by [[Module:StepHarvest]] from the universal quality multipliers, never enter them by hand. | |||
* <code>image</code> defaults to the page name, and the image row only renders when the file exists. | * <code>image</code> defaults to the page name, and the image row only renders when the file exists. | ||
* <code>seasons</code> takes a comma separated list, for example <code>spring, fall</code>. | * <code>seasons</code> takes a comma separated list, for example <code>spring, fall</code>. | ||
Revision as of 18:34, 11 June 2026
This template defines the table "crops". View table. Infobox for crop pages. Parameter names map 1:1 to the game's data fields so a future bulk sync from the game database stays mechanical. All balance numbers belong in these parameters, not in prose, since values are tuned live.
Data is also stored in the Cargo table crops, so listing pages ("all spring crops") can be queries instead of hand maintained tables.
Usage
{{Infobox crop
|id=parsnip
|name=Parsnip
|image=Parsnip
|seed={{ItemLink|Parsnip Seeds|icon=Parsnip seeds}}
|seasons=spring
|growth_days=2
|regrowth_days=
|step_cost_plant=35
|sell_price=55
|description=A humble root vegetable. Quick and reliable.
|trellis=
|special=
}}
sell_priceis the raw base value from the game data. Per quality store payouts are computed by Module:StepHarvest from the universal quality multipliers, never enter them by hand.imagedefaults to the page name, and the image row only renders when the file exists.seasonstakes a comma separated list, for examplespring, fall.trellisandspecialare flags: passyesor leave empty.- Leave any unknown parameter empty and its row is hidden.