I have completely revamped this mod. Though the idea is really great there is too much room for errors and incompatibilities. This mod uses the existing status meters for HP, DR and Caps and “refills” them with FOD, H2O and HP. While inserting FOD and H2O is unproblematic, the mod has to calculate the DR and the maximum player HP to display them on tabs that are not the aid tab. This is very risky since there could be perks (e. g. Life Giver) that add to the maximum HP and there could also be other mods that either change the base health or the health multiplier and so on. This makes it quite a hassle to get the correct values. This mod also relies on a hardcoded base health value from version 2.4 of Vicious Wastes which is no longer present in the current version.
It took me a lot of time to get it right, but I think I finally managed to create a version that doesn’t rely on anything else but the primary needs values and does not have to calculate anything in terms of player values. My solution was to add three extra status meters for the primary needs values to the inventory_menu.xml. These meters remain invisible while you’re not in the aid tab. This sounds quite easy but it was a real challenge to get everything right in terms of positioning. I have also decided to show the SLP instead of the weight value but the display can easily be modified if someone prefers to rather show the current weight. I will release my version of the mod in near future after I have fine-tuned it.
Here are screenshot to show it’s working with the lastest version of Vicious Wastes:
The reason I did not edit the XML directly is *because* of compatibility reasons. If VUI+ gets an update and has changes in the edited file, I'd need to push an update each time. Doing it entirely in script was an intentional choice to avoid that. I also didn't add (and don't plan to add) the SLP meter myself because I want it to mimic the NV version as closely as possible. I am finally going to get around to updating it to work with the latest version of VW though, since I now have a computer to do it with.
UPDATE: Well there's a bit of a problem. The formula for calculating max health seems to have changed in 2.5, and I have no easy value to get it from like iTemp, and as far as I can tell, for some silly reason, this game does not provide a way to actually get and store max health. I'll have to dig through all the scripts to figure out the new calculation.
UPDATE 2: Well, I'm apparently dumb. There DOES seem to be a way to get max health. Pushed an update.
Same here. I don’t understand where it’s supposed to get &PlayerHunger; and &PlayerThirst; from.
Edit 1: I’ve found out that the current version (2.5.2) of Vicious Wastes does not support this mod. However, version 2.4 does work with it and shows the correct values. The reason for this is that Thirst, Hunger and Sleep are stored as Globals in 2.4 while 2.5.2 uses Quest Script Variables. This is the responsible code passage:
As we can see the PlayerThirst is the important variable here. Using VWxNeeds.fThirst (where it’s saved in the current version) does’t work since it only prints VWxNeeds.fThirst as a string and not the actual value. I’ll try to find a workaround. Maybe creating these Globals anew inside this mod and setting them to the respective Quest Script Variable will do the trick.
Edit 2: This actually worked like a charm. I can provide my .esp file if someone needs it. Alternatively the mod author can just upload a new version. You just need to replace the code inside the if clause ( iCurrentTab == 2 ) with this one:
set PlayerThirst to VWxNeeds.fThirst set PlayerHunger to VWxNeeds.fHunger
For this I just scooped the correct sizes for the rects out of the VUI+ plugin. I'd have to go and figure out the correct sizes for Darn, which is quite a bit of trial and error. I could do it, but I don't know if it'll happen any time soon.
10 comments
It took me a lot of time to get it right, but I think I finally managed to create a version that doesn’t rely on anything else but the primary needs values and does not have to calculate anything in terms of player values. My solution was to add three extra status meters for the primary needs values to the inventory_menu.xml. These meters remain invisible while you’re not in the aid tab. This sounds quite easy but it was a real challenge to get everything right in terms of positioning. I have also decided to show the SLP instead of the weight value but the display can easily be modified if someone prefers to rather show the current weight. I will release my version of the mod in near future after I have fine-tuned it.
Here are screenshot to show it’s working with the lastest version of Vicious Wastes:
Don’t mind that I´m playing the German version. 😉
UPDATE: Well there's a bit of a problem. The formula for calculating max health seems to have changed in 2.5, and I have no easy value to get it from like iTemp, and as far as I can tell, for some silly reason, this game does not provide a way to actually get and store max health. I'll have to dig through all the scripts to figure out the new calculation.
UPDATE 2: Well, I'm apparently dumb. There DOES seem to be a way to get max health. Pushed an update.
Edit 1: I’ve found out that the current version (2.5.2) of Vicious Wastes does not support this mod. However, version 2.4 does work with it and shows the correct values. The reason for this is that Thirst, Hunger and Sleep are stored as Globals in 2.4 while 2.5.2 uses Quest Script Variables. This is the responsible code passage:
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerDRInfo\CI_TitleText\string" "H2O"
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerDRInfo\CI_ValueText\string" " "
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerDRInfo\CI_ValueText\string" "&PlayerThirst;"
As we can see the PlayerThirst is the important variable here. Using VWxNeeds.fThirst (where it’s saved in the current version) does’t work since it only prints VWxNeeds.fThirst as a string and not the actual value. I’ll try to find a workaround. Maybe creating these Globals anew inside this mod and setting them to the respective Quest Script Variable will do the trick.
Edit 2: This actually worked like a charm. I can provide my .esp file if someone needs it. Alternatively the mod author can just upload a new version. You just need to replace the code inside the if clause ( iCurrentTab == 2 ) with this one:
set PlayerThirst to VWxNeeds.fThirst
set PlayerHunger to VWxNeeds.fHunger
SetUIFloat "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerDRInfo\width" 120
SetUIFloat "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerHPInfo\width" 120
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerHPInfo\CI_TitleText\string" "FOD"
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerHPInfo\CI_ValueText\string" " "
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerHPInfo\CI_ValueText\string" "&PlayerHunger;"
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerDRInfo\CI_TitleText\string" "H2O"
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerDRInfo\CI_ValueText\string" " "
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerDRInfo\CI_ValueText\string" "&PlayerThirst;"
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerCapsInfo\CI_TitleText\string" "&sHitPointsShort;"
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerCapsInfo\CI_ValueText\string" " "
SetUIString "InventoryMenu\GLOW_BRANCH\IM_MainRect\IM_HeadlineRect\IM_Headline_PlayerCapsInfo\CI_ValueText\string" "&PlayerCurrentHP;/&PlayerMaxHP;"
Beforehand you have to create the two Globals PlayerHunger and PlayerThirst, of course. Hope this helps.