View Issue Details

IDProjectCategoryLast Update
0021656AI War 2GUISep 19, 2019 12:14 pm
ReporterAsteroid Assigned ToBadgerBadger  
Status resolvedResolutionfixed 
Product Version0.889 Reticulating Those Splines 
Fixed in Version0.890 Lighting and Darkness 
Summary0021656: Improvement to diff display for ship upgrades
DescriptionThis is an idea for eventually improving the C-click view for upgrades.

Instead of having two (before + after) large blobs of text the player needs to scan alternatively to find the differences between the current and next level of a ship, you probably want to express the upgrade in terms of how much more you get compared to the previous level. Both blobs can still be there but the second can include +X or +X% after each number, and highlight any new ability text that changed in the description.

Modern ARPGs like Grim Dawn are good references for this kind of "gear comparison" UI.
TagsNo tags attached.

Activities

BadgerBadger

Sep 16, 2019 12:59 pm

manager   ~0053144

Last edited: Sep 16, 2019 1:00 pm

Since you now have SVN access, you're welcome to add this feature ;-)

I think it would be a nice enhancement. The code is in Window_InGameSidebarScience.cs

Asteroid

Sep 16, 2019 1:43 pm

reporter   ~0053145

Thanks for the pointer. Yup, I document ideas on Mantis as I go, but that doesn't exclude me working on them ;) . This one seems like a low-enough hanging fruit.

Chris_McElligottPark

Sep 16, 2019 1:51 pm

administrator   ~0053147

Personally I'd be most in favor of embedding things such that there's not even two blobs of text. Originally that's how I had the code set up, long ago. But that's a royal pain to put back, and a lot of time coding in something I viewed as a nice-to-have. By all means if you'd like to tackle it, I'd welcome that as well.

What I put in was a "it's this or nothing, given the time constraints" type of feature.

Asteroid

Sep 16, 2019 7:55 pm

reporter   ~0053157

If it's "a lot of time" and "a royal pain" it might be more than I can afford to put it right now, but I'll have a look.

@4000Bughunter I perfectly understood why you implemented things the way you did, no worries. That why I wrote "eventually" in my description above.

Asteroid

Sep 17, 2019 7:30 pm

reporter   ~0053166

Wow, you weren't kidding about the PITA. That code is in one giant method with a lot of parameters and conditional branching. All the colors and font sizes for formatting are hardcoded text. I'd have to either add the thing you're comparing to as a parameter and add even more conditional branching, or try and refactor some pieces to be somewhat reusable. A risky proposition given my lack of familiarity with the code.

Not writing it off forever but I'll try to find something with a better effort/result ratio and smaller in scale to start with.

BadgerBadger

Sep 17, 2019 7:56 pm

manager   ~0053167

A 3000 line function might be a record for projects I've been associated with.

Asteroid

Sep 18, 2019 3:23 am

reporter   ~0053170

I took another approach and managed to implement a text diff-based approach which works well, I think you'll like it (SVN revision 6164). The library code I copied for this purpose will likely need to be merged back to a central location - Unity might spit out errors about identical symbols being provided by different assemblies otherwise.

Asteroid

Sep 18, 2019 3:43 am

reporter   ~0053171

* The C-click view for upgrades now display values inline for each unit instead of showing old and then new model.

BadgerBadger

Sep 18, 2019 11:17 am

manager   ~0053172

Asteroid has fixed this; thanks Asteroid!

Chris_McElligottPark

Sep 19, 2019 12:14 pm

administrator   ~0053183

Yeah, a giant function like that isn't exactly my first choice either. But it's one of those things that is so huge and so conditional, and the overlap can be... well, any combination in there... and this is what we wind up with.

The diffing solution was awesome, thanks for doing that! That's a vastly improved visual display on the science tab. I had to go in and make some changes to make it cross-platform compile (some LINQ limitations you wouldn't have had any reason to be aware of), but it's all good now. :)

Issue History

Date Modified Username Field Change
Sep 16, 2019 12:51 pm Asteroid New Issue
Sep 16, 2019 12:59 pm BadgerBadger Note Added: 0053144
Sep 16, 2019 1:00 pm BadgerBadger Note Edited: 0053144
Sep 16, 2019 1:43 pm Asteroid Note Added: 0053145
Sep 16, 2019 1:51 pm Chris_McElligottPark Note Added: 0053147
Sep 16, 2019 7:55 pm Asteroid Note Added: 0053157
Sep 17, 2019 7:30 pm Asteroid Note Added: 0053166
Sep 17, 2019 7:56 pm BadgerBadger Note Added: 0053167
Sep 18, 2019 3:23 am Asteroid Note Added: 0053170
Sep 18, 2019 3:43 am Asteroid Note Added: 0053171
Sep 18, 2019 11:17 am BadgerBadger Assigned To => BadgerBadger
Sep 18, 2019 11:17 am BadgerBadger Status new => resolved
Sep 18, 2019 11:17 am BadgerBadger Resolution open => fixed
Sep 18, 2019 11:17 am BadgerBadger Fixed in Version => 0.890 Lighting and Darkness
Sep 18, 2019 11:17 am BadgerBadger Note Added: 0053172
Sep 19, 2019 12:14 pm Chris_McElligottPark Note Added: 0053183