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
feat(UI): trim some more iteminfo when not required, show range mod for gunmods #4550
Conversation
I can't really fandom the arrow Info. What is the range of 2 supposed to be? +2 range? |
Yep, it means that ammo adds +2 tiles of range to whatever weapon its paired with. |
Would it be possible to write range bonus? Or +? Is there a difference to range modifier? |
I think you're getting range from guns and ammo confused with the |
Maybe, but what is the difference? Mod: Range modifier of +2 gives 2 more range on the gun. |
Okay so what are you suggesting? That range on ammo be marked as +2 instead of just 2? I assume this isn't done because I don't think ammo even supports having negative range, whereas range modifier is innately designed to allow positive or negative range adjustments. |
Yeah +2 sounds better, else it sounds like it can only go 2 tiles. |
I could be wrong, but something looks wrong with the broadhead arrows from that screenshot. @chaosvolt To my understanding ammo determines base range, the weapon and gunmods determines the bonuses or penalty, 2 range would mean a 2 tile range on the arrows. So on further investigation a longbow has a range bonus of 22, and the aluminum arrows have a range of 2. In a firearm, a Sig 552, there is no range modifier so its based only on the 5.56 range value. Weapons can subtract range, I've used that before, but ammunition can't because it's the base value. So yes. you should not add a +2 to the arrows and the arrows are weird and different, because in ballistics the bullet determines the base velocity and in archery the bow does. Definitely confusing. |
I am meaning to say it doesn't need changing because the ammunition determines base range, weapons and gunmods determine a bonus or penalty. Arrows have no range because the bows have all the range as a bonus modifier, but the display doesn't need to be changed for ammo because its not a modifier, it's the base. |
I mean, is it though? Ammo damage, range, and dispersion bonuses are ALL presented as plain numbers. The plus sign marking is really only needed for gunmods to make it clear that it could be positive OR negative, and for guns themselves because their UI sums the stats of both the gun and its ammo (i.e. the plus sign is being used literally for what it was invented for). I don't really think changing all ammo properties to add a + sign is that important, and even then it's probably something we can set aside as a followup since it's kinda out of scope for this PR. The focus on this PR was streamlining and cutting out redundant item info to declutter the item UI a bit, along with adding one bit of completely hidden info as a related side change. |
Do what you feel like. |
Purpose of change
I'd been meaning to rig it so that a bit more iteminfo stuff gets trimmed when it's not nessecary, and also found out in testing that there was a case of an iteminfo property not displaying at all when it probably should, so that finally gave me motivation to mess with this a bit more.
Describe the solution
item::ammo_info
higher up since they get used a bit earlier than normal. Rigged it so that now, damage and armor values are not displayed for ammo unless they're actually defined. The reason for the values being moved up is to fix a newline issue, where if an ammo has damage and range but not arpen, it'd fail to move range+dispersion to the next line down since normally the needed newline is called for by armor-pierce info. Now damage info either calls for a newline or doesn't depending on whether armor info is present too.item::ammo_info
so that range, dispersion, and recoil info only shows if non-zero.item::gun_info
so that damage multiplier and armor multiplier info is only showed if either the weapon or the ammo has a multiplier actually defined. If both are 1x then it's simply omitted.item::gunmod_info
so that range modifier is shown if present.iteminfo_parts::GUNMOD_RANGE
for the above to use.Describe alternatives you've considered
screm
Testing
Screenshots:
5.45 round:
Aluminum broadhead arrow:
Aluminum field point arrow
Aluminum small game arrow
Thread:
M1911:
Longbow at 8 strength:
Beam scatterer:
Additional context
Checklist