Template:CaeLandData: Difference between revisions

From Pokemon Revolution Online Wiki
Jump to navigation Jump to search
Cae (talk | contribs)
No edit summary
Cae (talk | contribs)
No edit summary
Line 1: Line 1:
<noinclude>[[Category:Pokémon-location templates]]</noinclude>
<noinclude>[[Category:Pokémon-location templates]]</noinclude>
<includeonly>
<includeonly>
{{#get_file_data:source=spawns|file name=land_spawns.csv|format=CSV with header|filters=Pokemon={{{Name|{{PAGENAME}}}}}|data=area=Map,member=Member,number=DexID,name=Pokemon,morning=Morning,day=Day,night=Night,item=Item,rarity=Tier,minlvl=MinLvl,maxlvl=MaxLvl}}
{{Trichrome|Color={{{Color|{{#var:primaryType}}}}}}}
 
<!-- Store the result of the data query in a variable -->
{{#get_file_data:source=spawns|file name=land_spawns.csv|format=CSV with header|filters=Pokemon={{{Name|{{PAGENAME}}}}}|data=area=Map,member=Member,number=DexID,name=Pokemon,morning=Morning,day=Day,night=Night,item=Item,rarity=Tier,minlvl=MinLvl,maxlvl=MaxLvl|store=spawnData}}
 
<!-- Debugging: Print the value of spawnData -->
{{#vardump:{{{spawnData}}}}}


{{#if: {{#get_file_data:source=spawns|file name=land_spawns.csv|format=CSV with header|filters=Pokemon={{{Name|{{PAGENAME}}}}}|data=area=Map,member=Member,number=DexID,name=Pokemon,morning=Morning,day=Day,night=Night,item=Item,rarity=Tier,minlvl=MinLvl,maxlvl=MaxLvl}}  
<!-- Check if spawnData contains actual data -->
| <!-- If data found -->
{{#if: {{{spawnData|}}}  
{{Trichrome|Color={{{Color|{{#var:primaryType}}}}}}}
  <!-- If data found, display the table -->
<table align="left" style="width: 85%; max-width: 90%; text-align: center; cellpadding: 3px; cellspacing: 10px; margin: auto auto; border-radius: 15px; border: 3px solid {{#var:border}}; background-color: {{#var:background}}; padding: 7px;">
  <table align="left" style="width: 85%; max-width: 90%; text-align: center; cellpadding: 3px; cellspacing: 10px; margin: auto auto; border-radius: 15px; border: 3px solid {{#var:border}}; background-color: {{#var:background}}; padding: 7px;">
<tr style="background-color: {{#var:cell}}; color: {{#var:border}};"><th scope="col" style="border-top-left-radius: 25px; width: 15%; border: 1px solid {{#var:border}};">Location</th><th scope="col" style="width: 7%; border: 1px solid {{#var:border}};">Levels</th><th colspan="3" scope="col" style="width: 17%; border: 1px solid {{#var:border}};">[[Pokétime|<span style="color: {{#var:border}};">Times</span>]]</th><th style="width: 20%; border: 1px solid {{#var:border}};">Held Item</th><th style="border-top-right-radius: 25px; width: 10%; border: 1px solid {{#var:border}};">[[List of Pokémon by Rarity Tier|<span style="color: {{#var:border}};">Rarity Tier</span>]]</tr>
    <tr style="background-color: {{#var:cell}}; color: {{#var:border}};">
{{#display_external_table:
      <th scope="col" style="border-top-left-radius: 25px; width: 15%; border: 1px solid {{#var:border}};">Location</th>
template=PokemonLandDataRow|data=area=area,member=member,number=number,name=name,morning=morning,day=day,night=night,item=item,rarity=rarity,minlvl=minlvl,maxlvl=maxlvl
      <th scope="col" style="width: 7%; border: 1px solid {{#var:border}};">Levels</th>
}}
      <th colspan="3" scope="col" style="width: 17%; border: 1px solid {{#var:border}};">[[Pokétime|<span style="color: {{#var:border}};">Times</span>]]</th>
<tr><td colspan="8" style="text-align: left; border-radius: 1px 1px 25px 25px; border: 1px solid {{#var:border}}; background-color: {{#var:cell}};"><p style="margin-top: 8px; margin-left: 10px;"><ul>
      <th style="width: 20%; border: 1px solid {{#var:border}};">Held Item</th>
<li><span style="color:#FF00BF; font-weight: bold;">Pink-colored</span> areas denote that this spawn is [[membership]]-exclusive</li>
      <th style="border-top-right-radius: 25px; width: 10%; border: 1px solid {{#var:border}};">[[List of Pokémon by Rarity Tier|<span style="color: {{#var:border}};">Rarity Tier</span>]]</th>
<li>'''Emboldened''' levels indicate they are isolatable with the [[Repel trick]]</li></ul></p></td></tr>
    </tr>
</table><br clear="all">
    {{#display_external_table:
| <!-- Else if no data found -->
      template=PokemonLandDataRow|data=area=area,member=member,number=number,name=name,morning=morning,day=day,night=night,item=item,rarity=rarity,minlvl=minlvl,maxlvl=maxlvl
No spawn data available for this Pokémon.
    }}
    <tr><td colspan="8" style="text-align: left; border-radius: 1px 1px 25px 25px; border: 1px solid {{#var:border}}; background-color: {{#var:cell}};">
      <p style="margin-top: 8px; margin-left: 10px;">
        <ul>
          <li><span style="color:#FF00BF; font-weight: bold;">Pink-colored</span> areas denote that this spawn is [[membership]]-exclusive</li>
          <li>'''Emboldened''' levels indicate they are isolatable with the [[Repel trick]]</li>
        </ul>
      </p>
    </td></tr>
  </table><br clear="all">
| <!-- Else if no data found, show the message -->
  No spawn data available for this Pokémon.
}}
}}
</includeonly>
</includeonly>

Revision as of 06:18, 21 April 2025