source: XmlTools2/examples/BINACJBOCharacter.oni-patch@ 919

Last change on this file since 919 was 919, checked in by s10k, 11 years ago

added example files

File size: 3.2 KB
RevLine 
[919]1@XML_TOOLS Version "2.0"
2
3#@ADD_INSIDE_NODE ElementName "Particles"
4<xml>
5 <Particle>
6 <Start>0</Start>
7 <End>45</End>
8 <Bone>Head</Bone>
9 <Name>glass_break</Name>
10 </Particle>
11</xml>
12
13@ADD_INSIDE_NODE ElementName "OSD" Files "BINACJBOCharacter-van.xml"
14<xml>
15 <Attack>
16 <Start>0</Start>
17 <End>30</End>
18 <Bones>Pelvis Chest Neck Head LeftShoulder LeftArm LeftWrist LeftFist RightShoulder RightArm RightWrist RightFist</Bones>
19 <Flags>Unblockable</Flags>
20 <Knockback>0</Knockback>
21 <HitPoints>10</HitPoints>
22 <HitType>KnockdownBody</HitType>
23 <HitLength>0</HitLength>
24 <StunLength>0</StunLength>
25 <StaggerLength>0</StaggerLength>
26 <Extents/>
27 </Attack>
28</xml>
29
30#@ADD_INSIDE_NODE ElementName "Attacks"
31<xml>
32 <Attack>
33 <Start>31</Start>
34 <End>44</End>
35 <Bones>Chest Neck LeftShoulder RightShoulder</Bones>
36 <Flags>Unblockable</Flags>
37 <Knockback>0</Knockback>
38 <HitPoints>5</HitPoints>
39 <HitType>HitBody</HitType>
40 <HitLength>40</HitLength>
41 <StunLength>0</StunLength>
42 <StaggerLength>0</StaggerLength>
43 <Extents />
44 </Attack>
45</xml>
46
47#@ADD_INSIDE_NODE ElementName "Animation"
48<xml>
49 <AttackRing>
50 <Length>0</Length>
51 <Length>0</Length>
52 <Length>0</Length>
53 <Length>0</Length>
54 <Length>0</Length>
55 <Length>0</Length>
56 <Length>0</Length>
57 <Length>0</Length>
58 <Length>0</Length>
59 <Length>0</Length>
60 <Length>0</Length>
61 <Length>0</Length>
62 <Length>0</Length>
63 <Length>0</Length>
64 <Length>0</Length>
65 <Length>0</Length>
66 <Length>0</Length>
67 <Length>0</Length>
68 <Length>0</Length>
69 <Length>0</Length>
70 <Length>0</Length>
71 <Length>0</Length>
72 <Length>0</Length>
73 <Length>0</Length>
74 <Length>0</Length>
75 <Length>0</Length>
76 <Length>0</Length>
77 <Length>0</Length>
78 <Length>0</Length>
79 <Length>0</Length>
80 <Length>0</Length>
81 <Length>0</Length>
82 <Length>0</Length>
83 <Length>0</Length>
84 <Length>0</Length>
85 <Length>0</Length>
86 </AttackRing>
87</xml>
88
89#@REMOVE_NODE ElementName "Objects" ParentElementName "Oni" Files "BINACJBOCharacter-van.xml"
90
91#@COMMAND "-?"
92
93#@CUSTOM_CODE Files "BINACJBOCharacter-van.xml"
94<code>
95 var myBuilder = new JSXMLBuilder();
96 myBuilder.load($xmlData);
97
98 var elements = myBuilder.elements;
99
100 for (var i = 0; i < elements.length; i++) {
101 if(elements[i].name=="CHAR" && elements[i].attributeString==" Id=\"11565\""){
102 elements[i].childElement("OSD").childElement("Weapon").text="MyAwesomeOniWeapon";
103 break;
104 }
105 }
106
107 $xmlData=myBuilder.generateXML(); // update the global variable with the new XML
108</code>
Note: See TracBrowser for help on using the repository browser.