Jump to content

Recommended Posts

Posted

Good evening everybody!

 

So I have recently been playing another game that made you "zoom in a bit" with a key.

I really miss this feature and think something like that would be nice to have in FO4.

 

I already know how to make a script do something when a keyboard key is pushed.

 

But how can I change the FOV value from within a script?

Is that even possible?

Posted
  On 6/1/2021 at 10:47 PM, aurreth said:

Have the script call the console FOV command.

 

How do you call a console command from a script?

Posted
  On 6/2/2021 at 12:51 AM, DieFeM said:

 

  On 6/1/2021 at 10:47 PM, aurreth said:

Have the script call the console FOV command.

 

How do you call a console command from a script?

 

 

ConsoleUtil? I may be thinking of Skyrim.

Posted
  On 6/2/2021 at 1:16 AM, aurreth said:

 

ConsoleUtil? I may be thinking of Skyrim.

 

 

Ah. Yes, Skyrim.

Posted
  On 6/2/2021 at 5:15 AM, YouDoNotKnowMyName said:

In FO4, you can't call console commands from scripts, sadly ...

 

Yes, you can!

 

Either from Flash TerminalMenu, or directly from Papyrus by using https://www.nexusmods.com/fallout4/mods/51951

 

However, for me, the FOV console command does not work properly and the FOV immediately resets to some default value as soon as console is closed. Probably an ini setting or whatever, idk.

Posted
  On 6/2/2021 at 7:20 AM, niston said:

 

  On 6/2/2021 at 5:15 AM, YouDoNotKnowMyName said:

In FO4, you can't call console commands from scripts, sadly ...

 

Yes, you can!

 

Either from Flash TerminalMenu, or directly from Papyrus by using https://www.nexusmods.com/fallout4/mods/51951

 

However, for me, the FOV console command does not work properly and the FOV immediately resets to some default value as soon as console is closed. Probably an ini setting or whatever, idk.

 

Oh my god!

 

There is a way to execute console commands from scripts?!?!

What haven't I found this before?

 

This might also make my "multiple playable characters" idea possible ...

Posted (edited)
  On 6/2/2021 at 7:20 AM, niston said:

 

  On 6/2/2021 at 5:15 AM, YouDoNotKnowMyName said:

In FO4, you can't call console commands from scripts, sadly ...

 

Yes, you can!

 

Either from Flash TerminalMenu, or directly from Papyrus by using https://www.nexusmods.com/fallout4/mods/51951

 

However, for me, the FOV console command does not work properly and the FOV immediately resets to some default value as soon as console is closed. Probably an ini setting or whatever, idk.

 

 

There it is. I couldn't find the FO4 version earlier.

 

Just using FOV in the console isn't enough. First you need two parameters for fov, one for the pipboy, one for the landscape view. Then you have to push that to the ini file so it stays:

fov 80 110
saveini

Where 80 is for the pipboy, and 110 for the world view.

Edited by aurreth
  • 2 weeks later...
Posted

Ok, so I used the following script to change the FOV as long as the middle mouse button is pushed:

Scriptname ZoomButtonScript extends Quest
{The scirpt that zooms in when a button is clicked
}


Event OnInit()
      RegisterForKey(258)  
endevent

Event OnKeyDown(int keyCode)
    UnregisterForKey(258)
    if (keyCode == 258 )
        ConsoleUtil.ExecuteCommand("fov 10")
    endif
     RegisterForKey(258)
EndEvent

Event OnKeyUp(int keyCode, float time)
    UnregisterForKey(258)
    if (keyCode == 258 )
        ConsoleUtil.ExecuteCommand("fov 0")
    endif
     RegisterForKey(258)
EndEvent

But when I push the middle mouse button, nothing happens.

When I release it, nothing happens.

 

When I then push the middle mouse button agian, the game CTDs.

 

When I manually enter "fov 10" into the console, the fov changes as it should.

(10 is very extreme, I just use it as an example)

  • Recently Browsing   0 members

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