Anno 2070 Wiki
Advertisement

Templates[]

  • Added a new Template: {{Overlay2}}, which supports custom image sizes, superseding the previous {{Overlay}}.
  • Added a new Template: {{ChainGoods}}, which allows for fast links to #Production_Chains_Utilizing_this_Building (heading), instead of linking to Goods#Item. Refer to ChainGoods for a list of valid Goods. Honestly wish I didn't have to use this, but naming conventions are messed up, and Goods doesn't link to actual Goods, but production chains instead.
  • Added a new Template: {{Development}}, which simplifies the display of population requirements in a tabular format.
  • Added a new Template: {{Tiles}}, to standardize space efficiency calculations in building layouts. Work in progress.
  • Added a few selectors for tables without padding to the Wikia.css stylesheet.

Parser 'Features'/Bugs[]

Parameter Default Values[]

This fails if the parameter/value is set to empty, not undefined.

{{{1|0}}}

The documentation on this subject is misleading: mw:Help:Parser_functions_in_templates. It's using the value of the first parameter if defined, according to this poorly worded document: mw:Help:Parameter_default.

if p is defined, {{{p|q}}} is changed to the wikitext of the value of p (or the wikitext to which that is changed if there is simultaneous substitution inside that wikitext)

if p is undefined, {{{p|q}}} is changed to q, possibly with simultaneous substitutions inside the wikitext for q.

The only solution to this problem is to use workarounds such as:

{{#if:{{{1|}}}|{{{1}}}|0}}

Example parameters/values set to null:

{{aTemplate||}}
{{aTemplate|aParameter=|}}

These will ALL fail within templates if the value is set, but empty:

{{param|0}}
{{#if:{{{param|0}}}|{{{param}}}|0}}
{{#expr:{{{param|0}}}*2}}                                      (formatting omitted)
{{#ifexpr:{{{param|0}}}=0|0|{{{param}}}}}                      (formatting omitted)

The values must be checked explicitly:

{{#if:{{{param|}}}|{{{param}}}|0}}
{{#expr:{{#if:{{{param|}}}|{{{param}}}|0}}*2}}                 (formatting omitted)
{{#ifexpr:{{#if:{{{param|}}}|{{{param}}}|0}}=0|0|{{{param}}}}} (formatting omitted)

That's beyond horrible markup; disastrous. Now wrap some formatting around that:

No implicit numeric type conversion[]

The #expr and #ifexpr mathematical operations do not perform implicit type conversions to int/float. The FormatNum extension must be used explicitly, ie:

fail: Expression error: Unrecognized punctuation character ",".
pass: 62084422

fail > {{#expr:{{NUMBEROFUSERS}}*2}}
pass > {{#expr:{{formatnum:{{NUMBEROFUSERS}}|R}}*2}}

This is probably due to the way the parser works, substituting the original parameter before processing the following mathematical operations. However, exceptions should be made in the case of #expr and #ifexpr; since the parameters are all assumed to be operations. Hence, the conversion should be implied/implicit... yawn...

{{#ifexpr:{{formatnum:{{#if:{{{1|}}}|{{{1}}}|0}}|R}}+{{formatnum:{{#if:{{{2|}}}|{{{2}}}|0}}|R}}>0|{{#expr:{{formatnum:{{#if:{{{1|}}}|{{{1}}}|0}}|R}}*{{formatnum:{{#if:{{{2|}}}|{{{2}}}|0}}|R}}}}|not defined}}

Fuck that shit... seriously! LOL

Administration[]

Redundant Redirects[]

Removed a whole slew of useless/broken/double redirects, misspellings, errors, etc... Updated all links and made certain none were still indexed by search engines, or contained histories.

Do NOT remove the existing redirects, as they're all still indexed by search engines or useful internally.

Broken Links[]

Note to self: There are so many damn broken links, mostly due to User:Grilse's Archives and non-existent links in this "ideas" page, due to bugs in the {{Chain-ext}}, {{Chain-0}}, {{Chain-ext-deepocean}}, and {{Chain-0-deepocean}} Templates.

Goods and Product Chains Proposal[]

Princess Goods.png

Here's a proposed layout. I'll conduct a test using a temporary Page.

I intend to include section markers for transclusion onto other pages, specifically pages for each resource/fertility (raw materials), which will transclude this page and the production chains from their corresponding transclusion page. Then everything will be in order.

Right after I finish editing the mission pages; picking up where you left off.

Notes[]

  • Avoid Academy_Research_Projects like the plague; use the Production building page #Upgrades heading instead.
  • Avoid Goods#Anchors; use the Production building page #Production_Chains_Utilizing_this_Building heading instead. That heading name though... I wanna chop it down to just #Production_Chains, but someone will probably flip a burger.

Building Layouts[]

Advertisement