CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.63k stars 4.17k forks source link

Item names sailing off into the sunset, never to be seen again. [$5] #6893

Closed EkarusRyndren closed 9 years ago

EkarusRyndren commented 10 years ago

Names on items keep getting longer and longer and longer, at first it wasn't a problem, but playing on a widescreen monitor I went to check the charge on an "reinforced thermo electric balava" that fit. It reads "reinforced thermal electric balaclava (fits) (r" which wouldn't be so much a problem if it weren't for the fact that I don't have the vaguest idea what the charge is.

Can I suggest we use the item screen and have it display item condition, battery, and other information there rather than try to cram all of it into the name? Or at least mirror it there so it's visible when the names are a mile long?

Did you help close this issue? Go claim the $5 bounty on Bountysource.

i2amroy commented 10 years ago

I'll definitely agree that names are getting too long. Something that might help would be to move to a symbol based system for modifiers similar to the way Dwarf Fortress handles it (though we should still display the information in the detailed description). That would allow us to have things like this:

nailbat - normal
nailbat (x) - scratched
nailbat (X) - chipped
nailbat (Xx) - cracked
nailbat (XX) - splintered
nailbat (+) - reinforced
cloak (F) - fits
flashlight (!) - turned on

and would allow you to have thermal electric socks (!)(F)(XX)(30) as compared to thoroughly damaged thermal electric socks (on)(fits)(30)

Zireael07 commented 10 years ago

Symbols sound like a good solution.

And thanks for giving me a good laugh with the issue title.

OzoneH3 commented 10 years ago

How about instead of (Xx) use the healthbar style:

nailbat (:) - scratched nailbat () - chipped nailbat (|) - cracked nailbat (|) - splintered nailbat (||) - reinforced

Could be colorcoded as well.

EkarusRyndren commented 10 years ago

@OzoneH3 I thought about suggesting color-coded things as well, but besides being painful to look at (A rainbow of neon colored text on a black backdrop can be hard on the eyes.) But besides that, it'd cause issues with people who can't see certain colors.

EkarusRyndren commented 10 years ago

Pushed the wrong damn button, sorry.

OzoneH3 commented 10 years ago

My thought with colorcodes was to stick with the healthbar colors, green and red, nothing super fancy ;)

i2amroy commented 10 years ago

A colored health bat might work (course I've always found it funny that we use red/green as our good/bad colors, considering that red-green colorblindness is the most common form of inability to see color out there :P).

I'd probably use something else for reinforced though, since it doesn't really make too much sense in my mind to go nailbat (||) -> nailbat -> nailbat (|\)

KA101 commented 10 years ago

considering that red-green colorblindness is the most common form of inability to see color out there

Yeah, there's that. Would giving the health meters a contrasting background be useful?

For reinforcement, using the health coding from clothing (as seen on the layering menu) means that gear in OK shape is "light green", so wold be |. You need to reinforce things to make 'em dark green/ "full health".

BevapDin commented 10 years ago

The problem with coloring item names is that many places in the code don't handle this. Often only item::tname is called which returns " " and the coloring occurs later, if ever. Some parts (pickup menu) have their own coloring.

Also this conflicts with the inventory color (yellow for active/books with unknown recipes, blue for books with skill gain, green for gun/ammo, ...).

i2amroy commented 10 years ago

Also this conflicts with the inventory color (yellow for active/books with unknown recipes, blue for books with skill gain, green for gun/ammo, ...).

Definite point there. Might be better to just stick to symbols then instead of colors.

QuantumTangler commented 10 years ago

How easy would it be to do this? Is it just the matter of changing a few strings? I would like to see an option set up to change the way the item names are displayed, ideally all the way down to the user being able to control what information is displayed (e.g. condition, charge, activation status), how the information is represented (e.g. symbols versus health bar versus words), and in what order it is shown (e.g. name-condition-charge, charge-name-condition), but if too many things need to be changed, then that may not be practical at this point.

Zireael07 commented 10 years ago

That's a good idea, @QuantumTangler.

kevingranade commented 10 years ago

As long as it's the same substrings being printed, and we're just varying the format, it would be pretty simple to add alternatives. We use c-style printf format strings for basically everything, so as long as they have the same substitutions you can swap them out. Trivial example: "%1$c - %2$s (x%$3d)" -> "a - knife (x5)" "%1$c. %$3d %2$s " -> "a. 5 knife" Just one option could swap the style for many similar menus.

QuantumTangler commented 10 years ago

Good to know. I've not yet gotten the time to dig into the code base in more than a cursory sense, so I've no idea how (most) of the stuff works. That it's implemented in this way gives me another idea - could the pre-substitution string perhaps be exposed to the user via the options menu, under a "custom" option? That'd be quite nice, with several presets, such as "DF-like" and "Cataclysm" for those who wouldn't want to mess with it. ...I really need to get around to looking through that code at some point. I feel like a kid in a candy shop who can't quite reach the jars.

kevingranade commented 10 years ago

I'm a bit worried about letting the player enter the format string, it's rather arcane, and errors in it can crash the game.

QuantumTangler commented 10 years ago

Crashing would be a bit of a problem, I suppose. Perhaps instead of exposing it directly, have the user input a string that is then translated (e.g. "%hotkey - %num %name" becomes "%1$c - %$3d %2$s")? That'd be simultaneously easier for the user to understand and not as directly connected to the underlying code.

Rivet-the-Zombie commented 10 years ago

Why not just give them a couple preset string formats to choose from?

QuantumTangler commented 10 years ago

Nothing wrong with that, of course - it's just that added flexibility and customization for the user is always nice, especially when it comes to the interface.

Lucasargh commented 10 years ago

I'm pretty new to coding in general, so not sure how easy/doable this would be, however I feel like this could be done as a menu of sorts. I'm thinking along the lines of a screen in Options where the user would be presented with four (simplest scenario) configurable options (By default, these options are: hotkey, '-', item, and number I believe). While over one of the options, they can use up/down to switch options. Hotkey could be turned into Item or Number or a character, '-' could be turned into hotkey or item or number or another character, etc.

Again, pretty new to coding, not sure how possible/difficult that would be. It just seems like the smoothest option to me for the end user.

KA101 commented 9 years ago

Someone might want to tell Narc about this. I'm thinking eligible.

narc0tiq commented 9 years ago

Wasn't my change, and I'm on mobile so I can't look it up easily. The item health bars are definitely eligible, though.

KA101 commented 9 years ago

Thought those were yours. >_<

Update: yeah, OzoneH3's. Let's get xem paid.

OzoneH3 commented 9 years ago

There's a bount on this Oo.

Can you just move the 5$ to another ticket like the first Z-Level or something?

kevingranade commented 9 years ago

I believe the person who claims it can do that if they want, the only way to reassign bounties is to wait for them to expire, and this isn't a cleverraven bounty, so we can't do that.

drbig commented 9 years ago

Can this be closed or is the bounty business blocking?