csbx Posted April 10 Share Posted April 10 This is obviously a new world for me--external editors. I'm trying to work out how to continue getting the same file-organization rules from Sublime as I had been from CK. As things stand (and I'm using MO and running CK:PE from there), opening a script in CK opens the psc from my mod's script source directory. Then when I compile it saves to my mod's script directory. Makes sense to me. So even if there's a stray copy of one of my psc's in skyrim's script source directory, it pulls from my mod folder as a priority (I guess ?). But I'm noticing that if I open a script from CK via external editor (I'm using Sublime) that it's not pulling from my mod's script source folder--but rather skyrim's. And this makes sense--I set up the source folder in Sublime to look at Skyrim's source folder for pscs. Is there a way to set up more than one source folder with some kind of hierarchy of priority ? Here's essentially what I want: if it's one of my original psc scripts / script fragments, I want for it to pull from my mod folder's source + bsa / source before it pulls from skyrim/scripts/source. It should then compile to my mod's scripts folder. And if it's a vanilla edit of a script (psc) it should do the same. Currently when I open an existing psc in CK, it opens it from my mod's folder. But if I open it from CK into sublime, it's looking at an older version in the skyrim script source directory. Bad ! Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 10 Share Posted April 10 You can use multiple source folders with Sublime Text for compiling purposes. It will follow a designated hierarchy as to where to look for the additional scripts needed when compiling your current script. See SublimePapyrus.ini in your documents folder for setting that up. I can provide an example if necessary. You need to launch SublimeText from within MO rather than with the CK. Just because the CK has access to MO's virtual file setup does not mean that SublimeText can see it. I recommend manually opening the files you want to compile with SublimeText (or even your mod's entire script folder). As long as you do not close them, the files will automatically open up in SublimeText making it easier to make changes without the need of opening the CK to access them. Recommendation: Set up a source folder hierarchy for compiling, launch SublimeText from within MO to ensure that it sees the files as MO sees them. And for convenience pre-load / pre-create your scripts in SublimeText rather than the CK (happy side effect: you'll avoid the CK's built-in character limit when creating a long script such as one that might be needed for a mod's MCM menu). As far as output location, while that can be designated in the SuplimePapyrus.ini, the reason SublimeText is behaving differently than the CK is down to not being loaded through MO. Once loaded through MO, it should compile the same as what the CK has been doing. Link to comment Share on other sites More sharing options...
csbx Posted April 10 Author Share Posted April 10 For clarification, what aspect of the virtual file system is relevant to sublime text ? The source folder for my mod is a real folder, the output pex folder is real, the overwrite too is a real folder. Perhaps I'm looking at this within the narrow scope of basic functioning like opening up my authored scripts and compiling and I'm not seeing the broader structure. Thanks a lot for your guidance here. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted April 11 Share Posted April 11 Your mod files are in a sub folder within MO's staging area. While Sublime Text can open those files (PSC), save to the same location and compile said files, the compiled output will always end up within the game's actual folder.** The only way to get Sublime Text to save the compiled file (PEX) within MO's staging area is to launch it within MO. By launching within MO, when Sublime Text compiles a file and sends that output to what it thinks is the game's folder, the output will actually go to MO's staging area instead. The status of the file within MO's staging area will determine where it goes from there (overwrite folder, your mod folder or a different mod folder), but that is a different conversation. **Yes, you can tell Sublime Text to output to a different folder. However, consider a situation where you might need to work on two projects in tandem, you would need to keep changing where Sublime Text sends the output. Launching in MO and allowing it to save to the "game folder", puts the files within the MO staging area where you expect them to be. Link to comment Share on other sites More sharing options...
csbx Posted April 11 Author Share Posted April 11 Okay - that makes sense now. I'm not surprised to find I don't have everything fully set up yet, but I'm now getting failed compiles for: csbmaglocationsquestscript myscript = (game.getformfromfile(0x027A2F, "Wayfinder.esp") as quest) as csbmaglocationsquestscript myscript.FindTheAliasMarkerMatch(70) cannot convert to unknown type csbmaglocationquestscript Now, I know this will compile, because it's the main edit my mod makes and it has been functioning for months. But outside of the hearth / bosom (pick your metaphor) of the CK where eventually everything worked, I'm now having to figure out what it's looking for. Link to comment Share on other sites More sharing options...
csbx Posted April 11 Author Share Posted April 11 (edited) Ah, I just think I was using it strangely. I was making patches and using a folder very far outside of my system's expectations to compile from. I just had to drop my uber script in there and then it compiled. It compiled the script I intended to AND the csbmaglocationquestscript - which I really don't understand, but hey, it will take me a little to catch on and get comfy. Edited April 11 by csbx Link to comment Share on other sites More sharing options...
PeterMartyr Posted April 11 Share Posted April 11 Sublime, but packages only support LE, (he whine heheheheehehehehe) For Skyrim SE, Fallout 4 and Starfield, VSC is the better choice... but it is a nice place to start BTW what your going thru is not about external editors, it is all about using the external editor in your chosen development environment, which is MO. Only MO and Vortex users suffer from this problem, it the same deal as the creation kit, so you know the drill. Incorporate it into the that methodology mechanic, launch it thru MO, in MO Data Folder Environment, and you can compile with out launching the Creation Kit. Hehheheehe, OFC you can compile with out MO, but will output to real data folder, not the MO Overwrite folder Chill I am Aussie, I use Sublime for everything. I use it today for markdown, but its packages are limited to LE, unless @IsharaMeradin can point me to newer ones)) that add Newer SE code support , I had no problem today with that markdown, it did not require launching MO heehehehe BTW show me your User Papyrus JSON file, I will post mine as hint to point you in the right direction, BUT beware, that set up allows to compile with out MO, maybe just point it to one Game source folder and launch MO, baby steps Default one "skyrim": { "title": "The Elder Scrolls V: Skyrim", "compiler":"", "flags":"TESV_Papyrus_Flags.flg", "output": "", "import": [], "arguments": [] }, User one "skyrim": { "title": "The Elder Scrolls V: Skyrim", "compiler":"C:/ Absolute Path to /Skyrim/Papyrus Compiler/PapyrusCompiler.exe", "flags":"TESV_Papyrus_Flags.flg", "output": "C:/ Absolute Path to /Skyrim/Data/Scripts", "import": [ "C:/ Absolute Path to /Skyrim/Data/Scripts/Source", "C:/ Absolute Path to MO folder /CollectedWorks Project/SCRIPTS/Source", "C:/ Absolute Path to MO folder /Little Poupa Project/10 Main Core - Required/SCRIPTS/Source", "C:/ Absolute Path to MO folder /UnitTest Project/Scripts/Source", "C:/ Absolute Path to MO folder /BlackJack Project/Scripts/Source" ], "arguments": [] }, I highly recommend not adding the extra paths to MO, but will allow to use it with out MO, all you need do is at the end of the day to the REAL Data Scripts folder, sort by date, what floats to the top is your daily pex files, move them to MO Mod Folder, no need to look for psc, they already are in MO Mod folder, just the pex files But I will repeat, (yeah three time snow) save that for later on, ATM, just import Skyrim ~ Source presay and launch Sublime via MO. To preserved the integrity of your Mod, and keep you in a familiar working environment. Link to comment Share on other sites More sharing options...
PeterMartyr Posted April 11 Share Posted April 11 BTW the one forward slash is correct syntax for JSON code those youtube channels that say to use double back slashes are full of shite and can only code in Papyrus, maybe, it makes me wonder . . . Do not treat or think of it as an INI file, It is a JSON file, treat it like one. Link to comment Share on other sites More sharing options...
csbx Posted April 11 Author Share Posted April 11 This is what I have, but I take your point about it being able to compile outside MO which may be sub-optimal, but yeah, starting point: { "skyrim": { "title": "The Elder Scrolls V: Skyrim", "compiler":"C:\\games\\skyrim special edition\\Papyrus Compiler\\PapyrusCompiler.exe", "flags":"TESV_Papyrus_Flags.flg", "output": "C:\\Users\\Chris\\AppData\\Local\\ModOrganizer\\Skyrim Special Edition\\mods\\Wayfinder\\Scripts", "import": ["C:\\Users\\Chris\\AppData\\Local\\ModOrganizer\\Skyrim Special Edition\\mods\\Wayfinder\\Source\\Scripts"], "import": ["C:\\games\\skyrim special edition\\data\\Scripts\\Source"], "arguments": [] }, "fallout4": { "title": "Fallout 4", "compiler": "", "flags": "Institute_Papyrus_Flags.flg", "output": "", "import": [], "arguments": [] } } } Link to comment Share on other sites More sharing options...
PeterMartyr Posted April 11 Share Posted April 11 import is wrong, it is an array give a minute to fix it Link to comment Share on other sites More sharing options...
Recommended Posts