Planning an Equipment Utility

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bio_hazard
    Knight
    • Dec 2008
    • 649

    Planning an Equipment Utility

    It was recently said somewhere on these forums that Angband is at its heart a game about inventory slots. To the extent that this involves choosing best equipment among a large set, I think the current (4.0.5 and earlier) Angband UI really makes this a crappy chore (note: I tend to play with randarts). A lot of people on the forums seem to have a phenomenal intuitive grasp of min-maxing equipment in the face of a home and inventory full of junk, but that isn't me.

    As a way to try to teach myself some code, I thought I'd try to make an out of game utility that can help with equipment decisions.

    My basic plan:
    Read in a char dump
    Use regular expressions to figure out attributes of each equipment
    Provide a UI that will allow
    - clear view to compare attributes of different pieces of equipment
    - flagging pieces that are "strictly worse/better" than others for the same slot
    - sorting by resists (wait, what has rNether again?)
    - easy tinkering with kit choices
    - "optimizing"- e.g. max speed or damage given user-selected required resists, or, e.g. most damage with speed set to S=+20.

    My coding skills are pretty limited- mostly a little Matlab and R. My thought was to try to do this in Java, because that might be fairly cross-platform and if I end up with something worth sharing, maybe it could become web-based [I have no idea if this is true].

    I feel like this is a totally ass-backwards way to do this, but don't really know a better way at the moment. I'm on a Mac, and for some reason XCode requires some insane amount of disk space so I'm not sure about working in C or C+ or whatever Angband is actually written in (and not sure how to compile then, etc- yes, I am that much of a novice here). However, the char dump doesn't provide all the information I need, and makes some of the information much harder to get (i.e. regular expressions rather than just reading flags to figure out attributes), so I can see why making this an in-game utility, or at least a utility that accesses game info would be preferred- I just have no idea how to do that.

    When it comes to optimizing, is there a better method than looping through every permutation of equipment, saving a combination that meet all criteria, then replacing that combination if a "better" set comes up?

    Once I get this started I'll put something up on github. No guarantees on when that will be, but figured I'd start the conversation now before I waste a lot of time on a really bad idea.
  • Derakon
    Prophet
    • Dec 2009
    • 9022

    #2
    You might consider working in Python instead of Java. It has less of an infrastructure requirement to get started. In either case I'd also strongly recommend that your first version be entirely console-driven (no graphical user interface, just text and keyboard inputs). Adding a GUI creates a lot of extra work related to handling that GUI.

    The basic concept of "examine items; determine item capabilities; allow user to query items for powers" sounds plausible to me. I'm not sure how useful it will be, but that's a different question.

    As for finding the "optimal" equipment loadout, someone made an Excel sheet awhile back that tried to do that, as I recall. They assigned values to each ability (based on their own personal estimation of how important those values were) and then tried to find the combination of equipment that maximized utility according to those values.

    Comment

    • bio_hazard
      Knight
      • Dec 2008
      • 649

      #3
      Thanks for the feedback. Yes, utility and convenience remain to be seen

      I'll check out python.

      Rather than come up with one universal optimum set, I'd allow the user to prioritize a few attributes.

      1) Among possible combinations with rBase, rPois, rWhatevers

      2) Find subset with >= +20 speed

      3) Then, among subset #2, maximize Con (or Damage, or ...)

      Comment

      • t4nk
        Swordsman
        • May 2016
        • 336

        #4
        Consider Javascript instead, and HTML for UI. That's even more cross platform, has minimum infrastructure requirements, and is web scale
        As for how to choose items, wikipedia describes some algorithms.

        Comment

        • Pete Mack
          Prophet
          • Apr 2007
          • 6883

          #5
          You are making three assumptions that are not fully merited.
          * That 20 base speed is necessary, except at the very end of the game. I often give up speed for CON (especially as a mage, where HP is vastly more important than speed.) Speed 10 is good enough for the vast majority of monsters.
          * That other players always do an optimal job of equipment balancing
          * that an optimal balance even exists.
          It's just as important to adjust your tactics to equipment as vice versa

          Comment

          • bio_hazard
            Knight
            • Dec 2008
            • 649

            #6
            I wasn't clear enough above- the speed threshold would be user-customizable, as would the ranking priority of the different attributes. I definitely want this to be flexible for a range of scenarios. I'd want this to help with "optimal" wrt speed or melee damage, but also help finding out alternative kits for other scenarios. the "Ok, when I need pStun, what's the fastest kit I can have when I prioritize pStun and the other critical resists"

            I don't know whether the optimization is going to end up being productive, but right now I find it really cumbersome to inspect and try out alternative kits when they involve more than a simple swap of one item for another. Having a sandbox that lets you see what everything does all at once seems like it would make this a lot easier.

            Comment

            • Pete Mack
              Prophet
              • Apr 2007
              • 6883

              #7
              Would a grid showing properties of stuff in the pack and at home help? Such a thing exists in some variants, and is somewhat useful.

              Comment

              • bio_hazard
                Knight
                • Dec 2008
                • 649

                #8
                Originally posted by Pete Mack
                Would a grid showing properties of stuff in the pack and at home help? Such a thing exists in some variants, and is somewhat useful.
                It wouldn't hurt! I've made related suggestions about UI improvements. With a grid, would be nice if you could examine other combinations without exiting the screen. So you could scroll down to get to an equipment slot, and then use L/R arrows to toggle other gear for that slot.

                Comment

                • Huqhox
                  Adept
                  • Apr 2016
                  • 145

                  #9
                  I usually end up with a spreadsheet at mid to end game so I can a) compare what I have against what I find b) on return from the dungeon I can see what other options I have for equipment and if I can get rid of anything (yes I play randarts)

                  I have tinkered with the idea of writing a tool to make this easier now and again; so for example you generally run only one light (artifact or lantern of true sight) so you would tick that as being definitely equipped. This would then hide the resists, protections etc that this affords from all the other items. In this way you can make a more sensible choice based on less data

                  Based on this thread maybe I should resurrect that idea. Personally I'd use Java as I've programmed in it for so long it's second nature.
                  "This has not been a recording"

                  Comment

                  • fruviad
                    Apprentice
                    • Jan 2011
                    • 74

                    #10
                    Originally posted by bio_hazard
                    It wouldn't hurt! I've made related suggestions about UI improvements. With a grid, would be nice if you could examine other combinations without exiting the screen. So you could scroll down to get to an equipment slot, and then use L/R arrows to toggle other gear for that slot.
                    I like the L/R arrow idea. That would be very handy.

                    It would also be nice if the items you're standing on could be added to the grid.

                    Comment

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