Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adds descriptive names to most guns #4299

Open
wants to merge 44 commits into
base: main
Choose a base branch
from

Conversation

Curt5
Copy link

@Curt5 Curt5 commented Mar 4, 2024

Purpose of change

I personally, and I'm sure many other non-gun nut players, get kinda confused by all the various guns in the game, many of which seem to be named "p22," "cz," "ar15," "ar10," and other almost random jumbles of letters and numbers. If you're not familiar with guns, it's pretty difficult to look at your pile of guns and tell what's what. This change adds an extra word or two to the end of every gun name describing what kind of gun it is.

Describe the solution

Using the existing item descriptions, googling, or consulting with some gun nerd on discord, I've added an extra word or two to the end of every gun name describing what kind of gun it is. Examples include "pistol, pocket pistol, machine pistol and revolver" to describe pistols, "rifle, lever-action rifle, bolt-action rifle, assault rifle, and carbine" to describe various rifles, and similar naming for other weapons.

Describe alternatives you've considered

  • Get a better gun nut than I to make sure every weapon is named completely accurately. I'll be honest, I couldn't tell you the difference between a rifle and a carbine, nor do I care; this is intended to ease search through item piles and access to gun novices like myself. So long as it's broadly accurate it's good enough for me.

  • Do not change anything and also shit my pants.

Testing

Additional context

Checklist

@github-actions github-actions bot added the JSON related to game datas in JSON format. label Mar 4, 2024
@Curt5 Curt5 changed the title fix/chore: adds descriptive names to most guns chore: adds descriptive names to most guns Mar 4, 2024
@scarf005 scarf005 changed the title chore: adds descriptive names to most guns fix: adds descriptive names to most guns Mar 4, 2024
@RoyalFox2140
Copy link
Collaborator

I mentioned it in the Discord but to reiterate my thoughts:

This is not the ideal way to do this. It's going to make names a lot bigger in the UI which will most negatively affect Android users. Ideally we would redo the inventory UI and sorting to have custom filters to sort guns by weapon category or caliber. Note that this would be an incredibly difficult refactor and this isn't a vote for or against renaming guns this way, but if we did refactor the inventory UI these names would ideally get reverted as players would sort their inventory to their own parameters.

@chaosvolt
Copy link
Member

chaosvolt commented Mar 4, 2024

This is indeed probably flawed sadly. It also already gets pretty badly cut off in the wielded weapon UI:
image

@scarf005
Copy link
Member

scarf005 commented Mar 4, 2024

i also think a better way to handle this would be via weapon categories.

@RoyalFox2140
Copy link
Collaborator

Pinging @olanti-p we could likely add this PR to the list of UI problems to address. #3602

@KheirFerrum
Copy link
Collaborator

KheirFerrum commented Mar 5, 2024

The other big issue with this particular change is that updating it is a bit of a pain. I'd suggest that we simply have an optional setting that makes specific weapon categories (definable in JSON) create a prefix/suffix, either as an acronym or a full name, but full name might be very... in the way.

To be clear, I'm against this PR.

@RoyalFox2140
Copy link
Collaborator

Tests are failing because the MP5 no longer exists. The weapon name is checked and not the item ID. Confirmed by Scarf on the Discord.

@KheirFerrum
Copy link
Collaborator

Tests are failing because the MP5 no longer exists. The weapon name is checked and not the item ID. Confirmed by Scarf on the Discord.

Yeah, based on the test it's meant to check that fouling properly appends the ⬜⬜ symbols after the name.

@Lamandus
Copy link
Contributor

Lamandus commented Mar 5, 2024

I am also against the change. I would rather do it via the categories instead. It bloats the name. Also lead to the problem, that multiple guns now are "2 M16 assault rifle" instead of rifles.

@Lamandus
Copy link
Contributor

Lamandus commented Mar 5, 2024

it would also be an idea to make it a mod. So people who have the need to get more descriptive weaponnames get them, while the rest stays "Vanilla"

@olanti-p olanti-p mentioned this pull request Mar 5, 2024
6 tasks
@olanti-p
Copy link
Contributor

olanti-p commented Mar 5, 2024

Pinging @olanti-p we could likely add this PR to the list of UI problems to address. #3602

I've added it as an example. This problem is for the most part a symptom of other issues we have:

  1. Proliferation of items, guns in this case. If there were only a few (1-2) guns per category, or generic "pistol"/"rifle"/"shotgun"/etc., people unfamiliar with gun names wouldn't have this issue, and variety could be an opt-in mod, as is the case with 99% of moddable games out there.
  2. Lack of item icons in UI that could give a hint as to what kind of item the player's dealing with. Adding icons would be painful because UI code is inflexible and curses-oriented, and curses does not support graphical icons.
  3. In graphical mode we are stuck with monospaced fonts, because that's what curses uses, but if we used proper graphical text rendering with TrueType fonts or something similar, we could've fit twice as much text in same amount of screen space. No standardized UI widget code means we can't just say, "show item name", and let the system decide how to show it in the best way (monospaced on curses, TrueType on graphical).

As to the PR, it appears that it would indeed be better to implement it programmatically, as @scarf005 and @KheirFerrum suggest. I've checked a few files, and from what I saw most of the changes were "add pistol suffix to gun that is copied from pistol_base or has Pistols category", or "add smg suffix to gun that is copied from smg_base or has SMGs category" - this is something a computer should do. We already have existing infrastructure for gun classification, we could reuse information from that.

@Curt5
Copy link
Author

Curt5 commented Mar 5, 2024

This is indeed probably flawed sadly. It also already gets pretty badly cut off in the wielded weapon UI: image

This is not really the issue I was hoping to solve; instead, what I'm actually trying to do is make it easier to search through piles (or with the V key) and identify what kinds of guns are what- for ease of figuring out what you want to put in a holster, for instance, or simply to help you figure out what kind of guns you actually have.
image
image

it would also be an idea to make it a mod. So people who have the need to get more descriptive weaponnames get them, while the rest stays "Vanilla"

I think I agree with this after sleeping on it though, and the other general replies. This is a clumsy solution and a symptom of a bigger kind of UI/Player communication issue, and also probably better as a mod- though I have no idea how to set something up as a mod, so if some more experienced coder wants to do that, knock yourself out.

I've added it as an example. This problem is for the most part a symptom of other issues we have:

  1. Proliferation of items, guns in this case. If there were only a few (1-2) guns per category, or generic "pistol"/"rifle"/"shotgun"/etc., people unfamiliar with gun names wouldn't have this issue, and variety could be an opt-in mod, as is the case with 99% of moddable games out there.

However, I disagree here; Cata is filled with items, sure, but I kinda like all the variety and clutter. The issue is only in more clearly communicating the differences between those items to novice players, and I'd hate to see any measures taken to just genric-ify weapons, guns, or anything else. The little details help paint a better picture of what's going on in game in your minds eye, IMO.

Ultimately, I think this is a problem that needs to be solved, but I'm not sure my way here is the way to do it, and I'm not technically competent enough to develop a deeper, more codey/programatic way. I think an ideal solution would be some kind of way to search using existing item tags so you could just search "gun/rifle/single shot" or "gun/pistol/9mm" and see what you got- but again, way out of my league.

@KheirFerrum
Copy link
Collaborator

KheirFerrum commented Mar 5, 2024

This is not really the issue I was hoping to solve; instead, what I'm actually trying to do is make it easier to search through piles (or with the V key) and identify what kinds of guns are what- for ease of figuring out what you want to put in a holster, for instance, or simply to help you figure out what kind of guns you actually have.

It's pointing out an issue with the implementation. This PR produces a tradeoff that isn't particularly desirable in that it makes all the other information communicated by the name (ammo type, ammo count, etc) impossible to read on systems with lower screen sizes (especially prominent in Android builds which honestly are like playing the game through a knight's visor).

That kind of information ends up being far more important, as while you can eventually get used to what names are what gun, you cannot glean from the name what the current ammo/ammo count is.

@Lamandus
Copy link
Contributor

we need a decision here. Close and go the "mod" route? I would prefer that.

Copy link
Contributor

@Lamandus Lamandus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above.

@RoyalFox2140
Copy link
Collaborator

we need a decision here. Close and go the "mod" route? I would prefer that.

As Kheir suggested.

The other big issue with this particular change is that updating it is a bit of a pain. I'd suggest that we simply have an optional setting that makes specific weapon categories (definable in JSON) create a prefix/suffix, either as an acronym or a full name, but full name might be very... in the way.

To be clear, I'm against this PR.

It needs to be done in the UI to not clutter the firearm information such as ammunition, this is much worse on Android users. Also tests are probably still failing because of the MP5 and that was never addressed.

@Firestorm01X2
Copy link
Collaborator

I'd suggest that we simply have an optional setting that makes specific weapon categories

I think it is only usable way to go. It is much simpler than overriding a lot of names.

@KheirFerrum
Copy link
Collaborator

KheirFerrum commented Mar 28, 2024

we need a decision here. Close and go the "mod" route? I would prefer that.

As Kheir suggested.

The other big issue with this particular change is that updating it is a bit of a pain. I'd suggest that we simply have an optional setting that makes specific weapon categories (definable in JSON) create a prefix/suffix, either as an acronym or a full name, but full name might be very... in the way.
To be clear, I'm against this PR.

It needs to be done in the UI to not clutter the firearm information such as ammunition, this is much worse on Android users. Also tests are probably still failing because of the MP5 and that was never addressed.

I'd be willing to work on this after my exams if no one has done it by then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants