Fallout 4
0 of 0

File information

Last updated

Original upload

Created by

Ingvion

Uploaded by

Ingvion

Virus scan

Some manually verified files

Tags for this mod

About this mod

This mod fixes a cooldown of random encounters system. Now, after random encounter takes place, cooldown counter updates correctly, and prevents random encounters from appearing. Also, cooldown period is dynamic now, and each time will have different duration between min and max values.

Requirements
Permissions and credits
Changelogs
-- What's this about? --

As you probably noticed, random encounters loads along with the zone to which they are assigned, without any cooldown or chance to not to. Chance of random encounter is always 100%, and cooldown period is always 0. And if chance can be changed by altering some global values, cooldown period is simply broken and cannot be used, because the relevant parts of the scripts are not complete. 

Well, i fixed it. With this mod, after random encounter takes place, cooldown period starts correctly, and no random encounters will occur during this period. Also, cooldown period have different duration each time it updates, between min and max values.

-- Why this? --

Why use this mod, if you can adjust chance of random encounter? Problem is described above - chance checking happens every time, when cell with encounter is loading. If you`re not a fan of fast travel, and travelling by foot, there's a lot of RE chance checking - therefore, more often you travel, more chances to stumble upon something. 

Although, it is quite logical model, with this mod you can ensure a pause in random encounters. You can use it with mods, that alter REChanceGlobal value.

-- What's inside? --

This mod contains 2 slightly altered scripts, those with the parts that controls cooldown updating and duration. There are several options, from which you can choose (you can change and recompile scripts, if you don't like this values, instructions and source files included):

  • from 6 to 30 ingame hours
  • from 6 to 60 ingame hours
  • from 12 to 48 ingame hours
  • from 12 to 60 ingame hours
  • from 24 to 72 ingame hours
  • from 24 to 120 ingame hours

-- How to install/uninstall this? --

rescript.pex and reparentscript.pex goes into "Scripts" folder (Fallout 4/Data/Scripts/). 
You can also use Mod Organizer to install this just like any other mod.

Delete scripts to uninstall this mod.

-- Any issues? --

Sort of.

  • All random encounters are controlled from one place, so cooldown is global: once you stumble upon some stray dogs or sandwich lovers - no random encounters will be generated for cooldown period in any place of the Commonwealth, Nuka-World or Far Harbor.
  • If you use non-100 chance of random encounters, cooldown counter will be updated even if chance of random encounter has failed.
  • Note, that during "The Nuclear Option" quest all random encounters are disabled. It's not a bug, this is how this quest's script works, Bethesda did this intentionally.

-- Any technical details? --

You can skip this part, if you're not into modding stuff.

Default cooldown can be found in REParentScript, in the form of GlobalCooldownDays variable with 0 value (cooldown counter value counts as GameDaysPassed + GlobalCooldownDays). Changing it's value to something other than 0 does not help, because UpdateGlobalCooldown() function call in REScript has no conditions, and fires up uncontrollably each time cell is loading. Moreover, GlobalCooldownDays value is stored in the savegame and cannot be changed afterwards, even by changing and recompiling script. 

  • To fix this, i used RandomFloat() function instead of GlobalCooldownDays variable - it gives us some random value between min and max, and not stored in the savegame.

Call of function, that performs cooldown counter updating, can be found in REScript. As i mentioned above, by default function call has no conditions, so it triggers always when cell is loading.

  • To fix this, i've added condition, that checked if REGlobalCooldown value is bigger than GameDaysPassed - if yes, UpdateGlobalCooldown() function call does not occur and no cooldown counter updating happens. 

-- Pro-tips? --

You can check current cooldown duration with following console commands:

getglobalvalue REGlobalCooldown
getglobalvalue GameDaysPassed


GameDaysPassed showing, how many ingame days have passed since the beginning of the game, REGlobalCooldown - when the next random encounter happens. For instance, if GameDaysPassed equals 1.27 (24*1.27 ≈ 30 hours), and REGlobalCooldown equals 2.13 (24*2.13 ≈ 51 hour), next random encounter and REGlobalCooldown value updating will take place in about 21 hours (51-30 = 21) when you visit cell where random encounters can occur.
 
Also, you can benefit from changing RE generating chance along with this mod, by using some other mod that doing so, or by using the console command:

set REGlobalChance to 50

It will change the chance of random encounter, when zone with encounter is loading, to 50% (you can use any other value between 0 and 100). Note, though, that this could lead to undesirably long intervals between random encounters (see item 2 of "Any issues?" section) - so, it makes sense to use lower cooldown durations, if REGlobalChance is low.

-- Thanks to --

Everyone but the guy(s) in Bethesda, who wrote RE scripts. Shame on you!