Where are key bindings in OBSE stored?

Post » Fri May 04, 2012 11:37 am

Hey guys my question actually started from a problem situation with Fallout3/FOSE. Since the functionality between FOSE and OBSE is pretty similar and I can't as yet find an answer I thought I'd ask here as well.

So, I have two mods that both have the ability to change a hotkey for their respective menus ingame. This what happens:

1) Enter mod #1's menu and assign the hotkey to "G"
2) Since that key is the default for mod #2 I enter that menu and change the hotkey back to "G"
3) Now if I hit "G", mod #1's menu comes up not mod #2

So what I want to know is twofold: What gives precedence to one mod's variable over another? But more importantly where are these variables stored so that between games the same hotkeys are defined?

None of the mods I have that use hotkeys use *.ini files or are there any logfiles that record these changes.

I am not looking at where inside the mod's scripts these variables are changed, I know this and can easily see what is going on and even make edits to the default keys.

Also the steps are overly simplified and not the ones that actually take place in game. I have just tried to strip it down to the bare minimum.

Thanks in advance
User avatar
Mackenzie
 
Posts: 3404
Joined: Tue Jan 23, 2007 9:18 pm

Post » Fri May 04, 2012 11:22 am

A partial answer:

In Oblivion, if a mod uses OBSE key-press detection functions (OnKeyDown, IsKeyPressed, etc) the mod will detect the key-press, regardless of whether or not other mods (or even the game engine) use that key.

In other words, both mods would detect the key and should react accordingly.

Hotkeys assigned dynamically must be stored somewhere in the mod and saved with the savegame.
Persisting a given configuration over to a new game, requires the mod to write to some external file. In Oblivion, this is possible with Pluggy (an OBSE pluggin that adds functions to read and write INI files). Maybe other pluggins (Conscribe, maybe).
User avatar
koumba
 
Posts: 3394
Joined: Thu Mar 22, 2007 8:39 pm

Post » Fri May 04, 2012 11:34 am

Great, now I'm going somewhere. I remember in my Oblivion setup having Pluggy installed to handle such things, but there is nothing I've found like it for Fallout.

Clearly the savefile stores the assigned hotkeys but I can't see where or even want to start looking.

I have found, at least with FOSE, the command "IsControl" which provides feedback when setting a hotkey that the keypressed is used by the game. ie. 'W' 'A' 'S' and 'D' and therefore can't be used in gamemode. Also there is "SetIsControl" which it says quote:

" Flags a key or mouse button as a control, allowing modders to define custom controls - other scripts can then use IsControl to detect conflicts in which two mods try to use the same key for different actions."

This is more of where I need to look I think.

If anyone else has got input, don't bother here. I'll go back to the Fallout3 forum and continue from there.

Thanks QQuix.
User avatar
lillian luna
 
Posts: 3432
Joined: Thu Aug 31, 2006 9:43 pm


Return to IV - Oblivion