Jump to content
banReflex

Nice Per Weapon Settings

Recommended Posts

Hello,

this is a simple widget that allows you to change several settings for each weapon. You can change:

  1. FIeld of view
  2. View model
    • X, Y, Z
    • Show gun
    • Weapon bob, rotation, kickback
  3. Crosshair
    • Type, size, weight, stroke weight
    • Stroke by health, fill by health, colour
  4. Damage numbers ("cl_text_time")
  5. Zoom
    • Zoom key, FOV, sensitivity scale
    • Hold to zoom
    • Keep zoom when switching weapons
  6. Sensitivity
    • Sensitivity, scale, invert
    • Advanced: acceleration, sensitivity cap, offset, power, post-scale X, post-scale Y, angle

Cou9nED.jpg

IMPORTANT: Before enabling the widget make sure to disable any other widgets that set your crosshair, view model, FOV, zoom etc. except for the default Corsshairs widget. This includes "CrosshairWeapons" and "qz_zoom" widgets! If you don't, this widget won't function properly.

Download link

If you plan on using "Hold to zoom" function you need to go to ".../reflexfps/base", open "internal.pak", navigate to "internal/ui/widgets" and copy "scoreboard.lua" to your ".../reflexfps/base/internal/ui/widgets" folder. Otherwise your scoreboard will flash when using hold to zoom.

If you plan on mixing 2 crosshairs into 1 you also need Crosshairs2.lua or KovCrosshairs2.lua

Version that works with KovCrosshairs

UI explained: Red parts serve as a simple overview of what you've changed. If something is red that means it's not default, or that it is enabled. "Set to default" buttons allow you to save the current settings as default, this will set all the other defaults to that same setting.

All the pictures:

 

eX5jHkh.png

sUBHsQ0.png

22lE52c.png

ZQZiy51.png

5jr8W77.png

uAEuEYz.png

CPklICD.png

xsnGikk.jpg

h2as2hq.jpg

qJOdfd7.png

Big thanks goes to Face on Discord for helping me with all the UI ideas. Also thanks to fuglaa and bej for bothering to test it when it was barely working.

Fixes after release:

  • Zoom key is only bound to game so it doesn't affect your replay or map editor binds
  • Added "Apply to all" button for Zoom settings
  • Added a separate .lua that works with KovCrosshairs instead of Crosshairs widget
  • Zoom key no longer defaults to mouse2, added an Unbind key
  • Added "Keep" setting to zoom
  • Added "Mix" option to mix 2 corsshairs
  • Fixed "crosshairs2" being spammed in the console
  • Updated Kov version

Share this post


Link to post
Share on other sites
1 hour ago, Ammazzabanane said:

This is awesome, a step up from the old crosshairWeapons widget, there is still a flickering of scores whenever zooming tho, but im guessing there is not mutch to counter that :/ 

Bej has the same problem when using "Hold to zoom" and I can't even reproduce it. I think it's a combination of widgets leaving keys bound or something, I've tried many things to make it happen but it never does. Take a screenshots of all widgets (enabled and disabled) and I can try again.

Share this post


Link to post
Share on other sites

i have a question, the widget uses the default Crosshairs, so if i wanted to use it with some other crosshairs (like for example kovaak's custom crosshairs)  how should i do? should i just change every occurrence of "crosshair" in the Nice_perWeaponCrosshair.lua with "customCrosshair"?

im sorry for the potentially very dumb question, but im really bad at lua scripting

Share this post


Link to post
Share on other sites
11 hours ago, Ammazzabanane said:

i have a question, the widget uses the default Crosshairs, so if i wanted to use it with some other crosshairs (like for example kovaak's custom crosshairs)  how should i do? should i just change every occurrence of "crosshair" in the Nice_perWeaponCrosshair.lua with "customCrosshair"?

im sorry for the potentially very dumb question, but im really bad at lua scripting

Nah, I had to change a bunch of other stuff too, here's a separate lua that works with KovCrosshairs.

Share this post


Link to post
Share on other sites

Hello,

First of all thanks a lot for this LUA. It's really useful! Unfortunately I have a weird problem. I binded my jump key to right mouse button. However when your script is "visible" and I spawn my jump key is being unbinded. I can rebind it when in-game but it will unbind anyway. In the menu and as a spectator the key is still binded. That is till I spawn.

When I turn off your LUA script this unbinding process does not occur. I use the following LUA scripts:

dp2hud v1.17
Quake 2 sounds
Nice per Weapon Settings
Alerts
Kill-feed (mgli_k.pak latest version)

Kill-feed might be turned off not entirely sure. I did drop the "Scoreboard.lua" in the widget folder aswell.

If you would like to know something specific don't hesitate to ask :). Thanks a lot for your afford!

EDIT: The spacebar works fine with binding the jump key. So it doesn't unbind when spacebar is used for jumping.

~Lifell

 

Share this post


Link to post
Share on other sites
5 minutes ago, Lifell said:

Hello,

First of all thanks a lot for this LUA. It's really useful! Unfortunately I have a weird problem. I binded my jump key to right mouse button. However when your script is "visible" and I spawn my jump key is being unbinded. I can rebind it when in-game but it will unbind anyway. In the menu and as a spectator the key is still binded. That is till I spawn.

When I turn off your LUA script this unbinding process does not occur. I use the following LUA scripts:

dp2hud v1.17
Quake 2 sounds
Nice per Weapon Settings
Alerts
Kill-feed (mgli_k.pak latest version)

Kill-feed might be turned off not entirely sure. I did drop the "Scoreboard.lua" in the widget folder aswell.

If you would like to know something specific don't hesitate to ask :). Thanks a lot for your afford!

~Lifell

Hey, it happens because mouse2 is the default zoom key, if you go into zoom, enable it and change the bind from mouse2 to whatever you don't use it should work normally. I'll try making the zoom be unbound by default, thanks for letting me know.

Share this post


Link to post
Share on other sites
Just now, banReflex said:

Hey, it happens because mouse2 is the default zoom key, if you go into zoom, enable it and change the bind from mouse2 to whatever you don't use it should work normally. I'll try making the zoom be unbound by default, thanks for letting me know.

Aaaah, I get it now. I didn't even touch the zoom thing :P so I never enabled or looked at it. Thanks for the info! Don't forget to enable a way to unbind it after someone already bound it. For now I just bind it to something nobody in the wide world would use: F13.

~Lifell

Share this post


Link to post
Share on other sites
21 minutes ago, Lifell said:

Aaaah, I get it now. I didn't even touch the zoom thing :P so I never enabled or looked at it. Thanks for the info! Don't forget to enable a way to unbind it after someone already bound it. For now I just bind it to something nobody in the wide world would use: F13.

~Lifell

It is now unbound by default (for new users) and I added "Unbind" key.

Share this post


Link to post
Share on other sites
1 minute ago, banReflex said:

It is now unbound by default (for new users) and I added "Unbind" key.

Thanks! I also have a suggestion for the zoom. Just checked it out and it may be handy for some people. Option to undo zooming if switching weapon. Might be nice in some situation. For example:

I might be zooming in with the bolt rifle but I get flanked. I switch to another weapon but because my zoom is on toggle and not on hold my Ion Cannon (zoom enabled) is zoomed when switched.

Might be nice to have in some occasions depending on the person :). I'm going to try zooming in-game later on and see if I like it. I don't know if there is some bugs to be found when you have 1 weapon set as toggle and other weapon as hold. That if you zoom in with one and get weird results if you switch to a weapon that has zoom configured differently :). I check that later.

Thanks a lot for the LUA script!

~Lifell

Share this post


Link to post
Share on other sites
1 hour ago, Lifell said:

Thanks! I also have a suggestion for the zoom. Just checked it out and it may be handy for some people. Option to undo zooming if switching weapon. Might be nice in some situation. For example:

I might be zooming in with the bolt rifle but I get flanked. I switch to another weapon but because my zoom is on toggle and not on hold my Ion Cannon (zoom enabled) is zoomed when switched.

Might be nice to have in some occasions depending on the person :). I'm going to try zooming in-game later on and see if I like it. I don't know if there is some bugs to be found when you have 1 weapon set as toggle and other weapon as hold. That if you zoom in with one and get weird results if you switch to a weapon that has zoom configured differently :). I check that later.

Thanks a lot for the LUA script!

~Lifell

Yeah, added a "Keep" function that does what you describe.

Share this post


Link to post
Share on other sites

The mod is fucking fantastic, I have one request though.

Add an option to have two overlapping crosshairs, like i.e. Warsow.

I'm used to having a rather complicated looking crosshair, compared to most. It involves a part which is pink, and the rest as greyscale. I can of course just paint it in .svg, as I already have, the problem is, if I, for what ever reason, decided I wanted the pink part to be blue instead, I'd have to redraw the .svg file - otherwise the game paints the whole crosshair blue.

With overlapping crosshairs, I can manipulate the color of each single part, without affecting the other.

Share this post


Link to post
Share on other sites
12 hours ago, SantaClaws said:

The mod is fucking fantastic, I have one request though.

Add an option to have two overlapping crosshairs, like i.e. Warsow.

I'm used to having a rather complicated looking crosshair, compared to most. It involves a part which is pink, and the rest as greyscale. I can of course just paint it in .svg, as I already have, the problem is, if I, for what ever reason, decided I wanted the pink part to be blue instead, I'd have to redraw the .svg file - otherwise the game paints the whole crosshair blue.

With overlapping crosshairs, I can manipulate the color of each single part, without affecting the other.

Ok, I've added the option, check the link in OP and make sure to get Crosshairs2.lua (right below the download link). I'm not sure if I could've done it without another Crosshairs copy.

You can use it by pressing "Mix" button and then editing each of the 2 crosshairs (you can switch on the right).

Anyway, you can now do stuff like this. Please don't tell me you want to have more than 2 crosshairs though...

BmbM7oW.jpg

Oh, you'll probably get a bunch of errors if you don't wipe all the settings. Just take screenshots, go into game.cfg and delete everything under Nice_PerWeaponSettings... 

Share this post


Link to post
Share on other sites
15 minutes ago, doombro said:

experiencing a weird bug with this. When i try to edit sens for any weapon except melee it wipes my whole esc screen the moment i check the "change" box.

Is there an error show in console and are you using the latest version? Oh and can you open your game.cfg, search for nice_perweaponsettings and copy paste everything into a pastebin or a spoiler.

Share this post


Link to post
Share on other sites
8 hours ago, banReflex said:

Is there an error show in console and are you using the latest version? Oh and can you open your game.cfg, search for nice_perweaponsettings and copy paste everything into a pastebin or a spoiler.

i use the kovcrosshairs version. I downloaded the latest version of the normal one to test and it appears to do the same with that as well.

it does bring up one thing when I start a map (but not the main menu):

"lua: [string "base/internal/ui/widgets/nice_perweaponsettingskov.lua"]:1344: attempt to concatenate field 'advancedPower' (a nil value)

settings: http://pastebin.com/KgrgzC4L

Share this post


Link to post
Share on other sites
10 hours ago, doombro said:

i use the kovcrosshairs version. I downloaded the latest version of the normal one to test and it appears to do the same with that as well.

it does bring up one thing when I start a map (but not the main menu):

"lua: [string "base/internal/ui/widgets/nice_perweaponsettingskov.lua"]:1344: attempt to concatenate field 'advancedPower' (a nil value)

settings: http://pastebin.com/KgrgzC4L

Apparently the problem is with capitalization of "advancedPower" inside of game.cfg, it should indeed be "advancedPower" and not "advancedpower". I don't have a clue on how this even happened, but it should work if you change all of them. I also updated Kov version in the OP to make it the same as the original version.

Share this post


Link to post
Share on other sites
11 minutes ago, banReflex said:

Apparently the problem is with capitalization of "advancedPower" inside of game.cfg, it should indeed be "advancedPower" and not "advancedpower". I don't have a clue on how this even happened, but it should work if you change all of them. I also updated Kov version in the OP to make it the same as the original version.

ah, that explains it. I was looking through the widget itself instead of the cfg. I reset the settings in the cfg and all is working fine now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×