Jump to content

[LE] Help with survival mode script compiler


Recommended Posts

Hi, I am trying to edit Skyrim survival mode to start right after the character creator has closed at the beginning of the game, instead when exiting Helgen. i want to try to replace in the survival_mainscript:

 

Bool canBeEnabled = MQ101.IsCompleted() || game.IsFightingControlsEnabled() && !PlayerRef.IsInInterior()

to:

Bool canBeEnabled = MQ101.IsStageDone(80)

However, the compiler is not working and those are the error messages I am getting:

Starting 1 compile threads for 1 files...
Compiling "Survival_MainScript"...
C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\survival_needbase.psc(358,25): GetActorValueMax is not a function or does not exist
C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\survival_needbase.psc(358,7): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\survival_needexhaustion.psc(159,14): IsOverEncumbered is not a function or does not exist
C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\survival_needcold.psc(191,32): GetWarmthRating is not a function or does not exist
C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\survival_needcold.psc(191,7): type mismatch while assigning to a float (cast missing or types unrelated)
No output generated for Survival_MainScript, compilation failed.
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on Survival_MainScript
Any help please.
Link to comment
Share on other sites

I have absolutely zero idea about this Survival Mode stuff, but...

 

Take a look at the top of the script, see what it extends because that's where the functions are which it's trying to call. Then see if you have that script in Data\Scripts\Source. Now this is when you realise that your script and source directories are the wrong way around, so the compiler can't find the source code.

 

It should be...

  • Data\Scripts\Source

 

You're welcome. :smile:

Edited by Kapteyn
Link to comment
Share on other sites

I have absolutely zero idea about this Survival Mode stuff, but...

 

You have the source and script directories the wrong way around.

 

It should be...

  • Data\Scripts\Source

The PEX files go in the scripts folder, SRC into source. Then try again.

Nah, that the default location in the Special Edition. At least, that is where the Creation Kit 2.0 extracted them.

Edited by Guest
Link to comment
Share on other sites

Wait... are you telling me they switched them around? No really, rename those directories and try again because the Papyrus Compiler doesn't care if it was changed, it's looking for the source code in Data\Scripts\Source and it can't find it. Even if SE has changed it, just rename them and change it back after if you have to.

Edited by Kapteyn
Link to comment
Share on other sites

 

I have absolutely zero idea about this Survival Mode stuff, but...

 

You have the source and script directories the wrong way around.

 

It should be...

  • Data\Scripts\Source

The PEX files go in the scripts folder, SRC into source. Then try again.

Nah, that the default location in the Special Edition. At least, that is where the Creation Kit 2.0 extracted them.

 

Tried to call a .psc file from Data\scripts\source, but the "Edit Source" in the creation kit was grayed out. Reverting to Data\source\scripts made it available. Yap, they chabged the file pats from standard Skyrim CK.

Link to comment
Share on other sites

Well I don't know, it makes absolutely no sense. That's not how it works with my Oldrim.

 

Either way, it's not finding the functions because it's not finding the source.

 

Just use a batch script on the compiler then...

 

 

 

PapyrusCompiler ScriptName -f="TESV_Papyrus_Flags.flg"
pause

 

 

PapyrusCompiler <object or folder> [<arguments>]

object Specifies the object to compile. (-all is not specified)
folder Specifies the folder to compile. (-all is specified)
arguments One or more of the following:
-debug|d
Turns on compiler debugging, outputting dev information to the screen.
-optimize|op
Turns on optimization of scripts.
-output|o=<string>
Sets the compiler's output directory.
-import|i=<string>
Sets the compiler's import directories, separated by semicolons.
-flags|f=<string>
Sets the file to use for user-defined flags.
-all|a
Invokes the compiler against all psc files in the specified directory
(interprets object as the folder).
-quiet|q
Does not report progress or success (only failures).
-noasm
Does not generate an assembly file and does not run the assembler.
-keepasm
Keeps the assembly file after running the assembler.
-asmonly
Generates an assembly file but does not run the assembler.
-?
Prints usage information.
Edited by Kapteyn
Link to comment
Share on other sites

Save this a .BAT file and run it, changing any file paths if needed (if it works, it'll save the file in the scripts folder)...

SET SOURCE="C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts"
SET COMPILER="C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Papyrus Compiler\PapyrusCompiler.exe"
SET FLAG="C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Papyrus Compiler\TESV_Papyrus_Flags.flg"
SET SCRIPT="C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\survival_needbase.psc"

CD %SOURCE%

%COMPILER% %SCRIPT% -f=%FLAG%

PAUSE
Edited by Kapteyn
Link to comment
Share on other sites

Oooooh, right then. Still doesn't explain why the directories are the wrong way around.

 

There's one more reason to never get SE. I guess I'll go back to Dragon Age, I miss Morrigan. :sad:

 

Hang on a moment. Forget about CK, the compiler doesn't care about it. As long as you have the source code for the scripts which contain those functions, you're good. If you don't have the source because you're waiting for the update then that makes more sense.

Edited by Kapteyn
Link to comment
Share on other sites

  • Recently Browsing   0 members

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