The Hatch

Something I wanted to do for my houses revamp mod was to add cellars and basements to the NPC homes. This had been done for taverns in the Taverns Redone mod and temples in Finding My Religion. The stumbling block I quickly hit was that the Transparent Windows mod, by moving the house interiors within the exterior model caused the ground level to appear under the floor. For the above mods a workaround was implemented by Transparent Windows developer Macadaynu, but my houses were more numerous. Rather than expecting them to spend countless hours cutting holes in the ground for each and every building I put a basement in I came up with another solution. I would just place a static trapdoor in the floor that would act like a ladder and teleport the player between two markers. Such already exists for attic access. This would merely require the hatch to act like a ladder.


Or perhaps not.

The hatch model itself was relatively simple. I merely exported the model (54001) for the existing dungeon trapdoor from Daggerfall Modelling, loaded it into Blender, shrunk it by about 50% and saved it into my mod directory for compilation into a dfmod.


I was hoping I could just set the hatch as an additional model for the ladder already set up and working in the game. However the ladder functionality is set to use the constant modelID, 41409. New code would have to be written to have the hatch or any other additional ladder models utilise the ClimbLadder() function. The major problem for me lay in the fact that I don’t code and know nothing about the language used, which was C#. So a simple solution turned quickly into a requirement to learn an an entirely new skill.

There is some very terse information on models at other than that I’ve been looking at PlayerActivate.cs and DaggerfallLadder.cs on the advice of KAB on the forums/Discord as well as KAB’s own code for using ladders in the Location Loader mod, LocationModLoader.cs

I’ve put what I’ve done so far on Github. Hopefully I’ll get it working soon. At the moment the console registers that I’ve activated the hatch but the code to move the player doesn’t activate.

Something to say?