Heinzelman Posted August 6 Author Posted August 6 (edited) 30 minutes ago, Uthan The Perverse said: I guess I'll try recompiling the AAF scripts and see if that resolves the issue. The compiler seems to miss the original pex file, and i think its happening because it is packed into a BA2 file. Put these in the scripts folder too: (so its LittlePawn\Scripts\LPS_) LPOriginalScripts.7z I hope that fixes the error Edited August 6 by Heinzelman
Uthan The Perverse Posted August 8 Posted August 8 No dice even with thise scripts. As a workaround I tried putting some arbitrary caps in the drifter's inventory by editing the actor, but for some reason thats not working either: The drifter only has less than 10 caps in his inventory all the time even though I added a Caps001 with count as 175. BTW, do you use the creation kit platform extended? Because I don't use it. Could it be what's needed for this mod?
dav42 Posted August 8 Posted August 8 (edited) 1 hour ago, Uthan The Perverse said: BTW, do you use the creation kit platform extended? Because I don't use it. Could it be what's needed for this mod? CKPE doesn't change Papyrus or the Papyrus compiler, it's more about stability & UI improvements for the editor. Generally the approach is to look at the compiler output, and for each failed dependency you identify the source mod required (the hint of what is required is essentially the same as what the mod requires to run, plus any soft requirements of the mod or any of it's dependencies -- that's where things can get messy, it's far worse on Skyrim), install it in your mod manager, deploy/enable/whatever your mod manager requires, and then run CK under the mod manager. I don't know what mod manager your using, but in MO2 you add CK as a executable and you run it with the same mod loadout that is required to compile scripts or edit plugins, but that is because MO2 uses a virtual filesystem. The only thing that you *might* need is this mod (but Heinzelman can probably confirm, I just always use this mod): https://www.nexusmods.com/fallout4/mods/44959 That mod not only strips information about the folder where things are compiled, but also adds support for some more complex Papyrus structures which apparently the runtime supports but the compiler doesn't (??). I don't recall if AAF_API does nested structs, but Hydra & PCL did, so you may not need it. What might be useful is if you post the compiler output. There is a log window that shows the output. Edited August 9 by dav42 1
dav42 Posted August 9 Posted August 9 (edited) 1 hour ago, Uthan The Perverse said: BTW, do you use the creation kit platform extended? Because I don't use it. Could it be what's needed for this mod? Where did you install the source scripts by the way, what does the folder structure look like under Data? It should be: Scripts\Source\User\LPS_\... (at least this works for me) Inside the scripts source zip for this mod you would strip off the first directory and drop Source into Data\Scripts folder. Although I would assume CK would have trouble finding the scripts if it wasn't in the right place, but never using CK for Papyrus editing/compiling I guess I wouldn't know (I use a batch file that just runs PapyrusCompiler.exe). In any case, the original script compiled fine for me (at least this specific script did not need the compiler patch): Spoiler Papyrus Compiler Version 2.8.0.4 for Fallout 4 Copyright (C) ZeniMax Media. All rights reserved. Compile start: 20:07:06.249 Sat, 08 Aug 2026 Starting 1 compile threads for 1 files... Compiling "LPS_:Fragments:Quests:QF_LP_ShroudIntro_04003CDD"... Compilation succeeded for LPS_:Fragments:Quests:QF_LP_ShroudIntro_04003CDD. Compile end: 20:07:10.964 Sat, 08 Aug 2026 Elapsed time 00h 00m 04.71s Batch compile of 1 files finished. 1 succeeded, 0 failed. Edited August 9 by dav42 1
Heinzelman Posted August 9 Author Posted August 9 5 hours ago, Uthan The Perverse said: No dice even with thise scripts. As a workaround I tried putting some arbitrary caps in the drifter's inventory by editing the actor, but for some reason thats not working either: The drifter only has less than 10 caps in his inventory all the time even though I added a Caps001 with count as 175. BTW, do you use the creation kit platform extended? Because I don't use it. Could it be what's needed for this mod? I didnt use any CK extensions. You can give it a shot, but that shouldnt be the reason. Also try what dav42 recommended. I would check if compiling works at all: load the CK with Fallout4.esm only, create a new quest, save the esp and then put a basic script on a stage, like Debug.Notification("Test"). If it compiles, your CK should be in order. Otherwise I would try to reinstall it (helped me once). In that case the CK put the base scripts in the MO2/overwrite folder, which is not normal, but it worked.
Uthan The Perverse Posted August 9 Posted August 9 6 hours ago, dav42 said: Where did you install the source scripts by the way, what does the folder structure look like under Data? It should be: Scripts\Source\User\LPS_\... (at least this works for me) The psc files are in `Data/Scripts/Source/User/LPS_` in the mod directory of MO2. I put the pex files from @Heinzelman's previous post in `Data/Scripts/LPS_` directory. The thing is that when I view the combined directory structure in MO2 in the Data directory, every seems to be in place. How do you compile using the bat file? Perhaps I could try that as well. 2 hours ago, Heinzelman said: I would check if compiling works at all: load the CK with Fallout4.esm only, create a new quest, save the esp and then put a basic script on a stage, like Debug.Notification("Test"). If it compiles, your CK should be in order. Otherwise I would try to reinstall it (helped me once). In that case the CK put the base scripts in the MO2/overwrite folder, which is not normal, but it worked. Yeah, let me try this first. Perhaps it's some fundamental issue with CK.
Uthan The Perverse Posted August 9 Posted August 9 7 hours ago, dav42 said: I don't know what mod manager your using, but in MO2 you add CK as a executable and you run it with the same mod loadout that is required to compile scripts or edit plugins, but that is because MO2 uses a virtual filesystem. Yeah, I'm using MO2. 7 hours ago, dav42 said: I don't recall if AAF_API does nested structs, but Hydra & PCL did, so you may not need it. It didn't say anything of the sort on AAF's wiki, I guess I can ask in their discord.
dav42 Posted August 9 Posted August 9 1 hour ago, Uthan The Perverse said: How do you compile using the bat file? Perhaps I could try that as well. This is what my ScriptCompile.bat looks like (yep, FO4 is installed in C:\Program Files (x86) and it works perfectly): SET D=C:\Program Files (x86)\Steam\steamapps\common\Fallout 4 "%D%\Papyrus compiler\PapyrusCompiler.exe" "%1" -f="%D%\Data\Scripts\Source\Base\Institute_Papyrus_Flags.flg" -i="%D%\Data\Scripts\Source\User;%D%\Data\Scripts\Source\Base" -o="%LocalAppData%\ModOrganizer\Fallout 4\overwrite\Scripts" -op pause I dump the output into my MO2 overwrite folder and then move it into a patch mod. This uses the same import folders that CK uses, it expects things in Data\Scripts\Source\User. I usually run CK once to unpack Base. I run a command prompt under MO2, and just run the batch file there. The actual output of the compile would be useful. If it doesn't say 1 succeeded then you have a problem. If it does, then you might need to check where the output is going, CK should write it back to the Data\Scripts folder in the right folder structure (same structure under Data\Scripts\Source\User). If it is succeeding then check if the pex file is written there. If it is, then as suggested write a Debug.Notification in the script to see if it is firing, you may be looking at the wrong script or quest stage. The other thing you can do if everything is indeed compiling is in your fallout4custom.ini you can add this section to enable Papyrus logging: [Papyrus] fPostLoadUpdateTimeMS=500.0 bLoadDebugInformation=1 bEnableLogging=1 bEnableTrace=1 You should find the logs in your Documents\My Games\Fallout4\Logs\Scripts, Papyrus.0 should be the most recent game start. Don't be alarmed at all of the warnings & errors, yes they are problems, but they may not actually affect anything. It's often because variables can have a None value and people often don't check for it properly. But look out for the script you modified and see if it has any runtime errors. There really is no reason CK shouldn't work, unless you changed the default settings for the compiler. I do use CKPE, but it shouldn't make a difference, Bethesda built the game without CKPE.
Uthan The Perverse Posted August 9 Posted August 9 Ok, so I tried creating a new esp using only Fallout4.esm as a dependency. The compilation fails as usual when compiling the script after running CK via MO2. However, if I run the CK directly through Steam, the compilation succeeds. I tested this by moving the esp and fragments from the MO2 overwrite directory to the main game's directories: Data for the esp and Data\Scripts\Source\User\Fragments\Quests directory for the psc. After compiling, I can see the pex file in the Scripts\Fragments\Quests directory. Haven't tried it in-game yet since it's late night where I am right now, but I think this should work. So, I guess we can narrow down the issue to MO2 or the way it's launching CK.
dav42 Posted August 9 Posted August 9 1 hour ago, Uthan The Perverse said: So, I guess we can narrow down the issue to MO2 or the way it's launching CK. No issues here with MO2 running CK and compiling things, so it's something with your setup. Tested w/ CK 1.11.137.0 + CKPE 0.6b639 & CK 1.10.162.0 + CKPE 0.6b639. Perhaps paste the compile output window, otherwise it's something your probably going to have to figure out for yourself. You can try putting it into AI and see if it can guide you. Maybe rename CreationKitPrefs.ini (should be in your game root) and see if going in with default settings for CK works (you can rename it back). Below is what your executable in MO2 should look like, you need the app id override, if that is missing then perhaps that is your problem (although you usually get an application load error if it is missing). If you don't have CKPE, then I would install it in MO2 -- it's possible it improves compatibility with MO2 but somehow I doubt it.
jaam Posted August 10 Posted August 10 How many scripts source should you have ? I had issues with MO2 not reliably referencing all my scripts before the CK started and led to random missing scripts during compilation.
Heinzelman Posted August 10 Author Posted August 10 (edited) 4 hours ago, jaam said: How many scripts source should you have ? I had issues with MO2 not reliably referencing all my scripts before the CK started and led to random missing scripts during compilation. The CK normally installs or offers to install the basic source scripts by itself, when its started for the first time. You need basically these and if you use functions from other mods, you need their sources too. Like AAF for example. Edited August 10 by Heinzelman
jaam Posted August 11 Posted August 11 What I meant was that at a time I had all the Beth sources plus the common framework, then AAF and the ususal AAF mods and it was all too much for MO2 when starting the CK. I moved the same set of files to vortex and I no longer had compilation issues in CK.
Uthan The Perverse Posted August 14 Posted August 14 I observed a strange behaviour: If I were to compile non-namespaced scripts, they compile without any issues. But namespaced ones don't. I'll try compiling individual scripts using the papyrus compiler externally and then move them to the appropriate directory to check if that works.
dav42 Posted August 14 Posted August 14 (edited) 2 hours ago, Uthan The Perverse said: I observed a strange behaviour: If I were to compile non-namespaced scripts, they compile without any issues. But namespaced ones don't. I'll try compiling individual scripts using the papyrus compiler externally and then move them to the appropriate directory to check if that works. The should compile to the right folder. Weird about the namespaced ones, it's pretty common. There is a default namespace option in CK prefs, maybe you just need to delete CreationKitPrefs.ini, think I mentioned it earlier (if your in MO2 it might be in your overwrite, or if you put it in a mod). That might just be a default namespace for new scripts, not sure. I usually call them out with fully qualified names: "Papyrus Compiler\ScriptCompile.bat" NukaRide:Fragments:Quests:QF__NR_Pizza_07073A17 "Papyrus Compiler\ScriptCompile.bat" AAF:AAF_MainQuestScript I just run a Command Prompt under MO2 and plug that in, think I posted the contents of ScriptCompile.bat earlier, CK comes with one but I assume it's setup for Bethesda's build environment. Edited August 14 by dav42
Uthan The Perverse Posted August 15 Posted August 15 @dav42 Tried the .bat file thing and that worked. The compiled .pex file is created in the overwrite directory as expected. I changed it to the LittlePawn mod directory and the compiled scripts are now going there as well. This is not ideal but better than nothing I guess. Tested it in-game and it's working fine as well. I tried giving only the namespace `LPS_` to see whether it would batch compile every script under that namespace, but no dice there. I guess I'll have to compile one-by-one. Is there any way to batch compile that you might know?
dav42 Posted August 15 Posted August 15 2 hours ago, Uthan The Perverse said: I tried giving only the namespace `LPS_` to see whether it would batch compile every script under that namespace, but no dice there. I guess I'll have to compile one-by-one. Is there any way to batch compile that you might know? I know some people like to use VS Code, there is an extension out there. But I would imagine most people building a plugin are just doing it in CK and perhaps compiling when they make a change. I just do it on a batch file because often I am only tweaking a single script, and you don't need to compile everything. https://marketplace.visualstudio.com/items?itemName=joelday.papyrus-lang-vscode
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now