replacing all in line with veried numbers1
-
playing a zombie game and they use XML to change alot of their options. (vanilla and modded) i’m trying to remove the spawn chance of a zombie but all the chances are in different numbers… and there’s nearly 600 of them. how do i use the replace function to change all the chances to 0, with each line having a different chance number?
-
@darkfang1989 said in replacing all in line with veried numbers1:
how do i use the replace function to change all the chances to 0, with each line having a different chance number?
You haven’t provided nearly enough information for anybody to help you.
I recommend that you provide a short example (maybe a small XML snippet containing four elements that you want to change) of what your file will initially look like and what it should look like at the end. Read the FAQ on formatting forum posts for guidance.
-
<csv xpath="/entitygroups/entitygroup[@name='sleeperHordeStageGS332']/text()" delim="\n" op="add" > zombieFatHawaiianElite, .24 zombieFemaleFatElite, .24 zombieHazmatElite, .39 zombieLumberjackElite, .39 zombieSoldierElite, .39 zombieLabElite, .58 zombieSpiderElite, .58
this is one of the blocks, all blocks having different numbers. i would like to know if there’s a way to change the “zombieSpiderElite, .58” number in each block despite the number being different in each one.
-
@darkfang1989 said in replacing all in line with veried numbers1:
<csv xpath=“/entitygroups/entitygroup[@name=‘sleeperHordeStageGS332’]/text()” delim=“\n” op=“add” >
zombieFatHawaiianElite, .24
zombieFemaleFatElite, .24
zombieHazmatElite, .39
zombieLumberjackElite, .39
zombieSoldierElite, .39
zombieLabElite, .58
zombieSpiderElite, .58this is one of the blocks, all blocks having different numbers. i would like to know if there’s a way to change the “zombieSpiderElite, .58” number in each block despite the number being different in each one.
You can use regular expression replacement to do that. From the main menu, select Search | Replace…, then enter:
Find what:
(?<=zombieSpiderElite,)\s*[.\d]+
Replace with:.00
(note: there is a space before the period, but you can’t see it here)
Wrap around: checked
Search Mode: Regular expressionand click the Replace All button.