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

Auto Doc Widget #25

Closed killeand closed 8 years ago

killeand commented 8 years ago

I thought that since the app was mostly feature complete, I would have a go at making something a little more original. So I present you with code for the first "cheat" widget. Its job is to handle the health and well being of the player.

It will apply Stim's when health drops below a certain amount. It will apply Med-X when damaged, when you take a Stim, when your health hits 3/4, 1/2, or 1/4. It will apply RadAway when radiation has been detected, or when your Stimpak fails to heal you (no detecting radiation damage yet). And lastly it will apply Rad-X when radiation has been detected, or when you take a RadAway.

I still need to work on saving the settings. Feedback also totally being looked forward to as there are only so many test cases and settings that I can think of. Also, Akamal, I look forward to hearing if this causes any problems for you while it is working. In order to stay on top of the health game, I need to make more than a few calls to the data.

matzman666 commented 8 years ago

It's working well on my system. No noticeable performance degradation and the widgets reacts immediately when stimpack/rad-x is needed. Radiation detection is a bit wonky, but that's not the widget's fault.

Some minor tweaking is still needed though. In one test case I had heavy radiation poisoning but no RadAway. Stimpacks were constantly applied to no avail. I would suggest to not apply any more stimpacks when the health value does not change and no RadWay is available.

Also I would suggest using QSpinBoxes for the stock limitation input fields.

killeand commented 8 years ago

Ah yes, that wouldn't be good. I can probably freeze Stimpak injections until I detect the negative Rads effect being applied.

I don't know about you, but I really hope the F4SE team will get to the RPC stuff. Because we sorely need to detect radiation damage.

QSpinBoxes, check. Next version will be a little more sophisticated. I have moved the settings to a QDialog, and the watcher will now be a QGraphicsView. I also plan to add addiction checks. Because that seems medical in a way.

akamal commented 8 years ago

I've had a very quick look and, the minor issues matz mentions aside, it seems to be working fine, no slow downs or hangs at all, good job!