Anonymous
Not logged in
Talk
Contributions
Log in
Dark Skylines Wiki
Search
Editing
Template:Infosection price
From Dark Skylines Wiki
Namespaces
Template
Discussion
More
More
Page actions
Read
Edit source
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<includeonly><!-- -->{{ParseInputValues|code=prof|| ,Base, ,Rancher, ,Tiller, ,Artisan, ,Forester, ,Tapper, ,Blacksmith, ,Gemologist, ,Fisher, ,Angler, ,Spring Onion Mastery, ,Bear's Knowledge, }}<!-- // These two arrays must match the above profession list -->{{#arraydefine:$lang_fullprofs|Base, Rancher Profession, Tiller Profession, Artisan Profession, Forester Profession, Tapper Profession, Blacksmith Profession, Gemologist Profession, Fisher Profession, Angler Profession, Spring Onion Mastery, Bear's Knowledge}}<!-- -->{{#arraydefine:$prof_mults|1, 1.2, 1.1, 1.4, 1.5, 1.25, 1.5, 1.3, 1.25, 1.5, 5, 3}}{{ParseInputValues|code=nosale|| ,Cannot be sold, Cannot be sold, Can not be sold, N/A, }}<!-- -->{{#arraydefine:$lang_sellprices|Sell Prices}}<!-- -->{{#arraydefine:$lang_sellprice|Sell Price}}<!-- -->{{#arraydefine:$lang_baseprice|Base Price}}<!-- -->{{#arraydefine:$lang_artisan_sellprice|Artisan Sell Prices}}<!-- -->{{#arraydefine:$lang_artisan_baseprice|Artisan Base Price}}<!-- -->{{#arraydefine:$lang_Angler_link|Angler (profession)}}<!-- -->{{#arraydefine:$lang_Blacksmith_link|Blacksmith (profession)}}<!-- -->{{#arraydefine:$lang_Tapper_link|Tapper (profession)}}<!-- // Allow % sign to be placed properly based on locale: before, after, or withspace -->{{#arraydefine:$lang_%_where|after}}<!-- // END of translations // Put input values of profession into array -- but do NOT process yet by ParseInputValues, because every entry needs to be // preserved (duplicate values, non-recognized values, etc.) -->{{#arraydefine:$raw_profs|{{{prof|base}}}}}<!-- // Create fake looping array to allow for different cell layouts // Total number of loop reps needed is 2*raw_profs (header and data cell for each profession) -->{{#arraydefine:$icount|0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}}<!-- -->{{#arrayslice:$icellloop|$icount|0|{{#expr:2*{{#arraysize:$raw_profs}}}}}}<!-- -->{{#arraydefine:$iqual|{{ParseInputQuality|quality={{{quality|}}}|iridium={{{iridium|}}}|hide={{{hide|}}}}}}}<!-- -->{{#arraydefine:$iitems|{{{item|}}}}}<!-- -->{{#arrayreset:$comboprof|$comboindex}}{{#if:{{{comboprof|}}} |{{#arraydefine:$comboprof|{{ParseInputValues|code=prof|{{{comboprof}}}|default=true}}}} {{#arraydefine:$comboindex|{{ParseInputValues|code=prof|{{{comboprof}}}|translate=index}}}}}}<!-- -->{{#if:{{#arrayprint:$comboindex}}||{{#arraydefine:$comboindex|-1}}}}<!-- // Determine number of columns that will contain item data. // If specified, use {{{ncolumns}}} -- so default doesn't try to capture every possibility. // Default value is number of professions. Unless too many professions OR every data cell // is going to contain only one entry (1 qual and 1 item). -->{{#arraydefine:$ncolsi |{{#ifexpr:{{#if:{{{ncolumns|}}}|1|0}} and {{#iferror:{{#expr:{{{ncolumns}}}>0}}|0}} | {{{ncolumns}}} | {{#ifexpr: {{#arraysize:$raw_profs}}>3 or ( {{#arraysize:$iqual}}<2 and {{#arraysize:$iitems}}<2 ) | 1 | {{#arraysize:$raw_profs}} }}}}}}<!-- // Start new table if requested OR if we need to do colspan="3" // Assume if addtable was not explicitly requested that this is embedded in a table. // Ideally we would start new row/cell and nest new table within that cell... but // there are spacing issues only fixable via css. So instead, close old table. -->{{#ifexpr:{{#if:{{{addtable|}}}|1|0}} or {{#arrayprint:$ncolsi}}>2| {{#if:{{{addtable|}}}||<nowiki/> {{!}}}<nowiki/> }}<nowiki/> {{{!}} id="infoboxtable" style="margin-top:-2px;" }}<!-- // Do colspan header across entire table with general label: comboprof if specified, then (artisan) sell prices -->{{#ifexpr:{{#arrayprint:$ncolsi}}>1|<nowiki/> {{!}}- {{!}} colspan="{{#ifexpr:{{#arrayprint:$ncolsi}}>2|{{#arrayprint:$ncolsi}}|2}}" id="infoboxsection" style="text-align:center;"{{!}}<!-- --> {{#ifexpr:{{#arrayprint:$comboindex}}>0 |[[File:{{#arrayprint:$comboprof}}.png|24px<!-- --> |link={{ParseInputValues|code=prof|{{#arrayprint:$comboprof}}|translate=true}}<!-- --> |alt={{#arrayindex:$lang_fullprofs|{{#arrayprint:$comboindex}}}}]]<!-- --> [[{{ParseInputValues|code=prof|{{#arrayprint:$comboprof|}}|translate=true}}<!-- --> {{!}}<span style="color: white;">{{#arrayindex:$lang_fullprofs|{{#arrayprint:$comboindex}}}}</span>]]  | {{#if:{{#arrayprint:$comboprof}}|{{#arrayprint:$comboprof}} }}}}<!-- --> {{#if:{{{artisan|}}} | {{#arrayprint:$lang_artisan_sellprice}} | {{#arrayprint:$lang_sellprices}} }} }}<!-- // Main loop: each iteration through @cell@ generates one cell // Start with bookkeeping to work out which cell is being generated: header or data, for which entry in $raw_profs -->{{#arrayprint:$icellloop||@cell@| {{#ifeq:{{#arrayprint:$ncolsi}}|1 | {{#arraydefine:$is_header|{{#ifexpr:(@cell@ mod 2)=0|1|}}}} {{#arraydefine:$cindex|{{#expr:trunc(@cell@/2)+1}}}} | {{#arraydefine:$is_header|{{#ifexpr:@cell@ < {{#arrayprint:$ncolsi}}|1|}}}} {{#arraydefine:$cindex|{{#expr:(@cell@ mod {{#arrayprint:$ncolsi}})+1}}}} }}<!-- // Set prof to $raw_profs[$cindex-1]. Set $pindex to location in standard array, or -1 // Set prof_mult to standard value or or {{{multcell[i]}}} or 1 -->{{#arraydefine:$prof| {{ParseInputValues|code=prof|{{#arrayindex:$raw_profs|{{#expr:{{#arrayprint:$cindex}}-1}}}}|default=true}}}} {{#arraydefine:$pindex|{{ParseInputValues|code=prof|{{#arrayprint:$prof}}|translate=index|default=-1}}}} {{#arraydefine:$mult |{{#iferror: {{#expr:{{{multcell{{#arrayprint:$cindex}}|}}}>1}} |{{#ifexpr:{{#arrayprint:$pindex}}>=0 |{{#arrayindex:$prof_mults|{{#arrayprint:$pindex}}}} |1}} |{{{multcell{{#arrayprint:$cindex}}}}} }}}}<!-- // If comboprof specified, multiply in extra profession multiplier -->{{#ifexpr:{{#arrayprint:$comboindex}}>0 |{{#arraydefine:$mult|{{#expr:({{#arrayprint:$mult}}) * {{#arrayindex:$prof_mults|{{#arrayprint:$comboindex}}}}}}}} }}<!-- // Determine items for current cell: {{{itemcell[i]}}} or {{{item}}} -->{{#arraydefine:$iitems|{{#if:{{{itemcell{{#arrayprint:$cindex}}|}}} | {{{itemcell{{#arrayprint:$cindex}}}}} | {{{item|}}}}}}}<!-- -->{{#arraydefine:$ilinks|{{#if:{{{linkcell{{#arrayprint:$cindex}}|}}} | {{{linkcell{{#arrayprint:$cindex}}}}} | {{#if:{{{link{{#arrayprint:$iitems}}|}}} | {{{link{{#arrayprint:$iitems}}}}} | {{{link|}}}}}}}}}<!-- // Start new table row as appropriate --> {{#ifexpr: (@cell@ mod {{#ifexpr:{{#arrayprint:$ncolsi}}>2|{{#arrayprint:$ncolsi}}|2}})=0 |<nowiki/> {{!}}- <!-- // Print header cell contents: icon, profession name, multiplier info -->}}{{#if:{{#arrayprint:$is_header}}|<nowiki/> {{!}} id="infoboxsection" {{!}} <!-- // Display item name if cell-specific item specified --> {{#ifexpr:{{#if:{{{itemcell{{#arrayprint:$cindex}}|}}}|1|0}} and {{#arraysize:$iitems}}=1 | {{#if:{{#arrayprint:$ilinks}} | [[{{#arrayprint:$ilinks}}{{!}}<span style="color: white;">{{#arrayprint:$ilinks}}</span>]]: | [[{{#arrayprint:$iitems}}{{!}}<span style="color: white;">{{#arrayprint:$iitems}}</span>]]:}}<!-- -->{{#ifexpr:{{#arrayprint:$pindex}}>0 or {{#arrayprint:$mult}}>1|<br />}}<!-- // If standard profession (and not base, i.e. pindex=0), display profession's icon // Namely $prof_Icon.png for Tapper, Blacksmith, Angler. Or $prof.png otherwise --> }}{{#ifexpr:{{#arrayprint:$pindex}}>0 | [[File:{{#switch:{{#arrayprint:$prof}} |Tapper|Blacksmith |Angler = {{#arrayprint:$prof}} Icon.png{{!}}link={{#arrayprint:$lang_{{#arrayprint:$prof}}_link}} |#default = {{#arrayprint:$prof}}.png{{!}}link={{ParseInputValues|code=prof|{{#arrayprint:$prof}}|translate=true}} }}|24px<!-- --> |alt={{ParseInputValues|code=prof|{{#arrayprint:$prof}}|translate=true}}]]<!-- // Add comboprof icon --> }}{{#ifexpr: {{#arrayprint:$comboindex}}>0 | {{#ifexpr:{{#arrayprint:$pindex}}>0 |  + }}<!-- --> [[File:{{#arrayprint:$comboprof}}.png|24px<!-- --> |link={{ParseInputValues|code=prof|{{#arrayprint:$comboprof}}|translate=true}}<!-- --> |alt={{#arrayindex:$lang_fullprofs|{{#arrayprint:$comboindex}}}}]]<!-- // Add text/link for profession if won't overcrowd. Not in comboprof case, not in cell-specific item case. --> | {{#if:{{{itemcell{{#arrayprint:$cindex}}|}}}|<!-- // Simple 'Base Price' or 'Sell Price' (if no banner) title --> | {{#ifeq:{{#arrayprint:$prof}}|Base | {{#ifexpr:{{#arrayprint:$ncolsi}}>1 | {{#arrayprint:$lang_baseprice}}: | {{#if:{{{artisan|}}} |{{#arrayprint:$lang_artisan_sellprice}}: |{{#arrayprint:$lang_sellprice}}:}}}}<!-- // For standard professions, full profession name as link --> | {{#ifexpr:{{#arrayprint:$pindex}}>=0 | [[{{#switch:{{#arrayprint:$prof}} |Tapper|Blacksmith |Angler ={{#arrayprint:$lang_{{#arrayprint:$prof}}_link}} |#default ={{ParseInputValues|code=prof|{{#arrayprint:$prof}}|translate=true}}}}<!-- -->{{!}}<span style="color: white;"><!-- -->{{#ifexpr:{{#arrayprint:$ncolsi}}>2 |{{ParseInputValues|code=prof|{{#arrayprint:$prof}}|translate=true}} |{{#arrayindex:$lang_fullprofs|{{#arrayprint:$pindex}}}}}}<!-- --></span>]]:<!-- // For unrecognized professions, display profession non-linked --> | {{#arrayprint:$prof}}: }}}}}}}}<!-- // Add text specifying size of multiplier --> {{#ifexpr: {{#arrayprint:$mult}}>1 <!-- --> | {{#if:{{{itemcell{{#arrayprint:$cindex}}|}}}||<br />}}<!-- --><span style="white-space: nowrap; padding-right: 5px">''({{#ifexpr:{{#arrayprint:$mult}}>=2 |×{{formatnum:{{#arrayprint:$mult}}}} |+{{#ifeq:{{#arrayprint:$lang_%_where}}|before|%}}{{formatnum:{{#expr:floor(100*({{#arrayprint:$mult}}-1)+0.5)}}}}{{#switch:{{#arrayprint:$lang_%_where}}|after=%|withspace= %}} }}{{#ifexpr:{{#arrayprint:$ncolsi}}>2 or {{#if:{{{itemcell{{#arrayprint:$cindex}}|}}}|1|0}}|| {{#arrayprint:$lang_sellprice}}}})''</span> }}<!-- // END of header cell contents // Print data cell contents: loop over all items listed in iitems -->|<nowiki/> {{!}}id="infoboxdetail"{{!}}<!-- -->{{#arrayslice:$itemloop|$icount|0|{{#arraysize:$iitems}}}}<!-- -->{{#arrayprint:$itemloop||@iloop@|<!-- // Determine item name, linkname, quality, price: from item-specific input, cell-specific input, or global value -->{{#arraydefine:$curriitem|{{#arrayindex:$iitems|@iloop@}}}} {{#arraydefine:$currilink|{{#if:{{{link{{#arrayprint:$curriitem}}|}}} |{{{link{{#arrayprint:$curriitem}}}}} |{{#arrayindex:$ilinks|@iloop@}}}}}} {{#arraydefine:$curriqual|{{#if:{{{qual{{#arrayprint:$curriitem}}|}}} |{{ParseInputQuality|quality={{{qual{{#arrayprint:$curriitem}}}}}}} |{{#if:{{{qualcell{{#arrayprint:$cindex}}|}}} |{{ParseInputQuality|quality={{{qualcell{{#arrayprint:$cindex}}}}}}} |{{#arrayprint:$iqual|,}}}}}}}} {{#arraydefine:$curriprice| {{#if:{{{price{{#arrayprint:$curriitem}}|}}}|{{{price{{#arrayprint:$curriitem}}}}}|{{{price|}}}}}}}<!-- // Handle non-numeric price: if $mult=1, print original {{{price}}} value // Otherwise, autogenerate text (e.g., handle artisan price on Wine page) -->{{#iferror:{{#expr:{{#if:{{#arrayprint:$curriprice}}|{{#arrayprint:$curriprice}}|0}}>0}} |{{#ifeq: {{#arrayprint:$mult}} | 1 |{{#if:{{ParseInputValues|code=nosale|{{#arrayprint:$curriprice}}}} |''{{ParseInputValues|code=nosale|{{#arrayprint:$curriprice}}|translate=true|vary_end=true}}'' |{{#ifeq:{{#sub:{{#arrayprint:$curriprice}}|0|1}}|' |{{ucfirst:{{#arrayprint:$curriprice}}}} |''{{ucfirst:{{#arrayprint:$curriprice}}}}''}}}} |''{{formatnum:{{#arrayprint:$mult}}}} ×<!-- --> {{#if:{{#arrayprint:$currilink}}|{{#arrayprint:$currilink}}|{{#arrayprint:$curriitem}}}}<!-- --> {{#arrayprint:$lang_baseprice}}''}}<!-- // Print Cannot be sold if currprice is an empty string --> |{{#ifexpr:{{#if:{{#arrayprint:$curriprice}}|0|1}} and ({{#if:{{{auto|}}}|0|1}} or {{#if:{{{srcprice|}}}|0|1}}) |{{#ifeq:@iloop@|0 |''{{ParseInputValues|code=nosale|Cannot be sold|translate=true|vary_end=true}}''}}<!-- // Use Price template (display with gold coin instead of item image) if this is non-artisan item and only one item and only normal-quality being shown and ... --> |{{#ifexpr: {{#if:{{{artisan|}}}|0|1}} and {{#ifeq:{{#arrayprint:$curriqual}}|Normal|1|0}} and {{#arraysize:$iitems}}=1 and {{#arrayprint:$ncolsi}}=1 and ({{#if:{{{auto|}}}|0|1}} or {{#if:{{{srcprice|}}}|0|1}}) |{{Price|{{#expr: trunc (trunc({{#arrayprint:$curriprice}}) * {{#arrayprint:$mult}})}}}} <!-- // And now the moment you've all been waiting for: standard display of prices using qualityprice // Qualityprice now does various automatically set prices, qualities, etc. --> |{{Qualityprice |{{#if:{{{image{{#arrayprint:$curriitem}}|}}}|{{{image{{#arrayprint:$curriitem}}}}}|{{#arrayprint:$curriitem}}}}<!-- -->|{{#if:{{#arrayprint:$curriprice}}|{{#arrayprint:$curriprice}}|0}} |prof_mult = {{#arrayprint:$mult}} |quality = {{#arrayprint:$curriqual|,}} |link = {{#ifeq:{{#arrayprint:$currilink}}|{{PAGENAME}}|| {{#ifeq:{{{link}}}||| {{#if:{{#arrayprint:$currilink}}|{{#arrayprint:$currilink}}| {{#ifeq:{{CONTENTLANG}}|en|{{#arrayprint:$curriitem}}|1}}}}}}}} |srcprice = {{{srcprice|}}} |auto = {{{auto|}}} }}}}}}}}}}}}}}<!-- // Close table if one was created // And create new one if this was called from infobox ... in case there's more content to add // (if there is no more content, there's some unneeded whitespace, but no way around it) -->{{#ifexpr:{{#if:{{{addtable|}}}|1|0}} or {{#arrayprint:$ncolsi}}>2|<nowiki/> {{!}}} {{#if:{{{addtable|}}}||<nowiki/> {{{!}} id="infoboxtable" }}}}</includeonly><noinclude>{{{{FULLPAGENAME}}/doc}}</noinclude>
Summary:
Please note that all contributions to Dark Skylines Wiki may be edited, altered, or removed by other contributors.
Original content you contribute to the Dark Skylines Wiki is submitted as Creative Commons work (or other applicable licenses—see
Larp:Copyrights
for details). If you have any questions, please contact an admin.
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Infosection price/doc
(
edit
)
Navigation
Navigation
Recent changes
Random page
Index
Characters
Character List
Notable Characters
Officers of Caliburn
Lore
Caliburn Island
Boston
The Warden
House Morningstar
Our LARP
Code of Conduct
The Narrator Team
Venue Style Sheet
House Rules
Reference Sheets
Graduation System
Equipment
Stock Locations
Status Rules
Wiki tools
Wiki tools
Special pages
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs