[ToME2] JSON automatizer files?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fph
    Veteran
    • Apr 2009
    • 1030

    [ToME2] JSON automatizer files?

    If I understand correctly, the automatizer (autosquelch) files have been moved to a different JSON-based format in the ToME master. Are there any sample files around, or a method to convert the old XML-based ones?

    I don't want to start writing from scratch all the obvious rules like "squelch all potions of sleep and (+0,+0) swords"...
    --
    Dive fast, die young, leave a high-CHA corpse.
  • Gwarl
    Administrator
    • Jan 2017
    • 1025

    #2
    First hit on google for 'xml to json converter' leads here:


    I'm sure there'll be some cleanup to do but looks like the bulk of the work can be done automatically

    Comment

    • fph
      Veteran
      • Apr 2009
      • 1030

      #3
      It looks like the format has changed, it's not as simple as running an online converter:

      Code:
      <rule module="ToME" name="SquelchBad" type="destroy">
      			<name>Potion of Sleep</name>
      </rule>
      Code:
      [
        {
          "action": "destroy",
          "condition": {
            "name": "Potion of Sleep",
            "type": "name"
          },
          "module": "ToME",
          "name": "destroy"
        }
      ]
      And it looks like the new format has ninja documentation...
      Last edited by fph; May 14, 2017, 23:52.
      --
      Dive fast, die young, leave a high-CHA corpse.

      Comment

      • AnonymousHero
        Veteran
        • Jun 2007
        • 1393

        #4
        Originally posted by fph
        If I understand correctly, the automatizer (autosquelch) files have been moved to a different JSON-based format in the ToME master. Are there any sample files around, or a method to convert the old XML-based ones?
        No conversion, sorry.

        Originally posted by fph
        I don't want to start writing from scratch all the obvious rules like "squelch all potions of sleep and (+0,+0) swords"...
        I feel a huge portion of the pain of this is due to the UI for actually destroying items. It's what 3-4 keypresses just to destroy + record squelch?

        Well, there's also quite a big amount of completely junk items or items that you might find interesting in one or two games, but will basically never want/need to look at again. (Some of the Artifact Lore "books" come to mind. Maybe I should just remove some of this stuff... I'm guessing that nobody actually ever reads it.)

        Just curious: Do you use any of the "only when level is higher than 30" or "class is X" stuff?

        I've been planning on moving to a much more squelch-like system which wouldn't actually destroy items, but doing that also really necessitates changing drop rates, which necessitates rebalancing egos/randarts (probably) which... (Aka. "it's complicated".)

        Comment

        • fph
          Veteran
          • Apr 2009
          • 1030

          #5
          It's 3-4 keypresses, but the UI to do it looks quite messy to me, especially when there are many quality options such as for weapons/armor. How do I squelch all "good" boots excluding boots of speed, for instance? Or: if I change my mind, how do I un-squelch all good weapons? How do I squelch scrolls of darkness, including fireproof ones? And so on...

          And if someone isn't familiar with the whole type/subtype definition, that's another tricky part to figure out.

          I don't use level/class conditions at the moment, but it looks like a useful construct for a "global" .atm file to use on multiple characters (which doesn't exist now).
          --
          Dive fast, die young, leave a high-CHA corpse.

          Comment

          • AnonymousHero
            Veteran
            • Jun 2007
            • 1393

            #6
            Originally posted by fph
            It's 3-4 keypresses, but the UI to do it looks quite messy to me, especially when there are many quality options such as for weapons/armor. How do I squelch all "good" boots excluding boots of speed, for instance? Do you mean
            Or: if I change my mind, how do I un-squelch all good weapons? How do I squelch scrolls of darkness, including fireproof ones? And so on...
            Well, presumably boots of speed would be classified as "Excellent" (or whatever the classification is). Unsquelching would be similar to current Vanilla.

            By UI, I really just mean the "press k.... then $.... then RETURN[1] then T or F".... and remember to then go into the automatizer and press "s" if you actually want your changes saved. It's utterly ludicrous compared to the Vanilla Angband system were it's "press k" (and perhaps "y" to confirm?) and everything gets saved along with your character automatically.

            Originally posted by fph
            And if someone isn't familiar with the whole type/subtype definition, that's another tricky part to figure out.
            That bit really should go. If the squelch ("press k") is as quick to do as in vanilla, I could happily live with only being able to squelching on specific TVAL/SVAL combos. (There's very little logic to the TVALs, usually.)

            Originally posted by fph
            I don't use level/class conditions at the moment, but it looks like a useful construct for a "global" .atm file to use on multiple characters (which doesn't exist now).
            It would techinically be useful, but I've never ever bothered using it -- it was way too much work to set up -- and AFAICT very few people ever did. (So, basically, looks like a <1% feature which isn't worth mucking up the common case with.)

            I could see something like the poscheng/heng/entro system working a little better, but that's also pretty arcane IMO.

            FWIW, I think the current interface is awful.

            [1] Because the instructions are so long that you'll get a "-more-" prompt. I was I were kidding.

            Comment

            • fph
              Veteran
              • Apr 2009
              • 1030

              #7
              I agree completely with you -- UI is the main problem, and V's solution is one of the best ones I have seen.

              (In the meantime, I have kind-of converted to JSON a sample automat.atm file I have found on the internet, and I can put it online for the competition if people wish.)
              --
              Dive fast, die young, leave a high-CHA corpse.

              Comment

              Working...
              😀
              😂
              🥰
              😘
              🤢
              😎
              😞
              😡
              👍
              👎