Opened 12 years ago

Last modified 11 years ago

#43 closed enhancement

xmlTools feature request: conditions-based replace command — at Initial Version

Reported by: Paradox-01 Owned by: s10k
Priority: major Component: XmlTools
Keywords: Cc:

Description

Sometimes the replace command is not precise enough.

We had two incidents where it would be useful to have a more powerful version of that command.

1) Incoming from the wiki. (Changing content in object collection(s).)
2) And ticket:41. (Changing content in ONGS.)

There are probably many more situations you can think of, like in particle where you can have multiple emitter, etc.

@ReplaceValueInSection Section "name" ParentTag "name" Tag "tame" ConditionParentTag "name" ConditionTag "name" ConditionValue "name/value"

Note 1: Section is here just another word for GrantparentTag.
Note 2: Maybe the ConditionValue should also allow for a "*" to replace any old content.


Using the examples again, that's how I image the solution for ...

Example 1

@ReplaceValueInSection Section "CHAR" ParentTag "Scripts" Tag "Spawn" ConditionParentTag "OSD" ConditionTag "Flags" ConditionValue "IsPlayer"

<xml>
  <Spawn>load_prone_mode_logic</Spawn>
</xml>

Example 2

@ReplaceValueInSection Section "AutoPrompts" ParentTag "ONGSAutoPrompt" Tag "SubtitleName" ConditionParentTag "ONGSAutoPrompt" ConditionTag "SubtitleName" ConditionValue "2"

<xml>
   <LastAutopromptLevel>19</LastAutopromptLevel>
</xml>

Is that feature desirable and possible to create?

Change History (0)

Note: See TracTickets for help on using tickets.