• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Need Help Keys (?) keep resetting

Felkvir

Landlubber
So I recently decided to try this game again with the mod and I've been trying cheatmode on, but for some reason the keys remap themselves completely out of the blue. At first it was messing with my ability to pull up the sea map with f3 and the normal movement keys but I tried deleting the options file and then it works fine for a while but still reverts and now it just switches godmode numpad 0 with S, tab isn't working normally and in dialogue I can't use the normal key arrows to move between options I have to use a weird combination of the S key and space to navigate and click with mouse instead of enter. Maybe I'm blind but I have no idea what could be causing this.
 
Only explanation I can think of is that whatever garbles the options file strikes fast for you.
But we never found out where that comes from.
 
@Pieter Boelen, what about making the configurations file read-only after the user sets the desired settings? Is the configurations file written to at any other point in the game?

This may be viable workaround. You can try this out, @Felkvir: After setting everything up in the game the way you want it, in Windows, right click the options file, choose Properties, and tick the "read only" checkbox.

Just don't forget that you set the options file to read only -- meaning that the game will no longer be able to make changes to your settings until you untick that checkbox. The worst that can happen is that the game crashes or freezes when it comes to changing your settings (writing to that file) -- and that's something you can't miss happening. It's worth giving it a shot.

I use this strategy to stop games from messing with my save files (and accidentally deleting or overwriting them) -- the ones I want to keep indefinitely.
 
Last edited:
Hmm I will try that
Let us know how it goes with POTC:NH. :cheers

And, for future reference, don't forget that you set it. Don't come back here asking why new settings in the game won't save. xD
 
@Pieter Boelen, what about making the configurations file read-only after the user sets the desired settings? Is the configurations file written to at any other point in the game?
Interesting experiment.
The game writes many settings to there.
But also player save profiles.

I can't quite judge what the effect would be of read-only-ing it.
Also not sure how to do that automatically.
 
Nope, it is still happening. Seems to happen when I board an enemy ship and I press S, it starts activating godmode like that instead of numpad 0 and the other keys...
 
Nope, it is still happening. Seems to happen when I board an enemy ship and I press S, it starts activating godmode like that instead of numpad 0 and the other keys...
That's not technically possible, as it can't write to the options file, now. Also, from your description here it sounds to me like this is a script at play that rebinds your normal keys to be cheat keys. Can you reproduce it every time, doing the same thing? There must be a key that's bound to a script that is designed to overwrite your keyboard mappings. That would be my educated guess.

I bet when you quit and start the game again now, the old settings are back -- since it wasn't actually able to write the changes to the options file.
 
Ok I had to do some more testing, I thought it went away at first but basically I went into the game a third time and it doesn't work like normal anymore unless I delete the options file again (where it will be normal for a while until I assume I get into land mode and press S again). I will try Boelens suggestion and see if anything happens.
 
I thought it went away at first but basically I went into the game a third time and it doesn't work like normal anymore unless I delete the options file again...
o_O It doesn't make any logical sense for this to happen. Are you sure you've ticked the "read only" checkbox on the "options" file?

Oh, also, are you running the game in administrator mode, or just as a regular user? In the former case, theoretically, it may be possible for the game to write to the file despite the user marking it as read only.
 
Last edited:
Ok nevermind apparently THIS TIME it decides its going to return to normal after re-entering the game... I don't understand this
 
Ok nevermind apparently THIS TIME it decides its going to return to normal after re-entering the game... I don't understand this
Maybe the game didn't quit completely before you relaunched it? The thing is, when the game loads, it reads the "options" file to populate the settings and set everything up the way you set it. After that, any changes to the settings may be preserved in memory until you quit the game, but because you set the "options" file to read only, the game will not be able to write changes in the settings to that file, so when it is quit proper, the next time it loads it will load the old settings from the "options" file (the ones you've set).

Hope that makes sense.

Edit:

This doesn't solve your problem with the keyboard mapping changing in-game, however. For that we'll need to figure out what's going on there with that S key. :nerbz
 
Last edited:
Could you upload for me the "Program" folder from your game, zipped, here? That will help me track down the culprit in the code.
 
Also has @Felkvir installed the game in Program Files by any chance?
Avoid Program Files if that is the case, bad stuff can happen to your game there.
Even if it may not have something to do with your current problem, I would reinstall the game somewhere else.

Program Files = Problem Files
 
@Felkvir, please move the "Program/Controls/init_pc.c" file into a newly created "backup" folder, and copy/move the attached file into its place (unzipped, of course -- just the "init_pc.c" file).

Give it a whirl, and let me know if the problem is fixed -- or if it still persists.
 

Attachments

  • init_pc.zip
    4.9 KB · Views: 256
Okay, no worries. First step to clearing things up and finding the solution. Try the exact same thing with this attached file: "controls.c" -- same location.

Can you tell me in more detail what is actually happening when it goes beserk? Does the S key become the God Mode cheat key (which is supposed to be the numpad 0 key)? That will give me a better idea of what's going on, so I can find the cause in the code.
 

Attachments

  • controls.zip
    6 KB · Views: 235
Does the S key become the God Mode cheat key (which is supposed to be the numpad 0 key)?

Like I said, yes. Dialogue controls is also affected when it happens. Earlier TAB and the sea map movement with WASD keys was not working properly but idk how to trigger that.

The new change also didn't seem to work.
 
Back
Top