Skeleton Keys per session restriction

Hello!
Is it possible to lift restriction of one use per session for skeleton keys through modding?

I don’t mind wasting keys, but there are way to many possibilities to get locked out especially in coop game, and that kills all the fun.

It is possible to unlock gates to Steps of Torment several times, why it is impossible to do the same for the other gates is beyond me.

Thanks in advance.

Huh ? It is not possible for SoT either…

I opened the gates several times from the inside for my coop buddy. I guess that was a helpful bug. In any case I want to know where should I edit in order to make gates opened several times in one session. If it is possible of course. Since it is frustration to start from the very beginning just because the games crashed or similar matter.

its in Lua

SoT
file: scripts\game\quests\homesteadstepsoftormentbosses.lua

Line: 157

function gd.quests.homesteadStepsOfTormentBosses.epicDoorOnInteract(objectId, userId)
	
	local player = Player.Get(userId)
	local door = Door.Get(objectId)
		
	if (door != nil) then
		
		if player:HasItem("records/items/crafting/materials/craft_skeletonkey.dbr", 1, false) && doorPermaLocked == false && doorBossDead == true then
		
			-- Mark the door as locked permanently for all players
			doorPermaLocked = true
			QuestGlobalEvent("stepsOfTormentEpicDoor")
			
			-- Consume key to unlock door		
			door:Open()
			player:TakeItem("records/items/crafting/materials/craft_skeletonkey.dbr", 1, false)
			
			UI.Notify("tagNotification_WarningGatesOfAnguish")
				
		elseif player:HasItem("records/items/crafting/materials/craft_skeletonkey.dbr", 1, false) && doorLockedWarning == false && doorBossDead == true then
			--doorLockedWarning = true
			--UI.Notify("tagNotification_WarningGatesOfAnguishLocked")
			door:Open()
		end
			
	end
	
end

Bastion
file: scripts\game\quests\areadbastionofchaosbosses.lua

Line: 121

function gd.quests.areaDBastionOfChaosBosses.epicDoorOnInteract(objectId, userId)
	
	local player = Player.Get(userId)
	local door = Door.Get(objectId)
		
	if (door != nil) then
		
		if player:HasItem("records/items/crafting/materials/craft_skeletonkey.dbr", 1, false) && doorPermaLocked == false && doorBossDead == true then
		
			-- Mark the door as locked permanently for all players
			doorPermaLocked = true
			QuestGlobalEvent("bastionOfChaosEpicDoor")
			
			-- Consume key to unlock door		
			door:Open()
			player:TakeItem("records/items/crafting/materials/craft_skeletonkey.dbr", 1, false)
			
			UI.Notify("tagNotification_WarningBastionGates")
				
		elseif player:HasItem("records/items/crafting/materials/craft_skeletonkey.dbr", 1, false) && doorLockedWarning == false && doorBossDead == true then
			--doorLockedWarning = true
			--UI.Notify("tagNotification_WarningBastionGatesLocked")
			door:Open()
		end
			
	end
	
end

I havnt tested it or looked much into it, just from that function alone I assume its going to do the trick.
And Im posting the changes rather than the changed file so you can do it yourself for any future locked doors (if its working :D)

EDIT: the change will still require the player to have a key, if you dont want it remove it from the elseif so it just says


elseif doorLockedWarning == false && doorBossDead == true then
  door:Open()
end

EDIT2: .dbr possibility

records\level art\doorsinterior\door_stepsoftorment_epicdoor.dbr
records\level art\doorsinterior\door_bastionofchaos_epicdoor.dbr
autoClose,0,
autoClosePeriod,

Thanks a bunch it helped indeed.

btw I found out that DAIL had the same solution for 2 out of 3 gates.