Jump to content

F4SE 0.3.00 OnKeyDown CTD?


Hoamaii

Recommended Posts

Can anyone help me figure out what I'm doing wrong?

My script compiles file, apparently RegisterForKey(69) or RegisterForControl("Activate") do register fine - but whenever I use the activate key (E on keyboard - or X on plugged-in PS3 Gamepad), I invariably CTD. Whether the Gamepad is plugged in or not makes no difference. Debugging with the bool function "UseGamepad()" tells me in game whether I'm currently using Keyboard or gamepad anyway.

Maybe I installed F4SE wrong - but I'd figure it'd be the same as in Skyrim:

- All .dll and .exe in the Fallout4 folder,
- CustomControlMap.txt in Data\F4SE (I CTD whether or not that file is in the Data folder),
- all .pex files in Data\scripts
- all .psc files in Data\Scripts\Source\F4SE - also ended up putting them in Data\Scripts\Source\User (scripts don't compile if .psc are just placed in F4SE script folder) or Data\Scripts\Source\Base - but none of that makes any difference either.

 

Am I missing something or is that function not working as good with F4SE 0.3.00?

Link to comment
Share on other sites

Hey Shavkacagarikia :)

 

I read your thread about OnKeyRegister, but that was back from last year, I figured it couldn't be the same F4SE version. Does this work for you on the latest version?

 

As far as I can tell registering the key or control doesn't - it's only pressing a key or control which makes me CTD.

 

I had a MGEF just for this testing purpose, registered the key and/or Control onMagicEffectStart, then move to a waiting state which debugs ok waiting for my key press, and then I CTD when I press the registered key or control. I didn't try all keys, just "Activate" (using 69 for the DXScanCode) and "Jump" (32). Same result.

 

Yeah, I did try to place the CustomControlMap.txt in the Fallout4.exe, that's what I had done initially, that made me CTD too, then after rereading more carefully F4SE's readme's, I moved it to Data\F4SE where they recommend to place it. But it's all the same.

 

Still I find the CTD thing very odd. I've never CTDed in F4 so far despite all my wild mod testing, usually when you have a script error nothing happens, but you don't CTD. If 69 was an unrecognized DXScanCode, I'd CTD on RegisterForKey, right? Or at least get an error in my Papyrus log, but there's nothing there. I then thought it was an input error and tried to plug in another keyboard, then plug in a gamepad... it's all the same.

Link to comment
Share on other sites

Well, I have registered and tested all of the key presses and then listed them in DXScan code page for fallout 4 wiki. And even though some of the keys which are used by game like alt or control never fire, I have never encountered CTD. I can't think of what can be a problem when CTD happens for you.

 

P.S have you placed src folder in fallout 4 folder?

Link to comment
Share on other sites

Oh, I didn't know it was you, sorry - thanks a lot for that DXScanCodes page on the Wiki, Fallout 4 Wiki is terribly lacking information, it's great that people like you are filling gaps!

 

No, I didn't try placing the src folder anywhere in my game folder, I thought that folder was only useful to people trying to develop new API which is way beyond my grasp. Did you need it to test these keys?

 

I'll try that when I get back to my modding PC. Thanks for replying again, Shavkacagarikia! :)

 

On second thoughts, I've also noticed that I have a ControlMap_Custom.txt file (or something like that) in my C:\User\Documents\MyGames\Fallout4 - I assumed it was created the 1st time I launched the game with all the .ini files and updated whenever I reassigned keys, but now I wonder, do you have that too? Could it conflict with F4SE CustomControlMap.txt?

 

 

PS. Kind of off topic, sorry, but I'm pretty sure you've tested that too having read many of your topics, would you know if "WeapEquip" is the proper AnimEvent to call on the Player drawing weapons? It should be according to the Animation tab but I've been trying to detect when the player draws weapons through a simple debug script and it doesn't return. Unless maybe it only returns for NPCs?

Link to comment
Share on other sites

Thanks for your kind words :). Ok, Then probably lacking that src folder was causing CTD, I also have that .txt file in documents folder so that can't cause the problem. And about WeapEquip, it doesn't fire as far as I know, I suggest to use weaponDraw for detecting weapon draw. (there is also weaponSheathe too which fires fine with sheathe if you need it)

Link to comment
Share on other sites

Well, I give up, I've been trying everything and I still get CTDs when trying to detect a key press... I've tried adding the src folder to the root folder of the game, then in the F4SE folder... to no avail. I still CTD.

 

I'm starting to think it's an issue on my end, either hardware or software. After rummaging through forums, I realised most people don't have both keyboard and Gamepad working together in this game, whereas I do, I've been able to use both together from day one. I wish unplugging the gamepad was enough to solve my issue but it isn't. Either it's native to my laptop or it's something I've done to it while modding Skyrim or the Witcher on it, but I can't remember what.

 

Anyway, for the time being I've uninstalled F4SE to finish my mod because I'll have to find some other way to make it work anyway (I'll probably reinstall it later, it's just the key detection that doesn't work for me). Besides, it'll probably be all for the better if I can upload a mod which does not require a full install of F4SE, scripts, src folder and all...

 

I meant to ask you, Shavkacagarikia, if you don't mind - I've met quite a few times here these past several weeks in the topics that match my current interests, are you working specifically around animations?

Link to comment
Share on other sites

Well, I had to work quite a lot with them (If you have seen my lever action rifle fix that I have released recently). But unfortunately I can't make new animations or something like that, just CK stuff.

Edited by shavkacagarikia
Link to comment
Share on other sites

Sorry, no, can't say that I have seen it :blush:, I don't play much when I work on a mod, I tend to remain stuck at the same test save until I'm done...

 

Can't make new animations either (not that I don't wish I could!..), only CK stuff too but fiddling with Vanilla animations right now, yes. I hate that they're all broken into tiny sequences with enigmatic namings (like "PoseB_IdleFlavor3") and you have to upload them one by one in a Loose editor to be able to visualize what they do!.. Looking for the tiny sequence which attaches chopsticks to NPCs hands for the moment... Pfff... Needles in a hay stack!.. (Nope, of course, it's not in the related furnitures animations folders...).

 

What are you working on?

Link to comment
Share on other sites

Currently I don't work on anything new, just supporting the fix I have talked about earlier (I have also made a tutorial for mod authors to add bullet counted reload to their guns).

Edited by shavkacagarikia
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...