matzman666 / PyPipboyApp

A platform independent and extensible unofficial Fallout 4 Pipboy Companion App
GNU General Public License v3.0
83 stars 20 forks source link

Player Statistics Widget / Perks and Quests Update #14

Closed killeand closed 8 years ago

killeand commented 8 years ago

Whelp, next on the list was the statistics widget. I wanted to get fancy and make the Damage/Resists sections using graphics (because the pipboy just shows image and numbers). And I also wanted the graphics to change color with the in game pipboy. Once I got all of that figured out, I updated the Perks widget to also use SVG so I can change its color.

Aside from that, I just cleaned up a couple comments.

In the future (possibly near, or if the boss man _cough_youcough demands it), I plan to add the quick Stimpack and Rad Away buttons to the Limbs section.

matzman666 commented 8 years ago

I am going to a party today (and tomorrow I will probably need to sleep a lot), I will have a look at it the next days. There are two things I have to say:

1) I suppose the star icons are Bethesda's property. I cannot release them under the GPL because they are not mine. I have a separate repository for them (https://github.com/matzman666/PyPipboyApp-nonfree). Let them in for now, I will move them there myself.

2) Did you had a look at https://github.com/matzman666/PyPipboyApp/commit/1d16edbba36be51b970a2f8ee3b1699c362fd07e? My fixes are very quick and dirty and may need to be properly redone.

Otherwise keep up the good work.

killeand commented 8 years ago

I probably should have mentioned it in my commit messages: the images I have included (the stars and status icons) I created in photoshop using the shape tool, and then I converted them in to svg using illustrator. And as their author, I give you and the world full use of their glorious magnificence! I could probably do a lot better job on them, but to be honest they are kind of secondary to getting features done.

As for update 1d16edb, that one was actually a good find that I didn't think of. I have included testing during the main menu a priority for anything I write now.

matzman666 commented 8 years ago

Wouldn't it be better to separate the player statistics widget into three windows (like the map widget)? So that you can e.g. see limp damage and S.P.E.C.I.A.L. at the same time. I think someone already requested stimpack and rad-x buttons on the nexus a while ago. So as the big boss i demand them ASAP or fear my wrath :wink:

akamal commented 8 years ago

Great widget killeand! Three seperate windows does sound like an improvement to me though. On the subject of stimpak and rad-x buttons, I'm working on a widget to display available drugs that will allow click-to-use. And completely unrelated, matz, do you want me to update the launcher\app icons to match the pipboy image you used for the banner on the nexus page?

killeand commented 8 years ago

Aye aye, Capt'n! Sounds good, I will split the 3 up.

Akamal, how far away are you from completion? Your's definitely sounds like a better version of what I had in mind (two buttons hooked straight in to the use stim and rad rpc).

Or should we maybe have both just in case someone wants a minimal use interface?

akamal commented 8 years ago

Should have it done tomorrow sometime - feel free to add them to yours anyway, more options are always good!

I think I've noticed a problem with your playerstats widget though: When it exists (even if not displayed), pypipboy will periodically hang for several seconds at a time. Using the default theme you can see the scrolling gradient on the WT and LVL bars (in the Player Info widget) stop. This most clearly noticed when using hotkeys defined in the hotkeywidget as they may not take affect until several seconds after the key press.

The problem seem especially bad after taking a stimpak via hotkey (either defined in the widget, or the in game favourites system). I'm not certain, but think this is being caused by frequency of calls to your UpdateUI method, when something is actively changing the player's stats (such the healing effect of a stimpak). Are either you or matz seeing the same thing?

killeand commented 8 years ago

I'm not personally seeing any slow downs (but it doesn't mean it isn't). At the moment whenever data is updated (4 levels deep in player info which I suppose could be a problem in its own right, 2 levels deep in the stats, and 2 levels deep in the special tab), I call that update, which then updates the info for each section. Its possibly just too much for this app while running in unison with the game.

That, however, should be solved when I split everything up. I will also dial back the stats calls by targeting the Resists and Damage nodes specifically.

I'd say, keep it in mind after my next commit and let me know. If its still wreaking havoc I will see about trying to optimize my widgets before I do anything else. Lets just say Python and Qt are secondary languages to me, so I'm still getting used to working with them.

matzman666 commented 8 years ago

I also haven't noticed any slowdowns, but I had it running on a second, rather powerful PC and only tested it for a short time.

@akamal: The banner was made by Monsto, who already offered to make an icon out of it. To which I replied that we already have an icon. So yeah, we can make an icon out of it, but maybe we should contact Monsto so that he doesn't feel left out.

akamal commented 8 years ago

Interesting that I'm the only one seeing the problem. I've narrowed down the reproduction notes:

I've pinned down the cause of the problem and it's definitely the frequency of the UpdateUI calls. I think it's due to the number of UI elements being updated each time, and possibly not having finished updating before the next call is made if stats are changing quickly (ie: when healing). Debug output is still getting written to the console showing messages being dispatched and received, so it appears to be just the UI thread that is backed up. Changing the depth of data update calls made no difference which seem to confirm that.

I've throttled calls to UpdateUI to no more than one per second, and that seems to have resolved the issue. Killeand, as you're reworking things anyway, I'll hold off committing that change.

@matzman666: Yes, if Monsto made the banner definitely see if he wants to make an icon, his artwork is a lot better than the simple icon I made! Or even if he just wants to supply the original bitmap for me to make into an icon.