Format for new XML pages: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
No edit summary
m (Unprotected "Format for new XML pages")
 
(17 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{|align="right"
Ready to create a new page detailing the tags in an XML file?  Just copy & paste the below code into any new XML reference page as a starting point.
|[[Civ4 XML Reference|Back to XML Reference]]
|}
Just copy & paste the below into any new XML reference page to use as a starting point.


Please remember, list your tags first by tag type as indicated below, and then ''alphabetically''.  This is a reference site, and not everyone is familiar yet with the sometimes confusing order Firaxis gave us for the tags.
Please remember, list your tags first by tag type as indicated below, and then ''alphabetically''.  This is a reference site, and not everyone is familiar with the sometimes confusing order Firaxis uses for the tags.


<pre>
<pre>
{| align="left"
The '''FILENAME''' file <<INSERT PURPOSE HERE>>.
|[[(name of previous page)|Previous article]]
 
|}
All tags must be opened and closed; the first is the "open", the second the "close" tag. If nothing goes inside a "list tag", then it should just be the opening tag with a "/" before the closing bracket. The following tables contain all available tags, as well as their purpose and accepted values.
{|align="right"
 
|[[Civ4 XML Reference|Back to XML Reference]]
|}<br><br>
<font color=red>This page is missing information.
<font color=red>This page is missing information.
Do not remove this notice until it is complete.</font>
Do not remove this notice until it is complete.</font>


Write a summary here of what the file is used for.


 
==Tags==
==Header Tags==
===Headers===


These tags typically bracket other tags, sometimes the entire file, and are generally used to specify more than one piece of data.
These tags typically bracket other tags, sometimes the entire file, and are generally used to specify more than one piece of data.


{| border="1" cellpadding="3" cellspacing="0"
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Tag Name
Line 36: Line 30:




==Prerequisite Tags==
===Text===
 
These tags ''must'' be included when writing new entries, or the game will crash or otherwise malfunction.


{| border="1" cellpadding="3" cellspacing="0"
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Tag Name
Line 53: Line 45:




==Text Tags==
===Integers===
 
All of these tags have a numerical value.  Though it sometimes can be negative, it usually is not.


{| border="1" cellpadding="3" cellspacing="0"
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Tag Name
Line 68: Line 62:




==Integer==
===Boolean===


All of these tags have numerical valueSometimes, it can be negative, usually not.
All of these can either be 1 (on, or true) or 0 (off, or false)Be careful, as you can wind up with a double-negative, which the game will interpret as "True".


{| border="1" cellpadding="3" cellspacing="0"
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Tag Name
Line 85: Line 79:




==Boolean==
===Lists (Multi-line)===


All of these can either be 1 (on, or true) or 0 (off, or false).  Be careful, as you can wind up with a double-negative, which the game will interpret as "True".
All List tags consist of an opening/closing tag, which is shown here, and then each entry within it is another tag with the same name as the parent tag, minus the "s" (i.e. singular, rather than plural).


{| border="1" cellpadding="3" cellspacing="0"
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Tag Name
Line 102: Line 96:




==List (Multi-line) Tags==
===Art===


All List tags consist of an opening/closing tag, which is shown here, then each entry within it as another tag with the same name as the parent tag, minus the "s".
These tags are directly related to the rendering of art for the entry.


{| border="1" cellpadding="3" cellspacing="0"
{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Tag Name
Line 119: Line 113:




==Art Tags==
==Example==
 
These tags are directly related to the rendering of art for the entry.


{| border="1" cellpadding="3" cellspacing="0"
In the following example of code, please note that there is a specific order of all of the tags.  You ''must'' list the tags in this order for the game to properly interpret your file.
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
!Tag name
|enter text here
|-
!Tag name
|enter text here
|}


  <insert code example from actual XML file>


=Example=
{{Civ4_XML_Files}}
<code example here>
    <blah>
    <blih>
    <bluh>
<close>
{| align="left"
|[[(name of next page)|Next article]]
|}
{|align="right"
|[[Civ4 XML Reference|Back to XML Reference]]
|}
</pre>
</pre>

Latest revision as of 01:11, 3 October 2011

Ready to create a new page detailing the tags in an XML file? Just copy & paste the below code into any new XML reference page as a starting point.

Please remember, list your tags first by tag type as indicated below, and then alphabetically. This is a reference site, and not everyone is familiar with the sometimes confusing order Firaxis uses for the tags.

The '''FILENAME''' file <<INSERT PURPOSE HERE>>.

All tags must be opened and closed; the first is the "open", the second the "close" tag. If nothing goes inside a "list tag", then it should just be the opening tag with a "/" before the closing bracket. The following tables contain all available tags, as well as their purpose and accepted values. 

<font color=red>This page is missing information.
Do not remove this notice until it is complete.</font>


==Tags==
===Headers===

These tags typically bracket other tags, sometimes the entire file, and are generally used to specify more than one piece of data.

{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
!Tag name
|enter text here
|-
!Tag name
|enter text here
|}


===Text===

{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
!Tag name
|enter text here
|-
!Tag name
|enter text here
|}


===Integers===

All of these tags have a numerical value.  Though it sometimes can be negative, it usually is not.

{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
!Tag name
|enter text here
|-
!Tag name
|enter text here
|}


===Boolean===

All of these can either be 1 (on, or true) or 0 (off, or false).  Be careful, as you can wind up with a double-negative, which the game will interpret as "True".

{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
!Tag name
|enter text here
|-
!Tag name
|enter text here
|}


===Lists (Multi-line)===

All List tags consist of an opening/closing tag, which is shown here, and then each entry within it is another tag with the same name as the parent tag, minus the "s" (i.e. singular, rather than plural).

{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
!Tag name
|enter text here
|-
!Tag name
|enter text here
|}


===Art===

These tags are directly related to the rendering of art for the entry.

{| border="1" style="text-align:left" cellpadding="3" cellspacing="0"
|-
! style="background:#efefef;" | Tag Name
! style="background:#efefef;" | Description
|-
!Tag name
|enter text here
|-
!Tag name
|enter text here
|}


==Example==

In the following example of code, please note that there is a specific order of all of the tags.  You ''must'' list the tags in this order for the game to properly interpret your file.

  <insert code example from actual XML file>

{{Civ4_XML_Files}}