UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

[Tutorial] Add FOV Changer/Slider

broken avatar :(
Created 9 years ago
by Scobalula
0 Members and 1 Guest are viewing this topic.
8,811 views
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
Signature
Aye mate you don't know me so y don't you shut tf up ok buddy :)

×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
Before we start I recommend downloading Notepad++, click here to download it.

In this tutorial I will be explaining how to add a FOV Changer/Slider.

I looked around the forums and didn't see a tutorial for this, so after I figured it out myself I decided to show other mappers how to do it. There are 2 Tutorials here, one for a simple changer, and the other for a slider. Both work perfect without cheats enabled, both can also be enabled at the same time, and changing one of them will change the other, so they don't conflict.



For the Changer:

This is simply a button that has set values (like changing Console from On or Off), go to root/raw/ui and locate the file "options_game_pc.menu".

Back up this file to somewhere else as we will be editing it.

Right click on the file and click "Edit with Notepad++", I recommend associating .menu files with Notepad++.

In this file around line 61 you'll see this:

Code Snippet
Plaintext
CHOICE_DVARFLOATLIST( 22, "@MENU_ENABLE_CONSOLE", monkeytoy, { "@MENU_YES" 0 "@MENU_NO" 1 }, ; )

Put under this:

Code Snippet
Plaintext
// FOV Changer
CHOICE_DVARFLOATLIST( 27, "Put what you want here as this is what the option will show up as, i.e. Change FOV", cg_fov, { "Normal" 65 "Medium" 75 "High" 90 }, ; )

You can change the quoted part above where I said "Put what you want" to what you want, this is what it will show up as in game, like where you see "Enable Console" in the options.

For the parts where you see "Normal", "Medium" and "High", there are what the options will say, like when you enable console it will say "Yes" or "No", as for the numbers beside them, these are the FOV values, so 65 is FOV of 65, equivelent to using command "cg_fov 65", you can add more here and change the values to your liking.

Now once you can save the file, you don't need to compile map for this, just Build Mod, once you get into game it will look like this:



For the Slider

Folloe the above for copying and opening the file.

For the Slider, look for this on line 61 (or around there):

Code Snippet
Plaintext
CHOICE_DVARFLOATLIST( 22, "@MENU_ENABLE_CONSOLE", monkeytoy, { "@MENU_YES" 0 "@MENU_NO" 1 }, ; )

Under it, add this:

Code Snippet
Plaintext
// FOV Slider
CHOICE_DVARSLIDER( 28, "Put what you want here", cg_fov, 65, 65, 90, ; )

Once again, Put what you want where it says that, as this is what it show up as in the menu, like "Enable Console".

You'll notice 3 Values, the first one is the default value, I leave this at 65 because that's WaW's default, but you change it to maybe 70 or higher if you want.

The second value is the lowest value the slider will go, so if you slide the slider furthest to the left, the FOV will be at 65.

The third is the highest value the slider will go, so if we slide it furthest to the right, the FOV will be at 90.

This is how it looks in-game:




Last but not least, in Mod Builder tab in Launcher, for your Mod, add this to the mod.csv:

Code Snippet
Plaintext
menufile,ui/options_game_pc.menu


Hope this helped you. :)
Last Edit: August 01, 2015, 04:03:31 pm by Scobalula
broken avatar :(
×
broken avatar :(
Location: gbNewport
Date Registered: 2 November 2014
Last active: 2 years ago
Posts
1,265
Respect
Forum Rank
Zombie Colossus
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Embrace the Darkness
×
Tim Smith's Groups
Tim Smith's Contact & Social Linkstimsmith90THEREALBaDBoY17TimSmithMy clan Website
Damn man thx for the script and the lesson :)

will use in my map just after i fix it still don't know how :\
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Scobalula's Contact & Social Links
Damn man thx for the script and the lesson :)

will use in my map just after i fix it still don't know how :\

Glad it works for you, hope you get your error solved. :(
broken avatar :(
×
broken avatar :(
Location: fr
Date Registered: 5 January 2015
Last active: 2 years ago
Posts
122
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
×
alex-125's Groups
alex-125's Contact & Social Links
Nice script bro ! ;)
broken avatar :(
×
broken avatar :(
Location: br
Date Registered: 7 May 2015
Last active: 1 month ago
Posts
312
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Signature
×
EmpGeneral's Groups
EmpGeneral's Contact & Social LinksldraweEletricStorm
It isn't working for me,I added the line in mod.csv,checked if mod.csv was selected in the iwd list,everything is fine.Any ideas what I may did wrong?

 
Loading ...