Talk:XmlTools

From OniGalore
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

ideas

section- and condition-based replacements

A character collection has many characters...

But what if I only want to replace a value from the player character?


Example:

      <CHAR Id="3860">
          <Header>
              <Flags></Flags>
              <Position>-543.22 159 -630.0954</Position>
              <Rotation>0 180 0</Rotation>
          </Header>
          <OSD>
              <Flags>IsPlayer NotInitiallyPresent</Flags>
              <Class>konoko_generic</Class>
              <Name>konoko</Name>
              <Weapon>w1_tap</Weapon>
              <Scripts>
                  <Spawn></Spawn>
                  <Die>you_lose</Die>
                  <Combat></Combat>
                  <Alarm></Alarm>
                  <Hurt></Hurt>
                  <Defeated></Defeated>
                  <OutOfAmmo></OutOfAmmo>
                  <NoPath></NoPath>
              </Scripts>
              <AdditionalHealth>0</AdditionalHealth>
             [...]
      </CHAR>
@ReplaceValueInSection Section "CHAR" ParentTag "Scripts" Tag "Spawn" ConditionParentTag "OSD" ConditionTag "Flags" ConditionValue "IsPlayer"
<xml>
   <Spawn>load_prone_mode_logic</Spawn>
</xml>

Would this be a correct syntax (or whatever coder call this) ? --paradox-01 (talk) 12:36, 24 April 2013 (CEST)

Feature requests, like bug reports, are also better placed on bugs.oni2.net ^_^ It's a better system for tracking and discussing ideas, and Script will get emails for new requests that are filed. --Iritscen (talk) 13:59, 24 April 2013 (CEST)
What are the ticket's settings to make sure Script gets an e-mail?? --paradox-01 (talk) 15:06, 24 April 2013 (CEST)
Sorry, I missed your question above until now. The setting is in the Admin. back-end, hopefully I've set it properly. Any new ticket made for Vago will automatically light up his inbox, you don't have to assign the ticket or anything. --Iritscen (talk) 23:07, 24 April 2013 (CEST)
All these conditions are possible using XPath and in last case JavaScript in the new XmlTools2 (should be released soon).Script 10k (talk) 23:36, 2 February 2014 (CET)