Opened 12 years ago
Last modified 11 years ago
#43 closed enhancement
xmlTools feature request: conditions-based replace command — at Version 2
Reported by: | Paradox-01 | Owned by: | s10k |
---|---|---|---|
Priority: | major | Component: | XmlTools |
Keywords: | Cc: |
Description (last modified by )
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 GrandparentTag.
Note 2: Maybe the ConditionValue should also allow for a "*" to replace any old content.
Using the examples again, that's how I imagine 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 "LastAutopromptLevel" ConditionParentTag "ONGSAutoPrompt" ConditionTag "SubtitleName" ConditionValue "autoprompt_weapon" <xml> <LastAutopromptLevel>19</LastAutopromptLevel> </xml> Is that feature desirable and possible to create?
Change History (2)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Description: | modified (diff) |
---|
You have to click on the Modify Ticket section to expand it in order to edit the original ticket. I've carried over your change.
In Example 2 I made mistakes.
I wanted to write:
(Tickets can't be edited??)