Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old December 1, 2016, 18:57   #1
bio_hazard
Knight
 
bio_hazard's Avatar
 
Join Date: Dec 2008
Posts: 563
bio_hazard is on a distinguished road
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.
bio_hazard is offline   Reply With Quote
Old December 1, 2016, 21:49   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 7,888
Derakon is on a distinguished road
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.
Derakon is offline   Reply With Quote
Old December 1, 2016, 22:34   #3
bio_hazard
Knight
 
bio_hazard's Avatar
 
Join Date: Dec 2008
Posts: 563
bio_hazard is on a distinguished road
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 ...)
bio_hazard is offline   Reply With Quote
Old December 2, 2016, 00:03   #4
t4nk
Adept
 
Join Date: May 2016
Posts: 246
t4nk is on a distinguished road
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.
t4nk is offline   Reply With Quote
Old December 2, 2016, 00:26   #5
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,050
Donated: $40
Pete Mack is on a distinguished road
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
Pete Mack is offline   Reply With Quote
Old December 2, 2016, 01:13   #6
bio_hazard
Knight
 
bio_hazard's Avatar
 
Join Date: Dec 2008
Posts: 563
bio_hazard is on a distinguished road
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.
bio_hazard is offline   Reply With Quote
Old December 2, 2016, 01:57   #7
Pete Mack
Prophet
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 4,050
Donated: $40
Pete Mack is on a distinguished road
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.
Pete Mack is offline   Reply With Quote
Old December 2, 2016, 03:59   #8
bio_hazard
Knight
 
bio_hazard's Avatar
 
Join Date: Dec 2008
Posts: 563
bio_hazard is on a distinguished road
Quote:
Originally Posted by Pete Mack View Post
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.
bio_hazard is offline   Reply With Quote
Old December 8, 2016, 14:18   #9
Huqhox
Scout
 
Huqhox's Avatar
 
Join Date: Apr 2016
Age: 47
Posts: 46
Huqhox is on a distinguished road
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"
Huqhox is offline   Reply With Quote
Old December 10, 2016, 22:49   #10
fruviad
Scout
 
Join Date: Jan 2011
Location: central ohio
Posts: 39
fruviad is on a distinguished road
Quote:
Originally Posted by bio_hazard View Post
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.
fruviad is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Competition 154 (planning) fizzix Competition 45 June 9, 2014 11:30
Planning my build ahead Kneller Sil 11 April 18, 2014 14:39
Special Fail Rate for Utility Spells Mark Vanilla 7 January 3, 2014 01:59
Planning for FAangband 1.3 Nick Variants 40 August 7, 2011 21:02
Utility of Rods, Wands Cauldron Vanilla 12 June 23, 2009 17:06


All times are GMT +1. The time now is 21:40.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.