489
edits
Script 10k (talk | contribs) |
Script 10k (talk | contribs) |
||
Line 268: | Line 268: | ||
<tt>Usage: XmlTools --update-elements --diff-old-new-val "differences old-new values"</tt> | <tt>Usage: XmlTools --update-elements --diff-old-new-val "differences old-new values"</tt> | ||
===Example=== | ===Examples=== | ||
====Example 1==== | |||
Let's say you have a Level built on Google Sketchup. Inside the level you have positioned all the characters that are spawn during the gameplay. However for some reason you need to change the position of the level and the character accordingly. You can move the level inside the level editor, while the positions of the character can be updated using XmlTools. | |||
You know the difference between the old level position and the new level position is 130 in X, 80 in Y and 0 in Z. | |||
'''XmlTools command:''' | |||
<pre>XmlTools --update-elements --diff-old-new-val "130 80 0" --element-name "Position" --parent-element-name "Header" --files "BINACJBOCharacter.xml"</pre> | |||
{| style="margin: 1em auto 1em auto;" <!-- Centers table --> | |||
! style="width: 50%;" | XML Original | |||
! style="width: 50%;" | XML After Command | |||
|- | |||
| | |||
<Oni> | |||
<Objects> | |||
<CHAR Id="3873"> | |||
<Header> | |||
... | |||
<Position><span style="color:blue">227.145248 756 -403.65567</span></Position> | |||
... | |||
</Header> | |||
... | |||
</CHAR> | |||
<CHAR Id="3922"> | |||
<Header> | |||
... | |||
<Position><span style="color:blue">501.63855 756 223.189484</span></Position> | |||
... | |||
</Header> | |||
... | |||
</CHAR> | |||
<CHAR Id="3926"> | |||
<Header> | |||
... | |||
<Position><span style="color:blue">-37.3426628 756 -491.6369</span></Position> | |||
... | |||
</Header> | |||
... | |||
</CHAR> | |||
... | |||
... | |||
</Objects> | |||
</Oni> | |||
| | |||
<Oni> | |||
<Objects> | |||
<CHAR Id="3873"> | |||
<Header> | |||
... | |||
<Position><span style="color:red">97.145248 676 -403.65567</span></Position> | |||
... | |||
</Header> | |||
... | |||
</CHAR> | |||
<CHAR Id="3922"> | |||
<Header> | |||
... | |||
<Position><span style="color:red">371.63855 676 223.189484</span></Position> | |||
... | |||
</Header> | |||
... | |||
</CHAR> | |||
<CHAR Id="3926"> | |||
<Header> | |||
... | |||
<Position><span style="color:red">-167.342663 676 -491.6369</span></Position> | |||
... | |||
</Header> | |||
... | |||
</CHAR> | |||
... | |||
... | |||
</Objects> | |||
</Oni> | |||
|} | |||
====Example 2==== | |||
Let's say you want to use tanker forward throw to a new character. You know that your new character has higher pelvis than the tanker, so you need to update all the heights of tanker animation to match those of your new character. | Let's say you want to use tanker forward throw to a new character. You know that your new character has higher pelvis than the tanker, so you need to update all the heights of tanker animation to match those of your new character. |
edits