Community
    • Login

    replacing all in line with veried numbers1

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 205 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • darkfang1989D
      darkfang1989
      last edited by

      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?

      Mark OlsonM 1 Reply Last reply Reply Quote 0
      • Mark OlsonM
        Mark Olson @darkfang1989
        last edited by

        @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.

        darkfang1989D 1 Reply Last reply Reply Quote 1
        • darkfang1989D
          darkfang1989 @Mark Olson
          last edited by darkfang1989

          @Mark-Olson

          <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.

          CoisesC 1 Reply Last reply Reply Quote 0
          • CoisesC
            Coises @darkfang1989
            last edited by

            @darkfang1989 said in replacing all in line with veried numbers1:

            @Mark-Olson

            <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.

            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 expression

            and click the Replace All button.

            1 Reply Last reply Reply Quote 3
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors