Ever wanted to make a weapon reposition addon like many before? Were you also offput by the idea of adjusting every single sight the gun has available? Well, not anymore.
A Disclaimer:
So I've been thinking about this mod and this requires a bit of a disclaimer.
This mod is NOT an ideal solution. In hindsight, it makes things more complicated for some.
It gets the job done, don't get me wrong, but it relies on you assuming the base_hud_offsets will be applied to specific values. Meaning, you assume the user will have same mods you have. Either that, or will have base files that have no changes position wise applied to them.
As an end user, your mileage may vary. This is still a great way to customize the game for your own private modpack, but for making repositions, assume the users will have to have same weapon mods as you had when making the mod. If you have EFT reposition they have to have EFT reposition as well, etc.
This mod requires both latest Demonized exe's to be installed on your game and draggable hud editor to be installed as well! Links below.
Based on Draggable Hud Editor, this addon adds an additional functionality which is based on 4 new variables you can add to your weapon_hud parameters.
base_hud_offset_pos = 0,0,0
base_hud_offset_pos_16x9 = 0,0,0
base_hud_offset_rot = 0,0,0
base_hud_offset_rot_16x9 = 0,0,0
By adjusting these, you can edit how your gun appears on screen, without having to adjust the aim positions at all!
Changelog:
2024-04-06
Initial Release
2024-04-07
Fixed orientation handling for base hud, now the gun will follow the mouse movements correctly.
New exe Update allows the mod to handle devices like detectors, flashlight, etc + PDA position.
Also includes an improved code for aim handling. Should look similar to how weapon aiming works.
Finally we have it! Thanks alot, this saves so much time and frustration ;)
INCREDIBLE
Awesome work dude got an alert on github for this pull/merge on github thank you lucy as well now in the mod exe's
Jesus Christ, finally easy work for EFT-like guns and gunslinger for Old World! God, those iron sights are were pain in the *** due to their stupid tilts.
Currently trying to figure out why the offsets aren't applying to devices and pda. If anything this is on the executable side of things, so when it's fixed you'll just have to update demonized exe's
For those interested, it's been figured out, once again with Lucy's help!
Next pull request should appear on Github soon
Update: Pull Request is pending
This is a marvel.
Thank you so much, finally able to fix these stupid hud_fov values from bas guns without having to go through adjustment hell.
Absolute kino mod
how to activate the editor?
To activate the editor you have to have debug mode on and tap F7
The base orientation axis are swapped, I.E. moving the mouse up and down moves it left and right, then vice versa.
Already found a fix for it. Gonna upload it in a bit
Much appreciated! Kudos for getting this done!
was this fix ever uploaded? I redownloaded today and still have flipped adjustment axis for alt rotation
how to save changes without going into the weapon config?
Unfortunately due to how the game handles things the easiest way to do this is to save the files to a debug file named cache_dbg.ltx as the draggable hud editor does.
It'll be located in [AnomalyFolder]/gamedata/configs and will contain all changes you made after clicking apply in the menu.
You'll want to find lines similar to this
[detector_advanced_hud]
base_hud_offset_pos = 0.093655, 0.004414, 0
base_hud_offset_pos_16x9 = 0.093655, 0.004414, 0
base_hud_offset_rot = -0.085972, -0.389962, 0.110292
base_hud_offset_rot_16x9 = -0.085972, -0.389962, 0.110292
Considering this requires custom exes from demonized, after you're done with adjusting you just copy every line containing "_hud" to a new ltx file. It needs to have "mod_system_" at the start for the game to recognize it as a dltx file if I remember correctly. The rest of the name is up to you.
After pasting the edited _hud files you created, make sure to add an exclamation mark (!) before every opening bracket. It will then look like this
![detector_advanced_hud]
base_hud_offset_pos = 0.093655, 0.004414, 0
base_hud_offset_pos_16x9 = 0.093655, 0.004414, 0
base_hud_offset_rot = -0.085972, -0.389962, 0.110292
base_hud_offset_rot_16x9 = -0.085972, -0.389962, 0.110292
That tells the game to overwrite those values for that specific entry created for that specific weapon or device. It's a much cleaner method than overwriting the files themselves.
awesome work!
is it possible to do something similar like the draggable hud but for icon placement? so that attachments, such as scopes, silencers or grenade Launchers are easier to place.
thanks!
that would be really awesome
Unfortunately that is beyond my skills. I don't think there are even editors for the UI elements in base game. 😅
It's tedious I know, but I do believe you can use "Reload system ltx" and then click the "reload game" buttons in debug menu which should apply the new values. I used that when tweaking a minimap mod once.
Does this work for lowered weapon position? Alt aim?
If not, would be cool to see added!
Draggable Hud Editor already supports alt aim and lowered position adjustements. Since this mod only adds additional support for newly added base hud offsets it also includes base changes from draggable hud since that mod is required ;)
Just toggle lowered position and adjust the lowered variables in the debug menu.
For alt aim, you'll want to tap V when aiming to toggle between main and alt aim. Debug Mode allows all weapons to use alt aim, regardless of settings
Hey man, your mod is awesome. Will help me alot. But Does this also work if the weapon in question have a custom hud? I'm trying to fix a bug that happens when I'm using private reposition with PPP.
Hey! I Just read your comment. I will probably make a patch for PPP, just sayin'. :)
Oh man, thank you very much. You're awesome. I totally forgot that you were already making a patch for it. By the way, I'm the guest who commented a while ago about reporting this bug. And you replied, saying you would make a patch, but my ADHD a$$ made me forget it ¯\_(ツ)_/¯. Anyway, thanks for the support. I wish the best for you.
I've been making a personal reposition after making this mod public and PPP seems to work fine.
While working on my addon I had the same idea but didn't know how to implement this. Now it's here. Great work!
it was working previously but now i get this when i get into the hud editor F7. Any ideas?
FATAL ERROR
[error]Expression : xml_doc.NavigateToNode(path,index)
[error]Function : CUIXmlInit::Init3tButton
[error]File : D:\a\xray-monolith\xray-monolith\src\xrGame\ui\UIXmlInit.cpp
[error]Line : 360
[error]Description : XML node not found
[error]Argument 0 : dbg_wpn_hud_editor:btn_third_person
[error]Argument 1 : ui\ui_debug_launcher_16.xml
stack trace:
! [LUA] 0 : [C ] Init3tButton
! [LUA] 1 : [Lua] .../anomaly/bin/..\gamedata\scripts\ui_debug_wpn_hud.script(309) : InitControls
! [LUA] 2 : [Lua] .../anomaly/bin/..\gamedata\scripts\ui_debug_wpn_hud.script(240) :
! [LUA] 3 : [C ] WpnHudEditor
! [LUA] 4 : [Lua] .../anomaly/bin/..\gamedata\scripts\ui_debug_wpn_hud.script(152) : start
! [LUA] 5 : [Lua] ...anomaly/bin/..\gamedata\scripts\ui_debug_launcher.script(455) : exec
! [LUA] 6 : [Lua] ...anomaly/bin/..\gamedata\scripts\ui_debug_launcher.script(849) : Execute
! [LUA] 7 : [Lua] ...anomaly/bin/..\gamedata\scripts\ui_debug_launcher.script(860) : OnList
! [LUA] 8 : [Lua] ...anomaly/bin/..\gamedata\scripts\ui_debug_launcher.script(873) :
Missing required mod. Install draggable hud and let this mod overwrite it
Thank you! Also I wanted to ask if you happen to have any advice on what numbers I should be around when trying to fix this position? when I aim with the AKs74u BaS with Kobra sights.
Is there any reference I should be using?
Reddit.com
Sounds like you'll have to take the weapon into debug menu with the sight on, then adjust from there. Since most sight variants have unique aim offsets it shouldn't affect anything else.