Format for new XML pages: Difference between revisions

From Civilization Modding Wiki
Jump to navigationJump to search
No edit summary
No edit summary
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 is used for <<INSERT PURPOSE HERE>>.
|[[(name of previous page)|Previous article]]
 
|}
All tags must be opened and closed; the first is the 'open', the second the 'closed' 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>
<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.




Line 24: Line 17:
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 41: Line 34:
These tags ''must'' be included when writing new entries, or the game will crash or otherwise malfunction.
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 56: Line 49:
===Text===
===Text===


{| 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 71: Line 64:
===Integers===
===Integers===


All of these tags have numerical value.  Sometimes, it can be negative, usually not.
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 90: Line 83:
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 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 105: Line 98:
===Lists (Multi-line)===
===Lists (Multi-line)===


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".
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 124: Line 117:
These tags are directly related to the rendering of art for the entry.
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 138: Line 131:


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

Revision as of 21:34, 13 May 2009

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 is used for <<INSERT PURPOSE HERE>>.

All tags must be opened and closed; the first is the 'open', the second the 'closed' 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
|}


===Prerequisites===

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

{| 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==
  <insert code example from actual XML file>