Difference between revisions of "Template:RequireList"
From A Wiki in the Desert
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Specialization]] |format=array|name=specrequires}}{{#loop: | + | {{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Specialization]] |format=array|name=specrequires}}<nowiki/> |
− | * Required to unlock the [[{{#arrayindex:specrequires|{{#var: | + | {{#loop: i |
− | }}{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Buildings]] |format=array|name=buildingrequires}}{{#loop: | + | | 0 |
− | * Required to build [[{{#arrayindex:buildingrequires|{{#var: | + | | {{#arraysize:specrequires}} |
− | }}{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Resources]] |format=array|name=resourcerequires}}{{#loop: | + | | <nowiki/> |
− | * Required to gather [[{{#arrayindex:resourcerequires|{{#var: | + | * Required to unlock the [[{{#arrayindex:specrequires|{{#var:i}}}}]] specialization. |
− | }}{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Items]] |format=array|name=itemrequires}}{{#loop: | + | }}<nowiki/> |
− | * Required to produce [[{{#arrayindex: | + | {{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Buildings]] |format=array|name=buildingrequires}}<nowiki/> |
− | }}{{#ask: [[requires::{{trim|{{{1}}}}}]] [[Is upgrade::True]]|format=array|name=buildingupgrade}}{{#loop: i | 0 | {{#arraysize:buildingupgrade}} | <nowiki/> | + | {{#loop: i |
+ | | 0 | ||
+ | | {{#arraysize:buildingrequires}} | ||
+ | | <nowiki/> | ||
+ | * Required to build [[{{#arrayindex:buildingrequires|{{#var:i}}}}]] | ||
+ | }}<nowiki/> | ||
+ | {{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Resources]] |format=array|name=resourcerequires}}<nowiki/> | ||
+ | {{#loop: i | ||
+ | | 0 | ||
+ | | {{#arraysize:resourcerequires}} | ||
+ | | <nowiki/> | ||
+ | * Required to gather [[{{#arrayindex:resourcerequires|{{#var:i}}}}]] | ||
+ | }}<nowiki/> | ||
+ | {{#ask: [[requires::{{trim|{{{1}}}}}]] [[Category:Items]] |format=array|name=itemrequires}}<nowiki/> | ||
+ | {{#arraydiff:itemswithoutresources |itemrequires |resourcerequires }}<nowiki/> | ||
+ | {{#loop: i | ||
+ | | 0 | ||
+ | | {{#arraysize:itemswithoutresources}} | ||
+ | | <nowiki/> | ||
+ | * Required to produce [[{{#arrayindex:itemswithoutresources|{{#var:i}}}}]] | ||
+ | }}<nowiki/> | ||
+ | {{#ask: [[requires::{{trim|{{{1}}}}}]] [[Is upgrade::True]]|format=array|name=buildingupgrade}}<nowiki/> | ||
+ | {{#loop: i | ||
+ | | 0 | ||
+ | | {{#arraysize:buildingupgrade}} | ||
+ | | <nowiki/> | ||
* Required to upgrade [[{{#ask:[[{{#arrayindex:buildingupgrade|{{#var:i}}}}]]|?Has parent#=|mainlabel=-}}]] | * Required to upgrade [[{{#ask:[[{{#arrayindex:buildingupgrade|{{#var:i}}}}]]|?Has parent#=|mainlabel=-}}]] | ||
** {{#ask:[[{{#arrayindex:buildingupgrade|{{#var:i}}}}]]|?Has benefit#=|mainlabel=-}} | ** {{#ask:[[{{#arrayindex:buildingupgrade|{{#var:i}}}}]]|?Has benefit#=|mainlabel=-}} | ||
− | }} | + | }}<nowiki/> |
+ | {{#ask: [[{{trim|{{{1}}}}}]]|?Has benefit|mainlabel=-|format=array|name=benefitrequires}}<nowiki/> | ||
+ | {{#loop: i | ||
+ | | 0 | ||
+ | | {{#arraysize:benefitrequires}} | ||
+ | | <nowiki/> | ||
+ | {{#if: {{#arrayindex:benefitrequires|{{#var:i}}}}|* {{#arrayindex:benefitrequires|{{#var:i}}}}}} | ||
+ | }}<nowiki/> |
Latest revision as of 21:32, 24 May 2021