Jump to content

HELP! Latest creation kit, latest Papyrus compiler. Can't compile any scripts that refer F4SE functions.


Recommended Posts

Posted (edited)

Hello ! 

I am trying to do a pretty by-the-book Registerforkey/OnKeyDown script to map something on a hot key, but I can't get the Fallout CK to compile. 

The correct F$SE is deployed in that folder, including source scripts (and compiled pex ones). 
They are all in the correct folders in sources as far as I can tell.
Still, the compiler tells me 

[....].psc(163,1): RegisterForKey is not a function or does not exist
[...]psc(402,0): new event onkeydown cannot be defined because the script is not flagged as native


Does anyone know what might be the issue? 

I tried also to to install the Creation Kit platform extender , https://www.nexusmods.com/fallout4/mods/51165 ?  
No,  the platform extended didn't make a difference ;_;


Furthermore: 

If I do recompile the F4SE source script, ScriptObject.psc (where RegisterForKey is found/defined)  with my CK Papyrus compiler,  it does compile but RegisterForKey is taken out and no longer present in the compiled ScriptObject.PEX !
(but it is present in the precompiled pex from the F4SE zip file -assuming the author was compiling it with the pre NG compiler though) 

Additionally any source scripts for any mod that otherwise work fine for usage, with their precompiled PEX files, if I try to recompile them with my CK papyrus compiler, they fail to re-compile with similar errors about  inexisting functions (the f4se functions specifically) 

Do I need to install some patches to the CK papyrus compiler, so it can see and compile the F4SE -specific functions?
Maybe it is a problem with the latest NG creation kit papyrus compiler?
Do I need to roll back the papyrus compiler in the CK?

 

Edited by MSM_Alice
typos
  • MSM_Alice changed the title to HELP! Latest creation kit, latest Papyrus compiler. Can't compile any scripts that refer F4SE functions.
Posted

The F4SE source code folder is wrong by default.

 

It should be in: Data/Script/Source/F4SE/User

 

The original file forgot one of those folders.

Posted (edited)

Thank you for pointing me in the right direction, to look for what is the proper location of those script in the sources

 

I tried to put them as provided by the author- nope
Data/Script/Source/F4SE/User -nope 
Data/Script/Source/User/F4SE - nope
Data/Script/Source/User/ - nope 


It was neither of the above paths, but in fact, it needed to overwrite the vanilla script version sources in
Fallout 4\Data\Scripts\Source\Base\"  (all extracted from the zip when the CK installed, now for good measure, I got  the zip removed from that folder) 

Once I put them there, the scripts compiled, and keypressed worked as expected!

Edited by MSM_Alice

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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