manarak Posted March 26, 2014 Posted March 26, 2014 I want to modify some scripts, but I can't figure out how to do it. I'm a PHP programmer, so the programming in the scripts looks pretty straightforward, but I'm unfamiliar with compiled scripts, because with PHP I just program and the scripts get executed, no need to compile anything. Also, I'm using Mod Organizer... I read that the script compiler of the creation kit won't work from MO. So I installed the kit and ran it directly from the TESV dir. - First thing I tried is opening a script from CK to compile it, but there is no such possibility. - Next I copied a psc to the /scripts/source/temp folder and tried to compile it, error: no location found, ok. - Next I copied the pex I want to modifiy to /scripts and the psc to /scripts/source ... same error. - Then it dawned on me that maybe the compiling stuff verifies all other scripts around, so I copied all of the sexlab scripts over. This time the error is different, full of undefined, no have, no know, not allowed, cannot, etc. so I guess the compiler only works if everything is installed the regular way in the TESV dir (i.e. not using mod organizer) ? At this point I am considering making a second TESV installation, as a copy of the first one, to run the CK and compiler in. Will this work? At this point I would be grateful if someone could give me some directions. How should I proceed to turn a modified .psc into a working .pex ? Thank you!
blabba Posted March 26, 2014 Posted March 26, 2014 Depending on what function calls or whatever mod script your editing: Make sure you have SKSE installed (I assume you do ) As for compiling outside of ck, it is relatively simple: Inside your skyrim install directory, there is a folder that's called 'Papyrus Compiler', open that up and you should see PapyrusCompiler.exe. PapyrusCompiler.exe accepts command line flags and if run from a shell (either cmd or Powershell) it should list for you the possible flags and commands to be run from it. Note: Bethesda was extremely lazy and I believe the default location for the papyrus compiler to search for imported defintions is set to some random path that was used on their own setups, that do not exist on our installs) Here's a reference for the PapyrusCompiler.exe flags: http://www.creationkit.com/Papyrus_Compiler_Reference It should get you started with compiling scripts outside of the ck (I personally dislike using CK, although I hear it is much simpler to compile with), though you can use a simple batch script file to just set the flags and run through your scripts and automate this whole process as well. Edit: Oh yea by the way, all you need are the .psc files (source files) to run through, the .pex files are the compiled files but I do believe there is a disassembler function for either PapyrusAssembler.exe or PapyrusCompiler.exe, there's a better thread on that topic with more information if something like that is needed.
manarak Posted March 26, 2014 Author Posted March 26, 2014 thank you, I will try to mess around in command line mode then
manarak Posted March 26, 2014 Author Posted March 26, 2014 tearing my hairs out... I cloned my game directory so I don't mess up everything in my Skyrim install. Papyrus Compiler is in "D:\Games\TESV_MODDING\Papyrus Compiler\PapyrusCompiler.exe", I go to that directory and try (batch file): PapyrusCompiler.exe sslActorAlias.psc -i="D:\Games\TESV_MODDING\Data\scripts\source" -o="D:\Games\TESV_MODDING\Data\scripts" -f="TESV_Papyrus_Flags.flg" pause result: I get the same errors as in CK - loads of undefined and unknowns, looks like the rest of the files defining these values are not loaded :-(
manarak Posted March 26, 2014 Author Posted March 26, 2014 ok, it looks like the following worked - the compiler is running now and compiles... but it's slow because it compiles every single script :-( PapyrusCompiler.exe D:\Games\TESV_MODDING\Data\scripts\source -i="D:\Games\TESV_MODDING\Data\scripts\source" -o="D:\Games\TESV_MODDING\Data\scripts" -f="TESV_Papyrus_Flags.flg" -all pause
manarak Posted March 26, 2014 Author Posted March 26, 2014 damn... 37 files failed to compile, all sexlab framework files, among which sslActorAlias.psc any ideas?
manarak Posted March 26, 2014 Author Posted March 26, 2014 I think I got it - I downloaded SKSE as a zip version and copied its scripts/source folder manually into my game's /source folder. then compile succeeded.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.