Jump to content

MO + Sublime Mod Development


Recommended Posts

So I finally switched over to using MO from NMM and understand the basic process. Now I need to switch over so I can continue development of my mods. I prefer to use Sublime Text. 

 

I've been playing with the SublimePapyrus packages (e.g. https://github.com/Kapiainen/SublimePapyrus) andreferring to posts here in LL, for example:

 

http://www.loverslab.com/topic/41857-scripting-for-sl-w-mod-organizer/

 

It seems the trick is to get the include folders setup correctly. 

 

Based on Ashal's response, one way is to replace the contents of /Packages/Papyrus/Papyrus.sublime-build with:

{
	"cmd": [
		"C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\Papyrus Compiler\\PapyrusCompiler.exe",
		"$file",
		"-op",
		"-f=TESV_Papyrus_Flags.flg",
		"-i=C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\Data\\Scripts\\Source;C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\ModOrganizer\\mods\\SexLab Framework\\scripts\\Source;C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\ModOrganizer\\mods\\SexLab - Aroused\\scripts\\source;C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\ModOrganizer\\mods\\FNIS Behavior\\scripts\\source;$file_path",
		"-o=$file_path\\..\\"
	],
	"file_regex": "(^.*\\.psc)\\(([0-9]*),([0-9]*)\\)",
	"selector": "source.papyrus"
}

And then make sure you include all the appropriate script source folders (CK, SKSE, SL, SLAroused) that you need for the "-i" switch .

The other instructions seem to stem around generating a SublimePapyrus.ini file (using Ctrl+Shift+P and picking the instruction for generating a Papyrus INI file)

And yet the latest package:

https://github.com/Kapiainen/SublimePapyrus

Seems to integrate better into Sublime, providing direct editing of the "user" variant of the papyrus build settings. 

 

compiler: The path to the compiler executable.

flags: The name of the file containing information about flags (e.g. "TESV_Papyrus_Flags.flg" for Skyrim). A file by this name is expected to exist in at least one of the import folders.

output: The path where compiled scripts should end up.

import: A list of paths to folders containing script sources. Earlier entries override later entries. If one wanted to override Skyrim's script sources with script sources from Skyrim Script Extender (SKSE), then the path to SKSE's script sources should have a lower index than the path to Skyrim's script sources.

arguments: A list of strings that are added at the end when invoking the compiler. Can be used to include additional options when invoking the compiler.

What's not clear to me for "import" is should I include a list of paths separated by ";" like the other systems, or actually list separate Json string array members?

If you are using Sublime, how are you configuring to work in Mod Organizer?

Anyone using "Advanced-Papyrus" https://github.com/Kapiainen/Advanced-Papyrus??

 

Thanks!

Link to comment

I use Notepad++ and I have a full configuration to open/edit/compile/analyze mods that are inside Mod Organizer.

With also an option to set the current mod, to be able to include only its files and the dependent files.

 

Link to comment

I use Notepad++ and I have a full configuration to open/edit/compile/analyze mods that are inside Mod Organizer.

With also an option to set the current mod, to be able to include only its files and the dependent files.

 

Yes, I have np++, but Ashal spoiled me about a year ago on Sublime...

Link to comment

It is not bad, but I prefer NP++.

And also NP++ is 100% free, Sublime is not.

 

Ashal tried to push me to Sublime once, but he did not succeed  :D  :D  :D

 

I don't mind the nags that Sublime occasionally pops up. I do intend to purchase it, really I do.

Link to comment

Okay, I'm using Sublime 2, and the the latest SublimePapyrus (https://github.com/Kapiainen/SublimePapyrus), and configured my (user) SublimePapyrus.sublime-settings as:
 

{
	"word_wrap": false,
	"linter_on_save": true,
	"linter_on_modified": true,
	"linter_delay": 500,
	"linter_panel_error_messages": false,
	"intelligent_code_completion": true,
	"center_highlighted_line": true,
	"highlight_build_errors": true,
	"hide_successful_build_results": false,
	"batch_compilation_warning": true,
	"modules":
	{
		"skyrim":
		{
				"compiler":"D:\\Program Files (x86)\\Steam\\SteamApps\\common\\Skyrim\\Papyrus Compiler\\PapyrusCompiler.exe",
				"flags":"TESV_Papyrus_Flags.flg",
				"output": "D:\\Program Files (x86)\\Steam\\SteamApps\\common\\Skyrim\\Mod Organizer\\overwrite\\Scripts",
				"import": [
				           	"D:\\Program Files (x86)\\Steam\\SteamApps\\common\\Skyrim\\Mod Organizer\\mods\\skse 1 07 03 Scripts\\scripts\\Source"
				          ],
				"arguments": []
		}
	}
}

Just to get started - I only set one import - the SKSE source scripts.

 

When I try building an empy quest script (Test.psc)

ScriptName Test Extends Quest

I get a short list of build errors:
 

Starting 1 compile threads for 1 files...
Compiling "Test"...
D:\Program Files (x86)\Steam\SteamApps\common\Skyrim\data\Scripts\Source\Weapon.psc(89,8): HasKeywordString is not a function or does not exist
D:\Program Files (x86)\Steam\SteamApps\common\Skyrim\data\Scripts\Source\Weapon.psc(93,8): HasKeywordString is not a function or does not exist
D:\Program Files (x86)\Steam\SteamApps\common\Skyrim\data\Scripts\Source\Weapon.psc(97,8): HasKeywordString is not a function or does not exist
D:\Program Files (x86)\Steam\SteamApps\common\Skyrim\data\Scripts\Source\Weapon.psc(101,8): HasKeywordString is not a function or does not exist
D:\Program Files (x86)\Steam\SteamApps\common\Skyrim\data\Scripts\Source\Weapon.psc(105,8): HasKeywordString is not a function or does not exist
D:\Program Files (x86)\Steam\SteamApps\common\Skyrim\data\Scripts\Source\Weapon.psc(109,8): HasKeywordString is not a function or does not exist
D:\Program Files (x86)\Steam\SteamApps\common\Skyrim\data\Scripts\Source\Weapon.psc(113,8): HasKeywordString is not a function or does not exist
D:\Program Files (x86)\Steam\SteamApps\common\Skyrim\data\Scripts\Source\Weapon.psc(117,8): HasKeywordString is not a function or does not exist
D:\Program Files (x86)\Steam\SteamApps\common\Skyrim\data\Scripts\Source\Weapon.psc(121,8): HasKeywordString is not a function or does not exist
No output generated for Test.psc, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on Test.psc

Which is curious, because SKSE's version of Form.psc is in the single import I have configured, and does define HasKeywordString.

 

Any ideas??
 

Link to comment

Fuck everything notepad++. There is nothing redeeming about that program compared to others.

 

To respond directly to your error, whatever your compile command is using that build plugin from sublime, it is missing appropriate argument paths. You could likely fix it by simply correcting the paths in the sublime papyrus package you're using. 

 

I've not tried any other Sublime Text 3 packages for Papyrus myself, whatever the one that shows up when using Sublime Package Control and searching for the word "Papyrus" is the one that I use.

 

It works without question. I've never had a problem with it and any compile errors are always solved by simply including a relevant missing dependency in my build command's include path. The fact that the output folder of the build command is "../" I think makes it ideal and stupidly easy to work with. The fact that MO+Papyrus compiling is an issue seems utterly crazy to me from that point.


Okay, I'm using Sublime 2

 

 

Stop. Just get Sublime 3. It's been out forever and has been actively updating for the past few months.


More directly in response to your erros:

 

 

D:\Program Files (x86)\Steam\SteamApps\common\Skyrim\data\Scripts\Source\Weapon.psc(89,8): HasKeywordString is not a function or does not exist

 

HasKeywordString() is an SKSE function. I very much doubt that is a coincidence. You probably aren't including the SKSE papyrus script sources in your build commands include.

Link to comment

Fuck everything notepad++. There is nothing redeeming about that program compared to others.

 

To respond directly to your error, whatever your compile command is using that build plugin from sublime, it is missing appropriate argument paths. You could likely fix it by simply correcting the paths in the sublime papyrus package you're using. 

 

I've not tried any other Sublime Text 3 packages for Papyrus myself, whatever the one that shows up when using Sublime Package Control and searching for the word "Papyrus" is the one that I use.

 

It works without question. I've never had a problem with it and any compile errors are always solved by simply including a relevant missing dependency in my build command's include path. The fact that the output folder of the build command is "../" I think makes it ideal and stupidly easy to work with. The fact that MO+Papyrus compiling is an issue seems utterly crazy to me from that point.

Okay, I'm using Sublime 2

 

 

Stop. Just get Sublime 3. It's been out forever and has been actively updating for the past few months.

More directly in response to your erros:

 

 

D:\Program Files (x86)\Steam\SteamApps\common\Skyrim\data\Scripts\Source\Weapon.psc(89,8): HasKeywordString is not a function or does not exist

 

HasKeywordString() is an SKSE function. I very much doubt that is a coincidence. You probably aren't including the SKSE papyrus script sources in your build commands include.

 

 

Ashal I specifically mentioned that SKSE was the only import I had included....

 

"D:\\Program Files (x86)\\Steam\\SteamApps\\common\\Skyrim\\Mod Organizer\\mods\\skse 1 07 03 Scripts\\scripts\\Source"

Link to comment

Ashal I specifically mentioned that SKSE was the only import I had included....

 

"D:\\Program Files (x86)\\Steam\\SteamApps\\common\\Skyrim\\Mod Organizer\\mods\\skse 1 07 03 Scripts\\scripts\\Source"

 

 

 

That honestly means nothing if your other build config paths are wrong. PM me and I'll send you my direct contact via Steam and/or Skype to gladly personally walk you through configuring sublime appropriately. I'd do anything to dispel the myth that MO+Papyrus is hard/impossible :/

Link to comment

Figured it out. Turns out the developer for the "Legacy of the Dragonborn" mod accidentally included code source files (Form.psc) that are essentially copies of the Vanilla game's, and therefore caused the error messages about missing SKSE extensions to those types.

 

So pissed off.

Link to comment
  • 1 year later...

 

Ashal I specifically mentioned that SKSE was the only import I had included....

 

"D:\\Program Files (x86)\\Steam\\SteamApps\\common\\Skyrim\\Mod Organizer\\mods\\skse 1 07 03 Scripts\\scripts\\Source"

 

 

 

That honestly means nothing if your other build config paths are wrong. PM me and I'll send you my direct contact via Steam and/or Skype to gladly personally walk you through configuring sublime appropriately. I'd do anything to dispel the myth that MO+Papyrus is hard/impossible :/

 

 

Would you be willing to help me set up sublime 3 for fallout4? Is it possible to make it the default compiler within the CK? I have followed the instructions on the Creation Kit Wiki to  get it installed and configured so I have my SublimePapyrus.ini created:

 

; 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]

scripts=C:\Games\Fallout 4\Data\Scripts\Source\User

import=$(source);C:\Games\Fallout 4\Data\Scripts\Source\Base

compiler=C:\Games\Fallout 4\Papyrus Compiler\PapyrusCompiler.exe

assembler=C:\Games\Fallout 4\Papyrus Compiler\PapyrusAssembler.exe

output=C:\Games\Fallout 4\Data\Scripts

workspace=

flags=Institute_Papyrus_Flags.flg

wiki=http://www.creationkit.com/fallout4/

 

```

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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