RoyBatterian Posted November 30, 2014 Share Posted November 30, 2014 I seem to be having a bug when using player.GetAV DamageThreshold in a script, it is returning a value different than what shows in the Pip-Boy. Is this a known bug, and if so is there a way I can calculate it manually? Link to comment Share on other sites More sharing options...
salomaogh Posted November 30, 2014 Share Posted November 30, 2014 (edited) this might be happening because there is a difference between the GetAv ,GetBaseAv and GetPermanentActorValue (i don't quite remember, but there is something to do with the perks that the player has). See this section of the documentation (http://geck.bethsoft.com/index.php?title=GetBaseActorValue) and the "See Also" section. I've never received any help with my questions here, but i managed to resolve them after months of search through the mods (and this annoyed me). I hope i helped you :smile: . Sometimes, knowing the mods in Nexus helps you find the answer (someone must have implemented something similar). Sometimes don't, because most modders don't comment their scripting (i do). Edited November 30, 2014 by salomaogh Link to comment Share on other sites More sharing options...
rickerhk Posted December 1, 2014 Share Posted December 1, 2014 That's not good. GetAV should return the current value that includes all the modifications.You can do a getavinfo at the console to see if there is anything strange. http://geck.bethsoft.com/index.php?title=GetActorValueInfoIf a ForceAV was ever used on a stat it will be screwed up forever but I don't think it would show different from the console in the pipboy.I would trust the script over the pipboy if it comes to that. Link to comment Share on other sites More sharing options...
RoyBatterian Posted December 1, 2014 Author Share Posted December 1, 2014 salomaogh: Already scoured the GECK wiki and asked a few other modders if they knew what was up, thanks for the suggestion though. :) rickerhk: Yeah I used GetActorValueInfo already to try to figure out what was up with that, just one perk giving 5 bonus, armor with DT 30 and helmet with DT 8 which gives 43. That is what GetAV is returning for me, but the Pip-Boy says 52 which is rather odd, where is that other 9 coming from I wonder. I'm trying to investigate what the issue could be and where it is coming from. ForceAV would indeed be bad, if it's a perk in TTW or Fixes then I need to find it and fix it asap. If you have any other ideas, I'll be glad to hear them. Link to comment Share on other sites More sharing options...
llamaRCA Posted December 1, 2014 Share Posted December 1, 2014 @RoyBatterian - Is the value in the Pipboy never accurate per GetAV or is it not keeping pace with the player changing their gear (it is telling you the DT from the last outfit worn)? I ask because I've seen this disparity in Willow when I remove/add new gear in her container with different DT via script. The DT in the Pipboy continues to report the DT from the last outfit rather than giving the correct DT number for the new one. Exiting/reentering the game will force the Pipboy to correctly report the DT of what is being worn at the moment. GetAV in my case returns the correct DT while the Pipboy is reporting the wrong number. Link to comment Share on other sites More sharing options...
RoyBatterian Posted December 2, 2014 Author Share Posted December 2, 2014 @llamaRCA: I'm still investigating this, I seem to have picked up some phantom DT from a perk somewhere I think. It might be the perk that gives you extra DT from companions and if so, it's buggy. It's definitely not the last set of armor I wore because that had less DT and it's been aloooooong time and I've changed armor many times between then and now over months of testing. It's very strange and I want to get to the bottom of it, so my DarN plugin update is working 100% properly. Link to comment Share on other sites More sharing options...
rickerhk Posted December 2, 2014 Share Posted December 2, 2014 Maybe some script effect giving you the DT when in the pipboy menumode but not in the console menumode or gamemode? Link to comment Share on other sites More sharing options...
RoyBatterian Posted December 2, 2014 Author Share Posted December 2, 2014 (edited) It turns out to be it is a Perk which directly modifies stats and doesn't use an Actor Effect to do so. Chems do show up, and I made an Actor Effect and a Perk with a direct modification as a test. The Actor Effects show up in the AV stat, but the Perk ones don't. I've tracked down one in the vanilla game which was part of my problem and it is the Subdermal Armor Implant which gives a DT of +4, this one does not show up. This is clearly a bug in New Vegas. In TTW the Cyborg and Bark Skin Perks are giving +5 and +2 DT, it is the Cyborg Perk which shows up as it is implemented with an Actor Effect, where as Bark Skin is a direct alteration from the Perk itself. So now I have 30+8+5+4+2=49 DT , I'm still trying to track down where the last +3 came from, but I assume it was a quest reward perk or something. The Pip-Boy xml (inventory_menu.xml) has the id 21 for DT, which gets used by the include of the card_info_barter.xml generic prefab. If there is a way to retrieve this value by some other means, by perhaps copying the value to a global that can be read back it will return the proper value. I'll have to talk to Gribble or Jax about that as I'm still trying to understand the xml. Edited December 2, 2014 by RoyBatterian Link to comment Share on other sites More sharing options...
RoyBatterian Posted December 27, 2014 Author Share Posted December 27, 2014 Turns out the last +3 was the Toughness perk. I consulted a bit with Luthien about this, and it's apparently an engine bug. Any perks which alter the DT directly and not by an Actor Effect do not actually modify the ActorValue and therefore they are not actually applied. Link to comment Share on other sites More sharing options...
jazzisparis Posted December 27, 2014 Share Posted December 27, 2014 Immediately before calling GetAV, try executing ModAV DamageThreshold 0This should force the game to re-calculate the DT value. I found it solves the problem of incorrect DT return values when switching gear. Link to comment Share on other sites More sharing options...
Recommended Posts