Fallout 4

File information

Last updated

Original upload

Created by

JDBruce

Uploaded by

JacobBruce

Virus scan

Safe to use

320 comments

  1. JacobBruce
    JacobBruce
    • supporter
    • 45 kudos
    Locked
    Sticky
    How to use WI_auto-inject_fixer.esp:

    In order to make the Wasteland Imports patch work on existing saves you will probably need to restart the quest which handles Auto-Inject Stimpaks. The esp will add an ingestible item called "Restart Quest Potion" to the game but you'll have to use the console to add it to your inventory. Open the console and type "player.additem XX0090DF" where XX is the hex load order number for WI_auto-inject_fixer.esp, which can usually be found in your mod manager or with a tool like FO4Edit. Consume the Restart Quest Potion and let time pass in the game for a few seconds, then save and it should be safe to disable the esp if you want.

    NOTE: the same thing can probably be achieved by uninstalling Wasteland Imports and saving, then reinstalling it along with this patch, but you'll lose any items in your inventory from Wasteland Imports and risk breaking stuff in your save file.
  2. IraMorti
    IraMorti
    • premium
    • 7 kudos
    Hi Jacob,

    I want to use your Wasteland Imports patch, however I also use Survival Configuration Menu which includes it's own fix, problem is it conflicts with this mod since they both modify the HC_ManagerScript file. Is there a way to use the patch with SCM? I'd like to hope either it's safe to overwrite with your VATS freeze fix (I don't know if they modified the file just for the fix or for other reasons as well)  or I could change the esp in your patch to use SCM as a master instead. I'm assuming your patch uses the esp just to reference the modified script file? I'd appreciate your thoughts.
  3. Arinandaa
    Arinandaa
    • member
    • 1 kudos
    Hello JacobBruce this is not related to your mod, but since its about fixing VATS maybe you would want to tackle it.
    So when using VATS with melee weapons on targets that are at striking distance but have no clear pathing like on top of a car, fps just drops to single digits. Thanks.   
  4. Babaloo321
    Babaloo321
    • premium
    • 73 kudos
    Exactly how necessary is a main file for the Wasteland Imports Auto Inject Stimpak file? Does the script reference something from your changes to HC_ManagerScript.pex that it won't operate correctly without? I ask because I wanted to see if it was possible to include your modified WI_AutoInjectSCRIPT.pex to Wasteland Imports Reloaded. Only with your permission, of course.
    1. JacobBruce
      JacobBruce
      • supporter
      • 45 kudos
      Yes it relies on the modified HC_ManagerScript file to check if VATS is active before equipping the Stimpak.
  5. legiaoday6557
    legiaoday6557
    • member
    • 15 kudos
    Months ago I made two posts on a reddit thread about this freeze issue, there I explained that this VATS freeze bug still happens in the vanilla game and I even showed the OP how to trigger the freeze in the vanilla game just to prove that mods aren't the issue.
    There I said that the this VATS Freeze Fix "sorta works" because while it decreases drastically how often the freeze happens I still had the freeze happen to me even with freeze fix installed (albeit it was much rarer now). I even speculated it had something to do with play time or effects being removed, both of which don't seem to be the case.

    In my latest playthrough (with the VATS Freeze Fix installed) I got a VATS freeze very early on, which pissed me off immensely and it also made me disregard the possibility of play time having anything to do with the freeze still happening even with the fix.
    Then I decided to sit down and investigate this issue once and for all, despite not being very experience with papyrus scripting. After an all nighter tracing functions with papyrus and reading logs I finally found the reason the freeze still happens even with the VATS Freeze Fix installed.

    First let's make one thing clear, JacobBruce's VATS Freeze Fix does work to a certain extent and lowers the probability of the freeze happening considerably. This is because it prevents the freeze happening 'while' you're already in the VATS menu, it just doesn't prevent the freeze from happening during the initial camera pan of the VATS mode (more on that bellow).

    Why does the freeze still happen then?
    In the 'OnMenuOpenCloseEvent' event, JacobBruce's fix sets the value of the bool 'bIsVATSMenuOpen', this variable is used as a 'safeguard' to avoid calling 'PotionQueue.add(potionToApply)' when VATS is active. My theory is that there's a single frame gap between the player activating VATS and OnMenuOpenCloseEvent being fired by the game, and during this gap the value of bIsVATSMenuOpen is still 'false' which will allow 'PotionQueue.add(potionToApply)' to be called while the VATS menu is open, thus triggering the freeze.
    After using more tracers to narrow down the source of the crash I've found the exact line that triggers the crash, it's 'PlayerRef.EquipItem(potionToApply, abSilent = true)' inside the 'TryEquipPotion' function. It seems my 'speculation' was right, 'OnMenuOpenCloseEvent' is taking to long to be called and consequently 'bIsVATSMenuOpen' is not being set fast enough. This "frame gap" I previously mentioned only happens during the 'zoom in' of the VATS camera, it's always the same specific frame (or couple of frames).

    This also explains why I couldn't previously trigger the freeze when VATS Freeze Fix was installed, it was because I usually entered VATS mode way earlier so that I was well into the VATS mode when the 'potion' effect was added to my character, I didn't know the window for this 'other' freeze was only during the VATS transition animation and also was really narrow. Rewatching the the video of the freeze finally made me realize that.

    Bellow are three videos I captured of the freezes. The recordings always stop very abruptly because Nvidia Shadowplay crashes along with the game.
    1 - This is the freeze that pissed me off. I was playing the game normally with Nvidia Shadowplay recording a replay in the background.
    2 - This freeze I manage to trigger manually after adding a few tracers and notifications to 'HC_ManagerScript'.
    3 - The third and last freeze I triggered it manually on my second attempt with the original VATS Freeze Fix (no trace, no modifications or anything). I did it to make sure I could still trigger the freeze reliably in the original mod.

    Bellow are links to logs and script with tracers.
    Link to log of a freeze with the vanilla VATS Freeze Fix.
    Link to log of a freeze with several tracers added to the HC_ManagerScript.
    Link to HC_ManagerScript.psc with the tracers that output the log above.

    My fix attempt (needs Fallout 4 Script Extender).
    Once again I would like to reiterate and say that I'm not a papyrus expert, the reason I'm posting all this here is so that either the original author of this this mod, JacobBruce, or a more experienced modder come along and develop a 'proper' fix. But considering no one wants to touch this issue anymore, I doubt that will ever happen.
    The gist of this fix to to keep track of when the player presses the VATS key/button and set 'bHasVATSKeyBeenPressed' to true, this bool will be used in the 'TryEquipPotion' function to tell that the user is 'probably' in VATS mode.
    The reason I'm using key/button presses is because the 'OnKeyDown' event is sent a few frames before the 'OnMenuOpenCloseEvent' event and even before the actual VATS mode is entered.
    Earlier I said "to tell that the user is 'probably' in VATS mode" because the player can press the VATS key/button and not enter VATS mode which will set 'bHasVATSKeyBeenPressed' to true even though the player is not in VATS. To counter this problem I created a timer to set 'bHasVATSKeyBeenPressed' to false after a second, this should give the 'OnMenuOpenCloseEvent' event enough time to be fired properly, thus avoiding the freeze.
    Theoretically I still think 'this particular instance' of the freeze can happen if everything aligns, but the odds of it happening are extremely low. After hours of testing I could not trigger the freeze even once with my fix, but once again, the chance of the freeze happening is not zero. There also might be other instance of the freeze that this fix might not cover, I don't know. In the end this is just a band-aid on top of another band-aid, ideally you'd want to rewrite the whole thing down.

    Obs: The only place I could find where the 'RegisterForKey' function worked was inside the 'OnPlayerLoadGame' event, putting it inside the 'OnInit' event or in the body of the script wouldn't work.

    Link to the source script with my fix. Use some kind of text comparing tool to see what I changed.
    I will not provide the compiled 'HC_ManagerScript' without JacobBruce's endorsement, after all the code he wrote is still doing all the heavy lifting to avoid the freeze. You can still compile it for yourself, but DO IT AT YOUR OWN RISK.


    As for people complaining about beds not working properly I don't have a lot to say about that, I assume it has something to do with the 'Survival Options' version, which I never used.
    1. Tak3Two
      Tak3Two
      • member
      • 7 kudos
      This is exactly what I've been looking for. It's even compatible with EBF out of the box and has all of UFO4P's fixes. Thank you kindly.
    2. Darthtallgeese
      Darthtallgeese
      • member
      • 10 kudos
      One month without VATS freeze so far
    3. JacobBruce
      JacobBruce
      • supporter
      • 45 kudos
      Nice work, it does seem to work better by detecting when the VATS key is pressed. I have uploaded a new version of this fix with your improvements included. A few pages ago someone else mentioned that the freeze can also be caused when a potion wears off while in VATS, I'm not sure if that's true because I haven't tested it, but I don't think there's any easy way to fix that if it is true.
    4. Sinapus
      Sinapus
      • premium
      • 57 kudos
      Will this update require a new game? (Already restarted due to the Heather Casdin mod update, so I won't lose much progress if I have to. May restart just in case.)
    5. JacobBruce
      JacobBruce
      • supporter
      • 45 kudos
      It should be ok to update without starting a new game. But you might need to disable then re-enable survival mode.
    6. Sinapus
      Sinapus
      • premium
      • 57 kudos
      Okay. I think I'll just restart my current character since it's at the very start of the game. That and I wanted to test something with Be Exceptional. (For some reason it doesn't seem to award base skill points correctly. Going to try something to see if it works.)
    7. Ablaze666
      Ablaze666
      • premium
      • 342 kudos
      @legiaoday:
      Wow, that was impressive to read. Here, have a Kudos.
      Thank you very much for your valueable contribution.
    8. legiaoday6557
      legiaoday6557
      • member
      • 15 kudos
      The potion wearing off thing was also said by me. I also remember you saying if that were the case than there wasn't an easy fix for it, so I kinda gave up on that and deleted the save with that 'potion wear off' setup. On that save I indeed could reliably trigger the freeze when the potion was about to wear off, but some time later I tried to replicate this same 'wear off instance' of the freeze on a different situation and couldn't do it.
      I remember the freeze happening when the bonus buff from drinking a purified water wore off, this might a long shot, but one possibility is that that freeze was actually this other instance of the freeze where it only happens during the VATS few opening frames, and by EXTREME coincidence the buff from the water wore off at the same time the hunger potion was added to my character and also the hunger icon appearing on screen was 'delayed' (something that can happen as I explained in this reddit thread).
      Regardless, when I come back to the game I will keep an eye out for this potion wear thing, and even enable logging to be absolutely sure.

      Another important observation, the Creation Kit wiki states that the OnKeyDown event requires F4SE version 0.3.0 or higher, shouldn't the 'Requirements' on the description page of this mod change so that F4SE is now required?
    9. kacamac
      kacamac
      • premium
      • 32 kudos
      You guys are legends, thank you for your great work
    10. JacobBruce
      JacobBruce
      • supporter
      • 45 kudos
      Ok I updated the description to let people know F4SE is required but I kept the other version under main files for people who don't have F4SE. I also sent you some DP for your work on this fix, check your wallet (can find a link to it in your profile drop down menu).
    11. legiaoday6557
      legiaoday6557
      • member
      • 15 kudos
      Thanks, very kind of you.
      Yeah, I have to admit it, the first two times I installed this fix it was the only thing I had installed, no other mods or patches. Not having dependencies is a nice plus.

      I think Fallout 4 survival mode is super fun and people should be able to use VATS without the fear of their game crashing. If I'm in the 'right state of mind' I might look into a way to implement this fix without the need for F4SE, I'm not sure if it's possible though. The only reason why I even dared to tackle this issue in the first place was because I was fueled by rage haha. I know people are frustrated because there so many uncertainties around this VATS freeze, but there are a lot of parallel stuff going on in the HC_ManagerScript and in the game's binary that interact with each other, what makes this whole thing a nightmare to debug.
    12. achekery83
      achekery83
      • premium
      • 7 kudos
      Just dropping a "Great job" here on this high quality bug report. Thank you.
    13. kucingkucing
      kucingkucing
      • premium
      • 20 kudos
      I still have the "Vats Freeze" problem even installed this mod
      so, sorry for the silly questions :
      1. this mod only requires the latest F4 Patch and the Latest F4SE right? not require anything else?
      2. this mod can be played in non-Survival mode, right?
      3. Event OnKeyDown() is set on the default "Q" button Right?
      4. the installation only moves it to "Data\Scripts", Right?
      5. it can be used on non-new-game(load save), Right?

      Edit : I tried to compile it from the source, but  Freeze still happens
      Edit 2 : I tried to remove all lines except the first line, and tested with this mod:
      Fill Bottle while playing on any difficulty.
      the "R" label still appears but when you press it, but it does nothing, and "Vats Freeze" still happens
    14. sportled
      sportled
      • supporter
      • 0 kudos
      so where do i place this psc file? i have never done compiling of my own and no idea on these things.. can someone provide this fix as mod as it seems to work well? or? lil confused but hopeful as i am having this bug early on after meeting aida on a new save.
    15. kamihate32
      kamihate32
      • member
      • 0 kudos
      hey did you find how to "install" this script?
  6. Conifer
    Conifer
    • supporter
    • 70 kudos
    Is there anyone else that no longer needs to sleep in survival when using this mod? I'm far from positive what is causing it, so no blame laid here, but it's the only mod that modifies that HC script in my load order.
    1. jtwitham
      jtwitham
      • premium
      • 18 kudos
      I've had that happen before without this mod. It might even be a vanilla bug. If you can get a mod that allows you to return to Survival mode after momentarily turning down the difficulty, that'll restart the HC_Manager script and should allow your character to get tired again. That worked for me, at least.
    2. aquilegia
      aquilegia
      • member
      • 5 kudos
      I am encountering a different issue, where it looks like the code in VATS Freeze Fix/Scripts/source/User/Hardcore/HC_ManagerScript.psc is interacting with another mod, preventing my character from getting 8 hours of sleep in survival.
  7. BlazeStryker
    BlazeStryker
    • premium
    • 43 kudos
    In case none have done so yet, I suggest contacting the Dicky's Pinup mod author and passing along the bug issue. One of the bonuses available to the outfit pieces is an auto-stimpak function when you hit 0 hits. I'm pretty sure that would trigger the bug!
  8. cubbyman1
    cubbyman1
    • member
    • 16 kudos
    how is it that this game is suddenly more unstable than skyrim is? 
    1. glacialmind101
      glacialmind101
      • member
      • 11 kudos
      It's called bloat.  Basically it takes great creative talent in order to make any company or development studio successful.  People with ability can create more elegant systems and designs for a number of reasons foremost that they have a vision that allows them to weed out the unnecessary.  However after a company becomes successful it will tend to attract more mediocrity.  This is especially true of management where mediocrity is the rule.  Mediocracy tends to apply a kitchen sink approach because they lack any vision.  Thus they attempt to replicate the results of creative intellect by simply trying to do everything that has worked.  This is how you get tacked on multiplayer and tacked on everything.  Now when you combine this with a dated game engine, these tacked on elements begin to bog things down and create instability.  This is exactly what happened with gamebyro and Fallout 4.  Thankfully Bethesda is now owned by Microsoft rather than Zenimax which is a definitive step down on the ladder of vampiric corporate evil.
    2. Chaines08
      Chaines08
      • supporter
      • 0 kudos
      Thankfully Bethesda is now owned by Microsoft rather than Zenimax which is a definitive step down on the ladder of vampiric corporate evil.
      Didn't work that well for Starfield sadly. Game is bugged as Fallout 4 and I have no hope for it to get fixed
    3. cubbyman1
      cubbyman1
      • member
      • 16 kudos
      i'm starting to feel the same way, it's almost like i feel they aren't capable of doing ES6 justice by themselves, i used to be completely confident in their ability to create, but now i feel the modders should take over the whole operation, but i feel that bethesda already have that planned in their ideas, they will make a mediocre game, and the modders will come in and make mods, in which they will give the modders a good deal that they can't refuse like say the mod author gets 90% of the profits earned per mod on each sale, and bethesda only takes 10% of that deal, they will make most of their money off of the modders and the modders will be happy because they will finally get payed for their work with a very decent cut and more people might start modding at that point which will create jobs for many people and kind of help the economy.

      now i doubt very much bethesda will drop their engine, it's just to easy to mod and it's what keeps them popular because of the modding community, but i have no doubt they will continue to upgrade it so it's capable of much more down the line, which is kind of a good thing to be honest, meanwhile they will just keep dumping out mediocre s#*! games, only for the modding community to polish into a Dimond which will make a lot of people rich including themselves in the process without really needing to do anything for longer periods of time.

      so i look at Bethesda's quality will be bad maybe even worse, but the modding community will come as their savior and fix the game like always, but it will be a somewhat happier relationship because everyone is doing what they love creating mods and making money off of them while bethesda just holds back and watches the system automate through the community of an unending passive income generator.

      now if bethesda is smart with this system, they might want to make their games free to play status because people will demand if they make a s#*! product they should give s#*! deals, and by that time they will have been able to afford it and they might just do the free to play model, or maybe they will try to get more like they are now, time will tell i suppose.
  9. Babaloo321
    Babaloo321
    • premium
    • 73 kudos
    Can the Wasteland Imports patch be safely compacted and given an esl flag? Or will it cause issues if I did so on my end? 
  10. livipup
    livipup
    • premium
    • 40 kudos
    That was a really annoying bug :) I didn't realize it was a thing in unmodded games. I always assumed I had something wrong with my mod list.

    I was wondering, why is there a patch for this mod and survival options on both mod pages? 
  11. Gunrunner66
    Gunrunner66
    • member
    • 7 kudos
    Will this fix work outside of survival mode?

    I don't play in survival mode.  If I wanted to worry about eating, drinking, addiction, and medical issues, I'd walk out my front door.

    That being said, this question has been asked at least 3 times on the first few pages.  It ought to be answered.
    1. kucingkucing
      kucingkucing
      • premium
      • 20 kudos
      @hazyclouds777 & @Gunrunner66, is this work outside of survival mode?
      The answer is Yes and no,
      This mod reduces the number of VATS Freeze to a certain percentage,
      If normally you get VATS Freeze and not Freeze is 1:5,
      This mod reduces it to 1:10,
      And yes you can still get the VATS Freeze in the first VATS Aim