Template:TradeLine

Jump to navigation Jump to search
Documentation[view] [edit] [history] [refresh]
This template uses Module:TradeTable, a script written in Lua.

Usage[edit source]

This template can only be used as an argument to {{TradeTable}}

This template is designed to be used inline, as an unnamed parameter to {{TradeTable}}.

You can copy the blank examples below to easily fill in commonly used parameters:

|{{TradeLine|lvl=|slot=|want=|wantQuant=|give=|giveQuant=|multi=|maxTrades=|xpGain=}}
  • give/want default to Emerald
  • give/wantQuant defaults to 1


Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
levellevel lvl

The name of the villager level this trade is offered by

Suggested values
Novice Apprentice Journeyman Expert Master
Stringrequired
slotslot

The Bedrock Edition slot this trade is part of

Numberrequired
wantwant want1

The name of the item the villager wants in this trade

Default
Emerald
Example
Coal
Page nameoptional
wantQuantwantQuant wantQuant1

The quantity wanted by the villager in this trade

Default
1
Example
15
Numberoptional
want2want2

Second item wanted by the villager in this trade

Default
None
Example
Book
Page nameoptional
wantQuant2wantQuant2

The quantity of the second item wanted by the villager in this trade.

Default
None
Example
5
Numberoptional
wantNotewantNote

The reference name. To apply the same reference to more than one trade in a table, set wantNote to the same value in each trade, and set wantNoteText on ''one'' trade.

Example
librarian_enchant
Stringoptional
wantNoteTextwantNoteText

The text for the reference. Must only be set once per reference. Use wantNote to apply the same text to multiple trades in a table.

Stringoptional
multimulti

The price multiplier for the trade. Must be either 0.05, or 0.2

Suggested values
0.05 0.2
Numberrequired
givegive

The name of the item given by the villager in this trade

Default
Emerald
Page nameoptional
giveQuantgiveQuant

The quantity of item given by villager in this trade

Default
1
Example
5
Numberoptional
giveNotegiveNote

The reference name. To apply the same reference to more than one trade in a table, set wantNote to the same value in each trade, and set wantNoteText on ''one'' trade.

Stringoptional
giveNoteTextgiveNoteText

The text for the reference. Must only be set once per reference. Use wantNote to apply the same text to multiple trades in a table.

Stringoptional
maxTradesmaxTrades

The maximum number of trades that can be executed before the villager must restock

Example
12
Numberrequired
xpGainxpGain

The xp gained by the villager for each trade

Example
5
Numberrequired
weightweight

The number of villager trade choices this line represents. Currently only used by "All color" trades, where each trade is actually 16 distinct color trades represented as one.

Default
1
Numberoptional
[view] [edit] [history] [refresh]The above documentation is transcluded from Template:TradeLine/doc.