MU Soapbox

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Muxify
    • Mustard

    Batch edit?

    MU Code
    3
    17
    3488
    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.
    • il-volpe
      il-volpe last edited by

      How can one do @edit (all offspring of parent obect)/attribute=string,newstring ?

      "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

      Derp 1 Reply Last reply Reply Quote 0
      • Derp
        Derp Admin @il-volpe last edited by Derp

        @il-volpe

        Are you using mux? You could do an @dol and edit the children() of the thing.

        So something like:

        @dol children(<DBRef of Parent>) = @edit ##/<wild-attr> = <search>,<replace>

        Racism isn't Tinkerbell. It doesn't need you to believe in it for it to exist.

        Bobotron 1 Reply Last reply Reply Quote 1
        • Bobotron
          Bobotron @Derp last edited by

          @Derp
          That should work for penn too.

          1 Reply Last reply Reply Quote 2
          • il-volpe
            il-volpe last edited by

            Yep, it's PennMUSH. Thanks.

            "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

            1 Reply Last reply Reply Quote 1
            • il-volpe
              il-volpe last edited by il-volpe

              What does the ## substitute for in your line?

              edit: Oh, wait, nothing? Just itself?

              "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

              Derp 1 Reply Last reply Reply Quote 0
              • Derp
                Derp Admin @il-volpe last edited by Derp

                @il-volpe

                Yeah. It's the substitution symbol for a list element, which is generated from the children() function.

                Edit to Add: I know nothing about Penn, so I'm trusting Bobo that it works the same. My experience is strictly limited to mux.

                Racism isn't Tinkerbell. It doesn't need you to believe in it for it to exist.

                Bobotron 1 Reply Last reply Reply Quote 0
                • Bobotron
                  Bobotron @Derp last edited by Bobotron

                  @Derp
                  This is one of those instances where it's exactly the same, like about 95% of MUSHcode between Penn and MUX.

                  @il-volpe
                  The ## is the denotation for the list you generated with @dolist..

                  Specifically for penn, you should:

                  @dol [children(DBREF)]=@edit ##/attr=search,replace

                  IE

                  @dol children(Snarfblatt)=@edit ##/desc=Flounder,Scuttle

                  that would edit all the children of the Snarfblatt object's @desc, replacing all instances of Flounder with Scuttle.

                  What are you specifically trying to edit, if i may ask?

                  1 Reply Last reply Reply Quote 1
                  • il-volpe
                    il-volpe last edited by

                    Bugger. It doesn't work, because the parent I've in mind is actually the exit parent, and MUSH doesn't treat it like it does other parents....

                    "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

                    Bobotron 1 Reply Last reply Reply Quote 0
                    • Bobotron
                      Bobotron @il-volpe last edited by

                      @il-volpe
                      What are you trying to do?

                      1 Reply Last reply Reply Quote 0
                      • il-volpe
                        il-volpe last edited by

                        Eliminate a repeated error in exit messages. And know how to do this sort of thing so that later, when I set it up, I can change room descs to reflect seasons.

                        "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

                        1 Reply Last reply Reply Quote 0
                        • Derp
                          Derp Admin last edited by

                          Is this for every exit? If so, you can do:

                          @dol search(type = exit) = @edit ##/attribute = search,replace

                          Racism isn't Tinkerbell. It doesn't need you to believe in it for it to exist.

                          Bobotron 1 Reply Last reply Reply Quote 1
                          • Bobotron
                            Bobotron @Derp last edited by

                            @Derp

                            Is the message on the parent? If so, you just need to fix the parent.

                            If it's on individual exits, you'll need to

                            @dol [lsearch(all,type,exit)]=@edit ##/attr=search,replace

                            Derp 1 Reply Last reply Reply Quote 2
                            • il-volpe
                              il-volpe last edited by

                              Ahh! Thanks. Naw, the message isn't on the parent. It's not on every exit, either, but if I search for it and it's not there, well, it won't replace it, so all good.

                              "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

                              Bobotron 1 Reply Last reply Reply Quote 2
                              • Derp
                                Derp Admin @Bobotron last edited by

                                @Bobotron

                                I'm just gonna defer to Bobo here, because I keep forgetting you're using Penn. 😄

                                Racism isn't Tinkerbell. It doesn't need you to believe in it for it to exist.

                                1 Reply Last reply Reply Quote 1
                                • Bobotron
                                  Bobotron @il-volpe last edited by

                                  @il-volpe
                                  My advice when using parents is to default all the messages to the parent; that way, if you fuck something up, it's a single piece of fix. Now, your messages will all be samey (but honestly, sometimes conformity across the board is fine, it makes things more easy to follow).

                                  1 Reply Last reply Reply Quote 1
                                  • il-volpe
                                    il-volpe last edited by

                                    That's sensible, but in this case I get some mood and RP mileage out of the various messages. With your help, this was an easy fix, and it wasn't a necessary one really. And it's given me another bit o' skill, and that's good to have. Thanks, folks!

                                    "... you'll find the story doesn’t end how you think, and the most important characters aren’t who you expect.” - Penny 40 to Derek, The Magicians S04E07 ‘The Side Effect’

                                    1 Reply Last reply Reply Quote 1
                                    • Derp
                                      Derp Admin last edited by

                                      Glad I could be of somewhat limited assistance. 😄

                                      Racism isn't Tinkerbell. It doesn't need you to believe in it for it to exist.

                                      1 Reply Last reply Reply Quote 0
                                      • 1 / 1
                                      • First post
                                        Last post