Template:Testpage: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
Created page with " {{#cargo_query: tables = Building=B, Faction=F, |join on = Building.faction = F.id, <!-- H.faction = F.id, H.id = hero_t.target_id, H.id = hero_en.target_id, H.id = motto_t.target_id --> |where = B.faction = faction.id |fields = B.faction = id, <!-- hero_t.language = lang, hero_t.name..."
 
No edit summary
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
<div style="display:flex;flex-wrap:wrap;margin-bottom:40px;">
{{FactionBuildingCargo
|faction = dungeon
|bldg_id = dungeon_Build_Treasury_L1
|note    = Notenotenote
}}
{{FactionBuildingCargo
|faction = dungeon
|bldg_id = dungeon_Build_Artifact_Market_L1
|note    = Notenotenote
}}
</div>
<!-- <code><nowiki>{{FactionBuildingCargo
|faction = dungeon
|bldg_id = dungeon_Build_Artifact_Market_L1
|note    = Notenotenote
}}</nowiki></code> -->






<!--
{{#cargo_query:
{{#cargo_query:
  tables  = Building=B, Faction=F,
  tables  = Building=B,
         
          Translation=building_t
|join on = Building.faction = F.id,
|join on =  
           <!-- H.faction  = F.id,
          building_t.target_id = B.id
           H.id      = hero_t.target_id,
|where  = B.faction = 'dungeon'
           H.id      = hero_en.target_id,
          AND building_t.language = 'en'
           H.id      = motto_t.target_id -->
         
|where  = B.faction = faction.id
|fields  = B.id                    = id,
           building_t.name          = name,
          building_t.description  = description,
          B.faction                = faction,
          B.icon                  = icon,
          B.prereqs__full          = prereqs
        <!--   B.gold_cost              = gold cost,
          B.wood_cost              = wood cost,
           B.ore_cost              = ore cost,
          B.crystals_cost          = crystals cost,
           B.gemstones_cost        = gemstones cost,
          B.mercury_cost          = mercury cost,
           B.dust_cost              = dust cost,
          B.graal_cost            = graal cost,
          B.units_hire_sid        = units hire sid,
          B.units_weekly          = units weekly,
            
            
|fields  = B.faction                                = id,
          <!-- hero_t.language                      = lang,
          hero_t.name                              = name,
          CONCAT(hero_en.name,'.png')              = portrait,
          motto_t.description                      = motto,
          hero_t.description                        = biography,
          H.class_id                                = class,
          H.faction                                = faction,
          COALESCE(H.offence, HC.offence)          = startattack,
          COALESCE(H.defence, HC.defence)          = startdefense,
          COALESCE(H.spell_power, HC.spell_power)  = startspellpower,
          COALESCE(H.intelligence, HC.intelligence) = startknowledge -->
|format  = Table
|format  = Table
|named args = yes
}}  </noinclude>
-->
<!--
Test Query
{{#cargo_query:
tables  = Building=B,
          Translation=building_t
|join on =
          building_t.target_id = B.id
|where  = B.faction = 'unfrozen'
          AND building_t.language = 'en'
          AND B.id = 'unfrozen_Build_Market_L1'
|fields  = building_t.name          = name
         
|format    = table
|named args = yes
}}
unfrozen_Build_Market_L1
Query with results sent to sub-template
{{#cargo_query:
tables  = Building=B,
          Translation=building_t
|join on =
          building_t.target_id = B.id
|where  = B.faction = 'unfrozen'
          AND building_t.language = 'en'
          AND B.id = 'unfrozen_Build_Artifact_Market_L1'
|fields  = B.id                    = id,
          building_t.name          = name,
          B.icon                  = icon
         
|format    = template
|template  = BuildingNameDisplay
|named args = yes
}}
Query to fetch Prereqs for a building
{{#cargo_query:
tables  = Building=B,
          Translation=building_t
|join on =
          building_t.target_id = B.id
|where  = B.faction = 'unfrozen'
          AND building_t.language = 'en'
          AND B.prereqs__full = 'Build_Market_L1'
|order by = B.prereqs__full = 'Build_Market_L1'
|fields  = B.id                    = id,
          building_t.name          = name,
          building_t.description  = description,
          B.icon                  = icon,
          B.prereqs__full          = requirements
|format    = table
|named args = yes
|named args = yes
}}
}}
-->




<!-- Default View
{{#cargo_query:
tables  = Building=B,
          Translation=building_t
|join on =
          building_t.target_id = B.id
|where  = B.faction = 'unfrozen'
          AND building_t.language = 'en'
         
|fields  = B.id=id,
          building_t.name,
          building_t.description,
          B.faction=faction,
          B.category=category,
          B.sid=sid,
          B.level=level,
          B.name_sid=name sid,
          B.desc_sid=desc sid,
          B.narrative_desc_sid=narrative desc sid,
          B.icon=icon,
          B.background_image=background image,
          B.is_constructed_on_start=is constructed on start,
          B.level_on_start=level on start,
          B.scene_slot=scene slot,
          B.node_pos_x=node pos x,
          B.node_pos_y=node pos y,
          B.prereqs__full=prereqs,
          B.gold_cost=gold cost,
          B.wood_cost=wood cost,
          B.ore_cost=ore cost,
          B.crystals_cost=crystals cost,
          B.gemstones_cost=gemstones cost,
          B.mercury_cost=mercury cost,
          B.dust_cost=dust cost,
          B.graal_cost=graal cost,
          B.units_hire_sid=units hire sid,
          B.units_weekly=units weekly,
          B.source_path=source path
|format  = Table
|named args = yes
}}  -->




<!--


{{#cargo_query:
{{#cargo_query:
Line 58: Line 194:
|format  = Table
|format  = Table
|named args = yes
|named args = yes
}}
}} -->

Latest revision as of 01:00, 1 June 2026



Treasury
Requirements: No results
Cost Effect
5000 Gold
5 Gems
5 Crystals
5 Mercury
Produces 2000 Gold daily.






Artifact Merchant
Requirements: Marketplace
Cost Effect
2500 Gold
5 Wood
5 Ore
Allows artifacts to be traded.