PAYDAY 2
Rob 18 Thg04, 2016 @ 10:01am
[Help needed] Restoration Mod and HudList Problem
Here's my problem.

I just switched from uHud Vanilla to Restoration Mod as my main hud, but I'm encountering a compatibility problem with HudList. On uHud the HudList info would display with a problem, but Restoration Mod prevents any of the info boxes from being seen. I know that it's not all info box type mods that get blocked though, because HoloInfo still works if I turn it on - it's just HudList that doesn't.

I like having a mod that tells me how many loot bags are left/how many I've found so far and many key cards and crowbars are left, so I don't want to just switch over to HoloInfo and forget about HudList.

Does anyone here know a solution that will enable me to run both Restoration Mod and HudList successfully?
< >
Đang hiển thị 1-15 trong 19 bình luận
test1 18 Thg04, 2016 @ 10:20am 
Find
mods\HUDRESTORATION\lua\HUDManagerNew.lua
and replace it with the following
http://pastebin.com/uWwE7tv8
Lần sửa cuối bởi test1; 19 Thg04, 2016 @ 9:49am
Joe Biden 18 Thg04, 2016 @ 10:40am 
UHud has infoboxes???
Seven 18 Thg04, 2016 @ 11:29am 
Restoration mod replaces a lot of functions for no reason I'm aware of, the most important one in this case being HUDManager:_setup_player_info_hud_pd2(). Easiest way to fix it is to change the priority of the HUDList script in the mod.txt file so that it loads after Restoration mod. Alternatively, find that function in the Restoration mod code and add the following line at the end of it:
managers.hudlist = HUDListManager:new()

Nguyên văn bởi test1:
Find
mods\HUDRESTORATION\lua\HUDManagerNew.lua
and replace it with the following
http://pastebin.com/5HtSQs7i

That code is going to break revive waypoints unless I'm mistaken.
test1 18 Thg04, 2016 @ 11:43am 
It's the default restoration mod code with the HUDManager:_setup_player_info_hud_pd2()
override
Is there a way to get the changes in font without using that function
Lần sửa cuối bởi test1; 18 Thg04, 2016 @ 11:48am
Joe Biden 18 Thg04, 2016 @ 11:54am 
Any chance of getting JackHud and Restoration Mod working together?
Rob 18 Thg04, 2016 @ 12:01pm 
Nguyên văn bởi Seven:
Restoration mod replaces a lot of functions for no reason I'm aware of, the most important one in this case being HUDManager:_setup_player_info_hud_pd2(). Easiest way to fix it is to change the priority of the HUDList script in the mod.txt file so that it loads after Restoration mod. Alternatively, find that function in the Restoration mod code and add the following line at the end of it:
managers.hudlist = HUDListManager:new()

Nguyên văn bởi test1:
Find
mods\HUDRESTORATION\lua\HUDManagerNew.lua
and replace it with the following
http://pastebin.com/5HtSQs7i

That code is going to break revive waypoints unless I'm mistaken.

First, thanks a bunch for HudList. Love it.

Second, my apologies for this, but I'm unclear where I should paste the code. I tried setting the priorities but it didn't have an effect, although I may have done it wrong. Where should I paste the "managers.hudlist" code line?
Rob 18 Thg04, 2016 @ 12:03pm 
Nguyên văn bởi $teamedRevenge:
UHud has infoboxes???

No. I used HudList WITH uHud and HudList's info boxes showed up fine. Now I'm using HudList WITH Restoration Mod, but HudList's info boxes aren't showing up.

Nguyên văn bởi test1:
Find
mods\HUDRESTORATION\lua\HUDManagerNew.lua
and replace it with the following
http://pastebin.com/5HtSQs7i

Thanks for the help.

Hopefully I can figure out Seven's solution so I don't have to risk breaking revive waypoints, but this might end up being the only fix.
Lần sửa cuối bởi Rob; 18 Thg04, 2016 @ 12:05pm
test1 18 Thg04, 2016 @ 12:05pm 
inside the following function
function HUDManager:_setup_player_info_hud_pd2()
managers.hudlist = HUDListManager:new()
rest of code
end
Rob 18 Thg04, 2016 @ 12:07pm 
Nguyên văn bởi test1:
inside the following function
function HUDManager:_setup_player_info_hud_pd2()
managers.hudlist = HUDListManager:new()
rest of code
end

Ok, I feel like a real idiot, but where can I find that function? I must be missing it in the mod files.
test1 18 Thg04, 2016 @ 12:16pm 
mods\HUDRESTORATION\lua\HUDManagerNew.lua
Seven 18 Thg04, 2016 @ 12:21pm 
Edit: Ninja'd

Nguyên văn bởi test1:
It's the default restoration mod code with the HUDManager:_setup_player_info_hud_pd2()
override
Is there a way to get the changes in font without using that function

The pause_timer attribute of waypoints is using a malformed condition. I'm not 100% that it's used, but I think revive waypoints uses the pause_timer parameter, and if that is set then you end up with a false value and the game will crash when it attempts to use it for an arithmetic operation. But like I said, I could be mistaken.

What font are you talking about?

Nguyên văn bởi $teamedRevenge:
Any chance of getting JackHud and Restoration Mod working together?

I'm not directly involved in JackHud development, but I would imagine that if the HUDList script in JackHud is not working, then the problem is the same as this one and solved the same way.

Nguyên văn bởi Rob:
Second, my apologies for this, but I'm unclear where I should paste the code. I tried setting the priorities but it didn't have an effect, although I may have done it wrong. Where should I paste the "managers.hudlist" code line?

Like I said, the easiest solution would be to change the priority value in the mod.txt file of the HUDList script. Restoration mod replaces a critical function, HUDList doesn't. As long as Restoration loads first, the HUDList script will hook into the replaced function instead and all should be well. It will also (probably) keep working if you update Restoration since no code is altered if you do it this way.

But, if you have to edit the code yourself for some reason, then you need to find in which file the function is defined (according to test1, the file is "mods\HUDRESTORATION\lua\HUDManagerNew.lua") and edit it directly. It should look like this:
function HUDManager:_setup_player_info_hud_pd2()
<bunch of code lines that are already here>

managers.hudlist = HUDListManager:new()
end
Lần sửa cuối bởi Seven; 18 Thg04, 2016 @ 12:22pm
Seven 18 Thg04, 2016 @ 12:42pm 
Nguyên văn bởi test1:
the above code is the only code added by restoration mod to function HUDManager:_setup_player_info_hud_pd2()
and it's mainly font related code

And the rest of the function is not relevant. It should be using a function pointer to hook into that function rather than replace it entirely. The code you posted does, but last time I looked (which was admittedly a long time ago and for exactly this reason), Restoration mod doesn't. If there's a reason for why I didn't see it, but it results in it potentially breaking mods that use the same function unless you get lucky with the load order.
Rob 18 Thg04, 2016 @ 12:45pm 
Nguyên văn bởi Seven:
Edit: Ninja'd

Nguyên văn bởi test1:
It's the default restoration mod code with the HUDManager:_setup_player_info_hud_pd2()
override
Is there a way to get the changes in font without using that function

The pause_timer attribute of waypoints is using a malformed condition. I'm not 100% that it's used, but I think revive waypoints uses the pause_timer parameter, and if that is set then you end up with a false value and the game will crash when it attempts to use it for an arithmetic operation. But like I said, I could be mistaken.

What font are you talking about?

Nguyên văn bởi $teamedRevenge:
Any chance of getting JackHud and Restoration Mod working together?

I'm not directly involved in JackHud development, but I would imagine that if the HUDList script in JackHud is not working, then the problem is the same as this one and solved the same way.

Nguyên văn bởi Rob:
Second, my apologies for this, but I'm unclear where I should paste the code. I tried setting the priorities but it didn't have an effect, although I may have done it wrong. Where should I paste the "managers.hudlist" code line?

Like I said, the easiest solution would be to change the priority value in the mod.txt file of the HUDList script. Restoration mod replaces a critical function, HUDList doesn't. As long as Restoration loads first, the HUDList script will hook into the replaced function instead and all should be well. It will also (probably) keep working if you update Restoration since no code is altered if you do it this way.

But, if you have to edit the code yourself for some reason, then you need to find in which file the function is defined (according to test1, the file is "mods\HUDRESTORATION\lua\HUDManagerNew.lua") and edit it directly. It should look like this:
function HUDManager:_setup_player_info_hud_pd2()
<bunch of code lines that are already here>

managers.hudlist = HUDListManager:new()
end

Nguyên văn bởi test1:
if not self:exists(Idstring("guis/mask_off_hud")) then managers.hud:load_hud(Idstring("guis/mask_off_hud"), false, false, true, {}) end if self:alive( "guis/mask_off_hud" ) then self:script("guis/mask_off_hud").mask_on_text:set_center_y( hud.panel:center_y()/1.5 ) self:script("guis/mask_off_hud").mask_on_text:set_font( Idstring("fonts/font_medium_shadow_mf") ) self:script("guis/mask_off_hud").mask_on_text:set_font_size(32) else log("[RESTORATION] DANGIT!") end
the above code is the only code added by restoration mod to function HUDManager:_setup_player_info_hud_pd2()
and it's mainly font related code

Do I not have the right version of Restoration Mod? I don't have that section of code in that file. This is what I have. I re-downloaded and extracted the mod files again, but I only have the code I pasted below.

http://pastebin.com/920EmzNv
Lần sửa cuối bởi Rob; 18 Thg04, 2016 @ 12:46pm
Seven 18 Thg04, 2016 @ 12:47pm 
Upload the entire mod code, I'll take a look. Or, again, try the priority thing instead.
Rob 18 Thg04, 2016 @ 1:16pm 
Nguyên văn bởi Seven:
Upload the entire mod code, I'll take a look. Or, again, try the priority thing instead.

That previous paste is the entire code for HUDManagerNew.lua. Here's the mod.txt code.

http://pastebin.com/pLNgqEpY

Thanks a ton for the help.

Edit: In case you need them, here's the Core.lua and then CoreLevel.lua code.

http://pastebin.com/c22t9E8J

http://pastebin.com/GR7AhRV0
Lần sửa cuối bởi Rob; 18 Thg04, 2016 @ 1:21pm
< >
Đang hiển thị 1-15 trong 19 bình luận
Mỗi trang: 1530 50

Ngày đăng: 18 Thg04, 2016 @ 10:01am
Bài viết: 19