PAYDAY 2

PAYDAY 2

查看统计:
Tactical Laser/Flashlight default enable?
Hi fellow heisters!

Is there any chance to i be able to set the laser to enable by default?
I think this could be a very basic option in the game but this is not...
I read something, that HoxHUD can solve this, but i still don't found this option.

Anybody with indo about that?
< >
正在显示第 16 - 27 条,共 27 条留言
Mr. Man! 2015 年 1 月 8 日 上午 11:35 
引用自 +Her Mr. Big Hero
a screenshot of what? i was just stating that the option u were referring to was persistent gadgets between weapon swaps and that IS NOT what the OP wanted,
he wanted an option/script/♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ option to have the laser auto turn on at the start of the game
unless u were mistaken and think the option already exists in poco?(it doesnt, not like it matters, silly lazy matter tbh but w/e)
Cool rant, man, because nothing like what he wants exists so we're redirecting him to HoxHud, which comes closest in doing what he wants in automating gadget-toggling between weapon switch.
Dr. Boom 2015 年 1 月 8 日 上午 11:54 
引用自 +Her Mr. Big Hero
[...]

Sorry, I meant to quote Mr. Man!™. Finger slipped.


引用自 Mr. Man!™
HoxHod auto enables attachments by default. There's no need for you to further tweak anything in the options menu.

Anyway I misread this, so I guess the option to enable lasers all the time doesn't exist. Tough turkeys.
Brovah (已封禁) 2015 年 1 月 8 日 下午 12:08 
if not _NewRaycastWeaponBase_on_equip then _NewRaycastWeaponBase_on_equip = NewRaycastWeaponBase.on_equip end
function NewRaycastWeaponBase:on_equip()
_NewRaycastWeaponBase_on_equip(self)
self:set_gadget_on(self._stored_gadget_on or 0, false)
end

if not _NewRaycastWeaponBase_toggle_gadget then _NewRaycastWeaponBase_toggle_gadget = NewRaycastWeaponBase.toggle_gadget end
function NewRaycastWeaponBase:toggle_gadget()
if _NewRaycastWeaponBase_toggle_gadget(self) then
self._stored_gadget_on = self._gadget_on
return true
end
Put this in any Notepad file and save it as whatever.lua. Make a folder in your payday 2 folder and drop it in there. Then after that get the IPH from Hoxhud or wherever and get a Hook file as well. Put the name of it and where it's located under persist scripts and bang. You got yourself a lazer that stays on when you switch weapons, and without the clutter and extra crap from Hoxhud.
Seven 2015 年 1 月 8 日 下午 12:26 
If you're going to post a script with no source or credits, at least use the most recent version of said script...

local on_equip_original = NewRaycastWeaponBase.on_equip
local toggle_gadget_original = NewRaycastWeaponBase.toggle_gadget

function NewRaycastWeaponBase:on_equip(...)
self:set_gadget_on(self._stored_gadget_on or 0, false)
return on_equip_original(self, ...)
end

function NewRaycastWeaponBase:toggle_gadget(...)
if toggle_gadget_original(self, ...) then
self._stored_gadget_on = self._gadget_on
return true
end
end

By the way, changing that 0 to a 1 should make it automatically enable the 1st gadget available when you first equip the weapon, which would be either the extra sight (sniper rifles), the laser (laser and laser/flashlight combo gadgets) or the flashlight (flashlight gadget). Would be possible to only do it for lasers, but I'm certainly not going to put in the effort to do that to satisfy someone who can't put in the effort to toggle the gadget on once per day of the heist.
Mother_Flowers 2015 年 1 月 8 日 下午 2:08 
You have 3 options (i will post them from easiest to "hardest")
1) Download Hoxhud
a) The option to remeber your gadget state in ON by defult so you don't even have to touch ANY options, just play the game and it will work

2) Download GoonMod
a) Go into GoonMod's options
b) Tick the box to enable the feature to remeber gadet state (near the bottom)

3) Put in all of that coding stuff that @Seven and @Brovah did. However i am pretty sure that is in the Hud's LUA file anyway so downloading Hoxhud is the easiest way of getting what you want.
最后由 Mother_Flowers 编辑于; 2015 年 1 月 8 日 下午 2:10
DrBenderPhD (TheProb) 2015 年 1 月 8 日 下午 2:31 
The

You have 3 options (i will post them from easiest to "hardest")
1) Download Hoxhud
a) The option to remeber your gadget state in ON by defult so you don't even have to touch ANY options, just play the game and it will work

2) Download GoonMod
a) Go into GoonMod's options
b) Tick the box to enable the feature to remeber gadet state (near the bottom)

3) Put in all of that coding stuff that @Seven and @Brovah did. However i am pretty sure that is in the Hud's LUA file anyway so downloading Hoxhud is the easiest way of getting what you want.

Hox and Goon offers the same, take on the laser when i swap weapons under a mission.
What i want is that the laser will be basically turned on, immediatelly the mission is started. I know, pushin 1 button is not so exhausting but i think this is need to be a very basic option in the game... "Why i allways need to turn on the laser, if could be basically turned on?"
Mother_Flowers 2015 年 1 月 8 日 下午 2:33 
引用自 TheProb_HUN
The

You have 3 options (i will post them from easiest to "hardest")
1) Download Hoxhud
a) The option to remeber your gadget state in ON by defult so you don't even have to touch ANY options, just play the game and it will work

2) Download GoonMod
a) Go into GoonMod's options
b) Tick the box to enable the feature to remeber gadet state (near the bottom)

3) Put in all of that coding stuff that @Seven and @Brovah did. However i am pretty sure that is in the Hud's LUA file anyway so downloading Hoxhud is the easiest way of getting what you want.

Hox and Goon offers the same, take on the laser when i swap weapons under a mission.
What i want is that the laser will be basically turned on, immediatelly the mission is started. I know, pushin 1 button is not so exhausting but i think this is need to be a very basic option in the game... "Why i allways need to turn on the laser, if could be basically turned on?"
Because out of all the content that Overkill either promised us (Safe House customization) or content the community have been begging Overkill for a while now (New Infamy tiers) is more important than pressing a button.......
Merc 2015 年 1 月 8 日 下午 2:59 
引用自 Panda V4
Oh i didnt know hoxhud does that. i was under the impression that overkill must have fixed it in some patch.. :( Now im dissapointed. ffs Overkill how about you fix your ♥♥♥♥♥♥♥ bugs instead of churning out DLCs.

Pretty sure that's a design decision, not a bug. Not saying I agree with it, but it is intentional.
Mother_Flowers 2015 年 1 月 8 日 下午 3:03 
Seriously though. I'd rather press a button once (twice for both of weapons) then see Overkill dervert time off from more "important" features/content
最后由 Mother_Flowers 编辑于; 2015 年 1 月 8 日 下午 3:03
Mr.Duckard 2015 年 1 月 8 日 下午 3:10 
Seriously though. I'd rather press a button once (twice for both of weapons) then see Overkill dervert time off from more "important" features/content
It wouldn't take them that much time to get lasers to just stay the hell on.
Now I have the habit to press Q every time I switch weapons, but it is kinda of annoying.
Seven 2015 年 1 月 8 日 下午 3:51 
Fine... If it doesn't work properly or if it has side-effects, you're on your own.
local on_equip_original = NewRaycastWeaponBase.on_equip
local toggle_gadget_original = NewRaycastWeaponBase.toggle_gadget
local _update_stats_values_original = NewRaycastWeaponBase._update_stats_values

function NewRaycastWeaponBase:on_equip(...)
self:set_gadget_on(self._stored_gadget_on or 0, false)
return on_equip_original(self, ...)
end

function NewRaycastWeaponBase:toggle_gadget(...)
if toggle_gadget_original(self, ...) then
self._stored_gadget_on = self._gadget_on
return true
end
end

function NewRaycastWeaponBase:_update_stats_values(...)
_update_stats_values_original(self, ...)
self:_auto_activate_laser()
end

function NewRaycastWeaponBase:_auto_activate_laser()
local gadgets = managers.weapon_factory:get_parts_from_weapon_by_type_or_perk("gadget", self._factory_id, self._blueprint)
if gadgets then
table.sort(gadgets, function(a, b)
if not self._parts[a] then return false end
if not self._parts[b] then return true end
return self._parts[a].unit:base().GADGET_TYPE > self._parts[b].unit:base().GADGET_TYPE
end)

for i, id in pairs(gadgets) do
if self._parts[id] and tweak_data.weapon.factory.parts[id].sub_type == "laser" then
self._stored_gadget_on = i
break
end
end
end
end
Stray Ferret 2015 年 1 月 8 日 下午 6:05 
引用自 Mr. Man!™
引用自 +Her Mr. Big Hero
stuff

rant?
and it does exist.
最后由 Stray Ferret 编辑于; 2015 年 1 月 8 日 下午 6:06
< >
正在显示第 16 - 27 条,共 27 条留言
每页显示数: 1530 50

发帖日期: 2015 年 1 月 8 日 上午 2:22
回复数: 27