Jump to content

Setting up Sublime for a mod project


Recommended Posts

you can use two line or one, it does not matter, but two is easier to read

"import": ["C:/games/skyrim special edition/data/Scripts/Source",
        "C:/Users/Chris/AppData/Local/ModOrganizer/Skyrim Special Edition/mods/Wayfinder/Source/Scripts"],

[ ] like in skyrim means an Array

EDIT when you have a heap of Projects it can get messy with one  line of code))

"import": [ to ], is just an Array Declaration

string Array = [element1, element2, element3, element4],

but

"arrayName":  [element1, element2, element3, element4], 

no comma on the last element, but add one end of the declaration

or 

"arrayName": [element1,
              element2,
              element3,
              element4], 

 

Link to comment
Share on other sites

This got me wondering what arguments  the compiler takes, cos who remembers, so I asked it, since it was easier than looking it up on google, and it me  told this

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.

in case your wondering, what they are

Link to comment
Share on other sites

  On 4/11/2025 at 10:46 AM, PeterMartyr said:

This got me wondering what arguments  the compiler takes, cos who remembers, so I asked it, since it was easier than looking it up on google, and it me  told this

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.

in case your wondering, what they are

Expand  
  • 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.

Above is what is on the sublime papyrus github. so earlier overrides later. Why would I want a skyrim\data\scripts\source psc over the same file that actually in my mod's folder ? That seems to be what you're suggesting re: order

Link to comment
Share on other sites

I thought one edited the SublimePapyrus.ini in the documents folder and it created the JSON settings file.  Instructions on how to edit are within the INI rather than the JSON.  But it has been a few years since I transferred things to a new computer and even more years since I first set things up when it was Sublime Text 2, so I could be remembering wrong.

 

As for highlighting in SSE or newer, I don't know of any new pre-built highlighters.  That said, the LE one works just fine with SSE and FO4.  One can also create their own highlighter or modify the existing one, should one wish to take on that challenge. It is possible as I had modified the highlighters at one point, but that was on a previous computer too.

Link to comment
Share on other sites

*@IsharaMeradin

I do not have sublime folder in my documents, sublime is install to program file for all users and my user setting are in AppData

I use (checking) with Sublime Text 4:  Preferences โ†’ Package Settings โ†’ Sublime Papyrus โ†’ Settings-User  and the user setting file is a JSON type file, you also have access to:  Preferences โ†’ Package Settings โ†’ Sublime Papyrus โ†’ Settings-Default but that is Read Only JSON type file in case want to restore your settings to default. You can can experiment a lot better doing it that way, and restore it too while staying in Sublime. Your way you need your own system to store the ini file to default.  Plus cannot made changes on fly. Like today no linter, LOL YEAH that package has got few annoying Linter problems and it compiles and works fine in game, so I switch off it for some PSC where does it false negative and switch it back on later

"C:\Users\PeterMartyr\AppData\Roaming\Sublime Text\Packages\User\SublimePapyrus.sublime-settings"

it has the extension  'sublime.setting' but when you look at it, it is JSON syntax, and I edit in in the editor like I explained  above, to me it does not look like an ini file) are we on the same page?  But calling the same thing different names?

  Reveal hidden contents

Copying the Explorer PATH to a Temp JSON File of my own just for you, It is highlighted in the PINK LINTER ERROR we know all and love ๐Ÿ˜๐Ÿ’–NOT

If you do not trust me, test it in the sublime setting file, it will behave just like a JSON file)

image.png.f97bab2f74f4c17e0b8007ad39723bc4.png

Using double \\ is an escape sequence for the back slash, like in Papyrus \n for new line or \" to use quotes in a string, that why it is highlighted, as I am sure you know, since does the same for escape sequences in Papyrus, so that an absolute Gimme for you, this will work , but is kind of amateurish like you don't understand string manipulation and escapes in coding heheehehe But it does work. I just would NOT show it to potential employer as part of your portfolio. ๐Ÿคฃ๐Ÿ˜‚

Screenshot2025-04-12121815.png.73c60f790dc4a6b2f6cb5b3b276cbd52.png

A string of a PATH in JSON with no errors or escapes use a / like the browser you using

Screenshot2025-04-12121849.png.277fe25e4655ee1ab53391cb3dd64dd3.png

Seriously @IsharaMeradin only window languages use a back slash in a PATH, all the others use a forward slash in a PATH like JSON, your Browser, Sublime-Settings, etc,  I posted the pictures so you could see it, but if it works what your doing with the INI file don't stop doing it)

Bummer there is no updates, that a least ten old now ๐Ÿ˜”

 

LOL you really got me thinking, of Sublime Text 2, of the days before Sublime Packages was released on the Nexus or Git and I went  to website maintained by the author to get it, did we use an ini file, cos I seem to recall that we did, but it had no Linter back then, and when the Package updated to include a Linter, Sublime Text 3, it then switch to what I am doing now..  I also recall using a Jaxonz mod that was later fully incorporated into SKSE for crosshairs, geez she was good coder. It drove the Linter crazy, me switching it off goes way back)) these day most new users use the file menu preference for settings, and there no mention of any ini file, at least that what I remember reading in the markdown document. LOL (checking) geez you got checking a lot of stuff today)

Zero hits on ini not case sensitive in the read me markdown

image.thumb.png.ff6623e6fa7a112d6699159a8f338279.png

But I 100% back you up that once we did. It is amazing what you remember with a little push

Link to comment
Share on other sites

I downloaded the oldest version of the package I could find, it had an INI file, but the modern one do not

Create default INI file" should show up. Select it and a file called "SublimePapyrus.ini" will be created in My Documents.

  Reveal hidden contents

 

Link to comment
Share on other sites

I'm still on Sublime Text 3 if that matters.  I'm guessing the program is backwards compatible and it will update the packages file with changes made to the INI file.  Since both have the same settings for me and the packages file updates when I use the BAT file I made to swap between the LE version of the INI and the SSE version of the INI.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
ร—
ร—
  • Create New...