How Can I Change the FOV to 100 Permanently?

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
wejf1894
Posts: 2
Joined: Wed May 06, 2020 1:33 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

How Can I Change the FOV to 100 Permanently?

Post by wejf1894 »

Hello,

I've been playing SWBF2 with the Unofficial v1.3 installed. I know that you can go into the fake console and change the FOV to whatever you like but how would I go about changing it Permanently? Everytime a new match is loaded I have to go in and change it again. I don't know anything about modding or scripting for this game so please forgive me for being a noob at this stuff. Thanks!
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: How Can I Change the FOV to 100 Permanently?

Post by Marth8880 »

You might be able to do it with a user script but I don't recommend increasing the FOV. High FOVs (greater than ~66) can cause some maps to crash randomly.
wejf1894
Posts: 2
Joined: Wed May 06, 2020 1:33 pm
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2
xbox live or psn: No gamertag set

Re: How Can I Change the FOV to 100 Permanently?

Post by wejf1894 »

Does creating a custom user script require software or something as easy as using a text editor? I'm on Fedora Linux running SWBF2 with Proton.
Sporadia
Corporal
Corporal
Posts: 151
Joined: Thu Jan 24, 2019 11:02 pm
Projects :: No Mod project currently
Games I'm Playing :: None
xbox live or psn: No gamertag set

Re: How Can I Change the FOV to 100 Permanently?

Post by Sporadia »

It's a lua script so you only need notepad and the modtools. If you have Zerted's patch installed (AAA-v1.3patch) then they actually provide some how to docs explaining how to make one. Go to the addon folder where your game is installed, then go to AAA-v1.3patch/docs/how-to. There is how to Munge A Custom LVL File which is the first thing you need to learn. Then how to Make Custom User Scripts explains the rest. Actually writing the user script is more complicated. You have to imagine it like you're writing lua in the beginning of a mission's ScriptInit(). But rather than writing it directly into the mission lua, you write in in a user script to make it run at the beginning of every mission. You can inject code into other functions by redefining them. Zerted left an example of how to do that too. Look at AAA-v1.3patch/docs/samples/user_script_example and look how Zerted injects code into ScriptPostLoad() (You can do this to any function, but ScriptPostLoad is the most common). I don't know exactly how to do this with the command console because I haven't modded with it. Personally I would try using SetProperty() or SetClassProperty() to change the ODF field of view values instead but that involves a lot of code to get working. The command console's probably easier. Either way, you definitely don't need special software.

Edit: If you want a more tedious method with less lua, you can just mod everything to give them the right FirstPersonFOV or ThirdPersonFOV values in the ODF. That seems like an inappropriately large task though. I also haven't tested these lua commands; they fall under the category 'Controllable objects support units' which might not even mean what I think it means.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: How Can I Change the FOV to 100 Permanently?

Post by AnthonyBF2 »

There is a much simpler way to do this. No scripting a custom file needed.

Open the game's primary ingame.lvl in the HXD hex editor application. (located inside _lvl_pc folder)
Do a hex search for B7 D6 85 47 and right next to that will be the number 70.
You can write a new number over it, but keep the number 4 digits or less, five digits or more will overwrite the next piece of code and break the game.
Save changes and close the file and play.

Now, this won't affect all characters, it will only affect any class that obeys the soldier class parent (com_inf_default).
Post Reply