Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   ToME (http://angband.oook.cz/forum/forumdisplay.php?f=9)
-   -   [ToME2] JSON automatizer files? (http://angband.oook.cz/forum/showthread.php?t=8388)

fph May 14, 2017 14:49

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

Gwarl May 14, 2017 16:18

First hit on google for 'xml to json converter' leads here:
http://www.utilities-online.info/xmltojson/

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

fph May 15, 2017 00:26

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

AnonymousHero May 24, 2017 18:38

Quote:

Originally Posted by fph (Post 120765)
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.

Quote:

Originally Posted by fph (Post 120765)
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".)

fph May 24, 2017 19:04

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

AnonymousHero May 24, 2017 19:17

Quote:

Originally Posted by fph (Post 121132)
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.

Quote:

Originally Posted by fph (Post 121132)
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.)

Quote:

Originally Posted by fph (Post 121132)
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.

fph May 24, 2017 19:23

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


All times are GMT +1. The time now is 10:39.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.