Friday 2 July 2021

Progress update

So just a little progress update.

Things have stalled a little as I've changed jobs and currently don't have much free time to work on none work projects. But I will still get there!

Tuesday 6 April 2021

Vertex data extraction

Still making progress on automated model extraction.

So far automated vertex extraction is pretty much finished.

Here's some vertex data pulled from the Character section of the game files.

And here's some vertex data extracted from the level files as the format is luckily the same.

You can clearly see there is a model lurking in there :)

The next challenge is getting the face data that goes along with these so that you can see the actual models properly. This is about 50% done.

After that is working then it's onto automated rebuilding of the game files from extracted data and then we can start trying to modify the models!

Monday 29 March 2021

More modding progress

So a few things have moved on:

Shaders fix for A Dangerous Voyage

I've published the shaders fix for A Dangerous Voyage as a Vortex mod here to make it easier for everyone to apply.

Windowed mode

I've also got DCoTEHook now reading the <WinWindowed>0</WinWindowed> xml setting and hooking Direct3D so that the game now runs windowed if that is set to 1. This makes testing things in the game much easier!

You can either change the xml yourself or there will be a Vortex mod to do it for you.

This will be published soon in the next version of the DCoTEHook mod once I've wrapped some other things up.

Model extraction

I needed some help getting started with extracting the character models. I'd managed to work out roughly where they were in the games files so went to the experts over on XeNTaX Game Research Forum. User shakotay2 managed to show me a tool and an example model extract to get me heading in the right direction so hopefully I can make some progress now.

Saturday 6 March 2021

Injecting XML into the Steam version

So using DCoTEHook I've managed to get the Steam version of the game loading in modified xml settings.

This means access to the debug menu, reach arm, picking start level etc for people who bought the game on Steam.

Hopefully this will also allow introducing the GOG fixes to fps that will fix the scripting issues.

At the moment I had to modify C:\Steam\steamapps\common\Call of Cthulhu\install.vdf to point to the Hook instead of the main executable which whilst not ideal from a Vortex modding point of view will do for now.

EDIT: Thanks to advice from the Nexus Mods forum I've now worked out that you just need to set an env var of SteamAppId=22340 when launching the Steam exe to not have to change install.vdf. The updated 0.4 hook has now been uploaded and awaiting approval.

So next task is getting DCoTEHook to load patch files to patch the exe on startup.

Thursday 4 March 2021

Vortex mods are now uploaded

I've uploaded the vortex mods and the hook, as it's an exe, has now been approved as safe.

You need the Vortex game support mod first

And then the DCoTEHook mod

So far this is only working with Retail and GOG versions, but seeing as we are now hooking into the exe it may be possible to get the Steam version working.

Next up is adding in a mod that will patch the exe to sort the bugs. So that's the 60fps lock and shader fixes that are in the GOG version.

To patch the main exe I'll likely use a DCoTEHook0.patch file in the mod that the Hook will look for to determine which bytes to patch in the exe so that I don't need to publish the exe or copy it into the mods directory.

I also don't know if I can publish the fixed shaders in a vortex mod, although they are transformed, as they aren't really my work. So I may have to take a similar approach of copy from base and patch.

(I've allowed donations on the mods pages so that if anyone wants to donate they can. All donations will be sent on to Kings Heath Cat Club Rescue [] where I adopted my awesome Cuculla from <3)

Saturday 27 February 2021

Hook updated to dump and load xml settings

The hook has now been updated to dump the xml values from the exe into the mods\Settings directory when it is first run.

On subsequent runs the xml values are loaded in to the exe before it is started.

So you can now change all the xml values without needing to change your base install or run the patch.

As the files are loaded into fixed memory areas in the exe you must not exceed the original length of the file. You can usually remove some comments etc if you need extra space after your changes.  The hook will warn you if you have exceeded the original length and not load the xml in.

Tuesday 23 February 2021

Adding mod support

So it turned out that someone had already run my toolset and published updated textures to Nexus Mods (Sharp Corners of the Earth). This is good as it allows me to concentrate on what I was going to do next.

Which is...

Adding support for DCoTE to Nexus Mods mod manager Vortex :)

So I've created a DCoTE game extension for Vortex which installs the Sharp Corners of the Earth texture mod into a mods directory inside your game install. Vortex does this by downloading the mod zip, extracting it to its own staging directory and then creating symlinks to the files into your games mods directory. This makes it really easy to enable and disable mods at will.

This was all great but of course the CocMainWin32.exe wasn't going to go looking in that mods directory for mods.

Something I'd been planning on doing for a long time is looking into hooking into CocMainWin32.exe so that I can then modify things at runtime instead of patching the exe up front. And to get the game to look for mod files I can use the same method to hook into it's file opens and decide to open the mod file or the games original file.

So that's what DCoTEHook is all about. Hooking into the games file opens so that it can pick up the symlink files that Vortex has put in the mods directory. This can work without Vortex of course if anyone is interested in trying it whilst I polish up the Vortex game extension for release.

Maybe I can get it to load in the xml settings section in the game from an external file in the future.