Template:XML Reference: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 15: Line 15:
! Parameter  
! Parameter  
! Result
! Result
! Subunit
! Sub-unit
|-
|-
| <code>object</code>
| <code>object</code>
Line 55: Line 55:


When this template is used, a name for the citation will automatically be assigned, and will be equivalent to the parameter used. In this case, the parameter is <code>object</code>, so the citation can be used again without creating a new one by utilizing <code><nowiki><ref name="object"/></nowiki></code>
When this template is used, a name for the citation will automatically be assigned, and will be equivalent to the parameter used. In this case, the parameter is <code>object</code>, so the citation can be used again without creating a new one by utilizing <code><nowiki><ref name="object"/></nowiki></code>
<ref name="object"/>
<ref name="object"/>


If you want to reference an XML's subunit, such as a specific encountertable within <code>EncounterTables.xml</code>:
If you want to reference an XML file's sub-unit, such as a specific encountertable within <code>EncounterTables.xml</code>:
If you wanted to create a citation for <code>ObjectBlueprints.xml</code>:
<pre><nowiki>{{XML Reference
<pre><nowiki>{{XML Reference
|encountertable
|encountertable
Line 66: Line 66:
|EncounterTableName
|EncounterTableName
}}
}}
{{XML Reference|pop}}


</noinclude>
</noinclude>

Revision as of 21:34, 31 March 2021

This template can be used to reference specific XML files and their contents.

Parameter Result Sub-unit
object ObjectBlueprints.xml object name
population or pop PopulationTables.xml population name
encountertable or encounter EncounterTables.xml encountertable name
body Bodies.xml anatomy name
conversation or convo Conversations.xml conversation ID
faction Factions.xml faction name
quest Quests.xml quest name

Usage

If you wanted to create a citation for ObjectBlueprints.xml:

{{XML Reference
|object
}}

[1]

When this template is used, a name for the citation will automatically be assigned, and will be equivalent to the parameter used. In this case, the parameter is object, so the citation can be used again without creating a new one by utilizing <ref name="object"/>

[1]

If you want to reference an XML file's sub-unit, such as a specific encountertable within EncounterTables.xml:

{{XML Reference
|encountertable
|EncounterTableName
}}

[2]


  1. 1.0 1.1 ObjectBlueprints.xml
  2. EncounterTables.xml, encountertable name EncounterTableName