dagobaking Posted October 3, 2019 Posted October 3, 2019 I'm writing this up in response to this thread:   There are multiple ways to approach your coding environment for Papyrus with different pros/cons. There could be better ways that I haven't thought. But, this is just what I've settled on after trying many variations. I hope this helps others streamline their coding work with Papyrus.  First, follow the steps outlined here: https://www.creationkit.com/fallout4/index.php?title=Sublime_Text  Once that is set up, open your Papyrus plugin configuration. It should be in the same place for most people (on Windows), in your Documents folder, titled "SublimePapyrusF4.ini".  The goal here is to allow you to compile code within an MO2 mod folder without having to put the vanilla source or F4SE source within your mod folder.  My configuration for AAF looks like this: ; For the import setting: ; Separate folders with semicolons - but do not put whitespace in front of the semicolon or it will be treated as a comment ; Use $(source) to indicate location of scripts folder in the list [Fallout4 AAF] scripts=C:\Games\MO2_BASE\mods\AAF_DEV\Scripts\Source\User import=$(source);C:\Games\steamapps\common\Fallout 4\Data\Scripts\Source\User;C:\Games\steamapps\common\Fallout 4\Data\Scripts\Source\Base compiler=C:\Games\steamapps\common\Fallout 4\Papyrus Compiler\PapyrusCompiler.exe assembler=C:\Games\steamapps\common\Fallout 4\Papyrus Compiler\PapyrusAssembler.exe output=C:\Games\MO2_BASE\mods\AAF_DEV\Scripts workspace= flags=Institute_Papyrus_Flags.flg wiki=http://www.creationkit.com/fallout4/ The scripts path: The path to your User folder within your MO2-installed mod. You can have additional namespaces set up within this folder. For instance, using the above config, I have an AAF folder within the User folder where the AAF scripts go. Then, of course, within the scripts I use the namespace "AAF:xyz..."  The import path: First $(source) to use the path of the file being compiled. Then the paths to your Fallout 4 vanilla install Base and User folders. The Base has the source for the vanilla scripts and the User folder is where you would put additional source code like the F4SE source.  compiler and assembler paths: These are exe that are found within your vanilla install.  output path: The path to the scripts folder within your MO2-Installed mod.  workspace path: I leave this blank. I'm not sure what it's used for...  ---  If you want to compile scripts this same way from a second (or more) mod, you can just add another set of paths to the same config file. So, it would look something like this: ; For the import setting: ; Separate folders with semicolons - but do not put whitespace in front of the semicolon or it will be treated as a comment ; Use $(source) to indicate location of scripts folder in the list [Fallout4 AAF] scripts=C:\Games\MO2_BASE\mods\AAF_DEV\Scripts\Source\User import=$(source);C:\Games\steamapps\common\Fallout 4\Data\Scripts\Source\User;C:\Games\steamapps\common\Fallout 4\Data\Scripts\Source\Base compiler=C:\Games\steamapps\common\Fallout 4\Papyrus Compiler\PapyrusCompiler.exe assembler=C:\Games\steamapps\common\Fallout 4\Papyrus Compiler\PapyrusAssembler.exe output=C:\Games\MO2_BASE\mods\AAF_DEV\Scripts workspace= flags=Institute_Papyrus_Flags.flg wiki=http://www.creationkit.com/fallout4/ [YourOtherMod] scripts=C:\Games\MO2_BASE\mods\YourOtherMod\Scripts\Source\User import=$(source);C:\Games\steamapps\common\Fallout 4\Data\Scripts\Source\User;C:\Games\steamapps\common\Fallout 4\Data\Scripts\Source\Base compiler=C:\Games\steamapps\common\Fallout 4\Papyrus Compiler\PapyrusCompiler.exe assembler=C:\Games\steamapps\common\Fallout 4\Papyrus Compiler\PapyrusAssembler.exe output=C:\Games\MO2_BASE\mods\YourOtherMod\Scripts workspace= flags=Institute_Papyrus_Flags.flg wiki=http://www.creationkit.com/fallout4/ Â
Tentacus Posted October 3, 2019 Posted October 3, 2019 This is so Helpful @dagobaking. Thanks for taking the time.
Tentacus Posted October 3, 2019 Posted October 3, 2019 Something @dagobaking didn't mention is that you'll have to show the path to AAF's source too if you are going to compile a script that calls the AAF API. So in my case it looks like this:  import=$(source);C:\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User;C:\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\Base;D:\Games\Fallout 4\mods\Advanced Animation Framework\Scripts\Source\User I also noticed in my testing that fragments using KmyQuest won't compile. This won't really affect me going forward as I have pretty much abandoned using fragments, but for curiosity's sake is there some way around this @dagobaking?
dagobaking Posted October 3, 2019 Author Posted October 3, 2019 31 minutes ago, Tentacus said: Something @dagobaking didn't mention is that you'll have to show the path to AAF's source too if you are going to compile a script that calls the AAF API. So in my case it looks like this:  import=$(source);C:\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\User;C:\Steam\steamapps\common\Fallout 4\Data\Scripts\Source\Base;D:\Games\Fallout 4\mods\Advanced Animation Framework\Scripts\Source\User Yes. You could do that. Or, you could also put the AAF source files into the User folder within the game install since that is already listed in the config I posted. 31 minutes ago, Tentacus said: I also noticed in my testing that fragments using KmyQuest won't compile. This won't really affect me going forward as I have pretty much abandoned using fragments, but for curiosity's sake is there some way around this @dagobaking? I don't use fragments too much either. There are a few in AAF though. My method for those:  Create the fragment script in CreationKit (but don't do anything to it. simply create it so you can get the file name, etc.). Then save. Next, in MO2, that script will be in the overwrite folder. Move that folder structure and script file over to your mod folder that it should belong to. Now, with the config I described originally, you can compile that fragment script just like any other script within your mod folder.
gammons123 Posted October 3, 2019 Posted October 3, 2019 This is really helpful - maybe worth a sticky if possible, given how tempting it is to give up when then CK starts fighting back!
Guest Posted October 3, 2019 Posted October 3, 2019 No. Not even the same topic posted a while ago by Ashal is sticky.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.