Jump to content

Recommended Posts

Posted

One of the requirements to use relative paths is running the compiler from Source\User folder, as the "current path". Otherwise the file is relative to whatever folder you are running from and obvioulsy you'll get a malformed path.

But given the results of your test it seems that is also required to run the compiler from inside of the game folder, or said with other words, the "current path" must be under the game's directory tree, which is fortunatelly fulfilled by using relative paths.

 

I've been using my script to compile with namespaces, even with multiple inner name spaces, and it works just fine. So I don't really know what makes it bug out for others tbh, but I guess the location of the script might have something to do.

I have the script located at the same folder than the compiler, and my setup is vanilla. I mean I compile with my script with the same DLC folder structure needed to compile with the CK's editor.

 

So, in short, I think that the compiler's success is very dependant on the run path and the batch script path.

Posted

OK I have this figured out for Notepad++ macros.

 

Usually Notepad++ is configured to pass "$(FILE_NAME)" as %1 and "$(CURRENT_DIRECTORY)" as %2 to the compiler batchfile:

 

**********************************************
Papyrus debug compile
Command : (%0) "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Papyrus Compiler\ScriptCompile.bat"
FileName: (%1) "DLC01_MechanistDoorScript.psc"
FilePath: (%2) "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User\DLC01"
**********************************************
One could parse out the quotes and concatinate path and name "%2\%1", or simply edit Notepad++ shortcuts to pass the full file path "$(FULL_CURRENT_PATH)"
**********************************************
Papyrus debug compile
Command : (%0) "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Papyrus Compiler\ScriptCompile.bat"
FileName: (%1) "DLC01_MechanistDoorScript.psc"
FilePath: (%2) "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User\DLC01"
FullPath: (%3) "C:\Program Files (x86)\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User\DLC01\DLC01_MechanistDoorScript.psc"
**********************************************
Running the papyrus compiler against %3 full path now works perfectly for normal and namespace files.
Notepad++ has set the current working directory $(CURRENT_DIRECTORY)" to the source file which works fine, no changes required in the compiler batch file. Infact changing that causes the compile to fail.

 

shortcuts.xml

  Reveal hidden contents

 

 

ScriptCompile.bat

 

  Reveal hidden contents

 

 

I appreciate all the help, pointers and ideas on this one.

  • Recently Browsing   0 members

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