Jump to content

Is there a way to modify a game setting through perks or magic effects? (Want to modify VATS engage distance in-game)


Recommended Posts

I would like to make a mod where the distance you can activate VATS is dynamic. I think it would be really cool to restrict low perception characters from pressing vats and finding targets that are too far away. It would also allow me to solve the major balance problem that is spamming the VATS button to detect enemies and mines from very far away.

Would also like to make it so if a weapon is equipped with a scope the distance is much longer, but that would be added later.

The game setting I need to change is fVATSMaxEngageDistance

I would just handle this through a perk, but I cannot find a way to modify that game setting.

First thing I want to do is do if perception 1, then engage distance is x. If perception is 2 then engage distance is x. If weather is raining or foggy then engage distance is x. And so on.

Is there a setting for this that I am not seeing? If not, how would I go about making this?

 

Link to comment
Share on other sites

Check F4SE's function "setGameSettingsFloat", it should allow you to do just that - fVATSMaxEngageDistance is very likely a float.

 

Haven't done that in F04 yet, but if it works in any way the same it does in Skyrim, the only problem is that the new values you set in-game are not stored in your saves, you need to call that function again every time you load your game, but that's fairly easy to do. And, in your case wanting to change that value dynamically, that'd mean also checking what that value is before saving - I guess storing it as a Global every time it changes would do the trick.

Link to comment
Share on other sites

Yes by changing the game setting in FO4EDIT or the Creation Kit menu [Gameplay:Settings] which hardcodes the new value into your mod .ESP but that's totally static and not dynamic.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...