Jump to content

Help with a script


andresfe4671

Recommended Posts

Hello everyone, so, we all know that new vegas has a bit of an auto aim problem in 3rd person view, you aim to the head, bullet goes wild and hits the chest, this is very noticiable with laser weapons, but happens with every proj weapon in the game. A workaround / fix for this is the console gamesetting command that goes like this

 

setgs fautoaimscreenpercentage -100

 

this is effective for fixing the proj going wherever it wants and actualy hitting where the crosshair is pointing, but has 2 major flaws, one, it's a gamebryo setting so it resets to default at every game restart, even loading a quicksave reset it, that one I could live with, made a quick bat file for setting it to -100 but, the MAJOR problem is that, the setting goes to default every time you talk to an NPC, that means every time you exit a conversation, you need to run that commmand, gets old fast, so I was thinking on two ways of handling it with some help from the big brains here, I suck at scripting so.

 

1. Make a script that executes that line (setgs fautoaimscreenpercentage -100) after one leaves any conversation, that asumming that you can call a game setting console command on an ingame script...

2. bind the command line script to a key, so can it be pressed on demand for easier setting.

 

Can anyone give me a hand with this one? thanks!

Edited by andresfe4671
Link to comment
Share on other sites

I would do this as a quest script with a processing delay of 5 seconds, so it checks if your aimpercentage is -100, and if it isn't, it make it so. That way it isn't checking constantly, but still constantly enough that it should run at all times for you.

Link to comment
Share on other sites

I agree with sullyvanj93, a quest script is a good start.
This script spits out console message every time it changes the value of "fautoaimscreenpercentage" to -100, so you will know when value-resetting happens.

scn NoAutoAimScript
begin GameMode
    if GetGameRestarted || GetGameLoaded
        SetNumericGameSetting fautoaimscreenpercentage -100
printC "NoAutoAim:fautoaimscreenpercentage -100"
    endif
    if GetNumericGameSetting fautoaimscreenpercentage != -100
        SetNumericGameSetting fautoaimscreenpercentage -100
printC "NoAutoAim:fautoaimscreenpercentage -100"
    endif
end

On my very brief test, exiting conversation with NPC (tested with Cass) didn't trigger the reset.
You should pin-point which event triggers the reset, and write much more efficient script accordingly.

Link to comment
Share on other sites

ty for your replies! Actually I found a way to do it in a very strange but efficient way; turns out any event that makes you lose control or changes your camera values, named it conversations, sitting or being nocked down, pip boy, everything resets that value, so, what I did was using NVSE and a function on it to bind the setgs command script to the right click, why? because right click in most game set ups is binded to iron sights, which is the main issue with the auto aim, hip fire isnt affected as much as IS by autoaim, so, every time you aim with your iron sights, the script runs and sets the value to -100, since that value, as far as I know, modifies the projectile trajectory once the gun is fired, serves me just right to set that value before firing happens, thus, while aiming. Been 4 hours of play testing and it works like a charm, I thought that the fact that you must keep the aim button pressed would somehow make a loop of the function or something like that but no, it runs just fine, no performance impact or anything weird going on, going to polish that script a little bit cause I used a mod made by somebody else as a base for my script so I'll make that standalone and make a publish to the nexus.

Link to comment
Share on other sites

Your idea sounds good, but on my end, this particular game-setting value never resets other than at the start of the session. Not even at reloading saves. I've been monitoring game's behaviour by running this quest script all the time.

scn TestScript
begin GameMode
    if GetNumericGameSetting fAutoAimScreenPercentage != 0
        SetNumericGameSetting fAutoAimScreenPercentage 0
printC "NoAutoAim:fAutoAimScreenPercentage 0"
    endif
end

 


And "SetNumericGameSetting fAutoAimScreenPercentage 0" happens only once, at the start of the session.
I suspect that there is a mod, in your mod-setup, that modifies the value at certain events.

And one more thing. According to GECK wiki, setting the value of fAutoAimScreenPercentage to 0 removes auto aim, not -100. Of course we know that -100 works, and on my test, there was no difference on game's behavior between the two. Well, I just thought I should let you know this.

Anyway, I really like how disabling auto-aim affects gameplay. You definitely should share the end product with public!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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