XmlRulesTool version 1.0 : first release
You can download the first version of XmlRulesTool at this url :
http://www.aftermoon.net/files/xmlrulestool1.0.zip
XmlRulesTool Version 1.0 - copyright 2003 Pat Aftermoon
Licenced under the term of the GNU GPL licence (see http://www.gnu.org)
Extract entities from a Quake2 map file
The XmlRules file can be used with COOP or DIE version 0.3a
Only entities with an "xmlrules" field are stored, even if this field is empty.
usage : XMLRULESTOOL map_filename [output_filename]
piece of a map file :
Code:
{
"xmlrules" "1"
"origin" "-2152 1504 -24"
"classname" "monster_parasite"
}
xml content generated :
Code:
<entity> { "classname" "monster_parasite" "origin" "-2152 1504 -24" } </entity>
Triggers are also managed :
Code:
{
"message" "simple trigger with a message"
"xmlrules" "1"
"classname" "trigger_once"
// brush 0
{
( -1928 1832 -48 ) ( -2000 1832 -48 ) ( -2000 1768 -48 ) unnamed 0 0 0 1 1 0 0 0
( -2000 1768 8 ) ( -2000 1832 8 ) ( -1928 1832 8 ) unnamed 0 0 0 1 1 0 0 0
( -2000 1768 8 ) ( -1928 1768 8 ) ( -1928 1768 -48 ) unnamed 0 0 0 1 1 0 0 0
( -1928 1768 8 ) ( -1928 1832 8 ) ( -1928 1832 -48 ) unnamed 0 0 0 1 1 0 0 0
( -1928 1832 8 ) ( -2000 1832 8 ) ( -2000 1832 -48 ) unnamed 0 0 0 1 1 0 0 0
( -2000 1832 8 ) ( -2000 1768 8 ) ( -2000 1768 -48 ) unnamed 0 0 0 1 1 0 0 0
}
}
become
Code:
<entity> { "classname" "trigger_once" "message" "simple trigger with a message" "mins" "-2000 1768 -48" "maxs" "-1928 1832 8" } </entity>
I have only tested it with qeradiant, so feel free to post here any comments or bug report (becareful about field name, it's case sensitive, all need to be lowercase)