Jump to content

What text editor do you use for editing Papyrus Scripts? (Please help, need some feedback on what features to develop next.)


nimrodxy

Text Editor Usage for Skyrim SE  

50 members have voted

  1. 1. When working on Papyrus scripts for Skyrim SE mods, what text editor do you use?

    • Just the Creation Kit's built-in editors
      2
    • Sublime Text
      4
    • VSCode
      18
    • Notepad++
      22
    • Atom
      2
    • Vim
      1
    • Emacs
      0
    • Other (Please Mention in Comments)
      1
  2. 2. Do you use Mod Organizer 2's user space virtual file system to capture files to a custom overwrite directory?

    • Yes
      27
    • No
      23
  3. 3. What Papyrus-specific text editor features are most important to you?

    • Build Support (hit a key to compile)
      32
    • Syntax Highlighting
      43
    • Snippets
      5
    • In-Editor Compile Errors
      23
    • Real-Time Error Checking (linting)
      19
    • Autoformatting
      14
    • Code Reference Tooltips (Intellisense)
      24
    • Autocompletion
      22
    • Jump to Definition
      18
    • Debugger Support
      12


Recommended Posts

I'm working on features for the vscode papyrus extension and could use some feedback on the extension. This will determine how much work gets done and what gets done so it's kind of important if you want improvements of any sort.

 

Answering the poll questions is helpful enough but if you also have any feedback or other comments that would be even more helpful!

Link to comment
Share on other sites

I once used Sublim Text but setting it up for the games was a bit difficult.

Thanks! That's important to know because it's exactly the problem I'm working on solving with the vscode extension right now. Once I'm done you might want to check out the vscode extension. But right now the easiest I've made it is to supply this guide and template https://www.nexusmods.com/skyrimspecialedition/mods/29491

 

But the goal is to make the template totally unnecessary and make the guide almost unnecessary.

Link to comment
Share on other sites

I'm going to preface this with the fact I have not used VSCode yet. It's on my list of things to try but I just haven't had time. So some of my suggestions/needs/etc may already be supported.

 

I presently/previously (been a while since I've done any coding) use Notepad++ the most. I tried using Atom which was nice and had better support for some features, but lacked others.

 

The absolute #1 feature I could never live without is syntax highlighting. And I'm not talking just function name highlights, but also distinctive highlighting of declared variables and native types such as ints, floats, or strings. I realize somethings this makes code look like a christmas tree, but after using it it is something I can't live without.

 

One big one that was missing from Atom, though added via an addon that wasn't really good, is block selection of text, then copying and pasting. For those not familiar that, it is being able to select a rectangular area within the text and manipulate it. Or paste into an area inserting such things. Notepad++ has a form of it that I still find lacking in some cases, and I use another generic text editor EmEdit when I need specific assistance with it. I know this is a bit of an edge case use, but hey you asked for other comments.

 

I also utilize the functions list that Notepad++ supports extensively. I suspect VSCode may have this functionality already in some fashion.

 

Something that I find missing is the inclusion of variable definitions underneath an expandable function list to show which variables are declared within the function. Not something that is absolutely necessary but it can be useful. This is something I'm used to from full out Visual Studio and other full featured programming IDEs.

Link to comment
Share on other sites

Haven't done much SSE modding beyond porting a couple of my mods over. But one of the things I liked when using Notepad++ and Sublime Text with original Skyrim was that I could write and compile my scripts without needing to open the Creation Kit at all. Does your process (or will it) support that ability?

 

Will it be possible to utilize this with other games that use papyrus? If not directly, would there be a configuration file that could be tweaked slightly to make it work (or outright replaced as needed)?

Link to comment
Share on other sites

Haven't done much SSE modding beyond porting a couple of my mods over. But one of the things I liked when using Notepad++ and Sublime Text with original Skyrim was that I could write and compile my scripts without needing to open the Creation Kit at all. Does your process (or will it) support that ability?

 

Will it be possible to utilize this with other games that use papyrus? If not directly, would there be a configuration file that could be tweaked slightly to make it work (or outright replaced as needed)?

Well it's not really mine (I'm just a contributor) but yes currently you can compile without ever opening the CK, however you'd have to set it up yourself right now (or use the template I linked to a couple of posts ago). The CK just runs PapyrusCompiler.exe anyway so it's no big deal to just run the compiler.

 

So right now if you downloaed vscode-papyrus and that's it then you'd have to learn to set up build tasks on your own. Using the project template (https://www.nexusmods.com/skyrimspecialedition/mods/29491) this is done for you in the template but there's the extra template to download. The goal is to get it where the extension creates the project files for you in one shot so everything is as easy as possible.

 

Right now the extension actually works better with FO4 than Skyrim because most of the interest has been coming from FO4 modders so they supplied the most feedback. But unfortunately there are some differences between the features for FO4 and SSE PapyrusCompiler and the way the games organize their source files (with SSE wanting to throw everything in the same directory). The big decision I'm trying to make, and convince others of, is which of these ways the build stuff should be implemented for SSE. (The main pieces of information that need to be supplied to the compiler are the Sources directory, files to be compiled, and the Imports directory, files that can be extended etc by your own code.)

  1. Place Sources and Imports in the vscode configuration (where they can go in the workspace config). This means editing the workspace-code file to add sources or imports but usually the defaults would be fine for most.
  2. Put Sources and Imports in the tasks.json but I don't know how hard it would be to pull that info out for the language server (intellisense etc) especially since you could have more than one build task.
  3. Put Sources and Imports in a PPJ. No modifications needed for language server, should work OK even with multiple PPJ files (I think). Not sure what other issues might come up.

What this really boils down to is would Skyrim modders like to be able to use PPJ files to configure the compiler like FO4 modders can?

 

This explains what PPJ files are and how they work https://www.creationkit.com/fallout4/index.php?title=Papyrus_Projects

 

Right now I'm just kind of blocked on not getting any opinions from anyone modding for SSE on which solution they'd like best.

Edited by nimrodxy
Link to comment
Share on other sites

I am using Notepad++.
Most important is the syntax highlighting, and build support (hit key to compile), then jump to definition and then the debugger (which may be actually the most important if you mean what i mean - but i dont really think so, so i list it as last), but mind the following remarks:

1.) When i say "build support" i dont actually mean an in-editor build support - if that is what you mean, then it would be a big NO.
I think the "build support" in Notepad++ is the ultimate perfection, because it allows me to call external batch file to do the work, so i have absolute control of the process and can use preprocessors and various scripts to parse the source before handing it over to the compiler, and more.
So, in NP++ i can define separate shortcuts for preprocess active file, preprocesing all files in project, preprocessing & building active file or building all files in project, all using my batch files and external processes - and that is what I mean by "build support".

2.) I dont understand the "Debugger Support"
I mean in direct relation to Papyrus - you are working on a realtime debugger? If so, then yes, that would be amazing feature, but i am having a hard time imagining it being true :)
If you mean anything else by it, then i dont think it would be of any importance to me, in which case you can scratch my vote for "Debugger Support".

Link to comment
Share on other sites

One big one that was missing from Atom, though added via an addon that wasn't really good, is block selection of text, then copying and pasting. For those not familiar that, it is being able to select a rectangular area within the text and manipulate it. Or paste into an area inserting such things. Notepad++ has a form of it that I still find lacking in some cases, and I use another generic text editor EmEdit when I need specific assistance with it. I know this is a bit of an edge case use, but hey you asked for other comments.

 

 

Something that I find missing is the inclusion of variable definitions underneath an expandable function list to show which variables are declared within the function. Not something that is absolutely necessary but it can be useful. This is something I'm used to from full out Visual Studio and other full featured programming IDEs.

I wasn't aware of it until I checked but it looks like you can select columns/rectangles with Shift-Alt and the mouse, or Ctrl-Shift-Alt and the arrow keys. Looks like there are some extensions for aligning text into columns. Looks like this:

 

 

The local variables thing is actually already supported in the code browser thing. Looks like this:

 

 

(oops looks like I can't insert images)

Link to comment
Share on other sites

2.) I dont understand the "Debugger Support"

I mean in direct relation to Papyrus - you are working on a realtime debugger? If so, then yes, that would be amazing feature, but i am having a hard time imagining it being true :smile:

If you mean anything else by it, then i dont think it would be of any importance to me, in which case you can scratch my vote for "Debugger Support".

 

Yes, a real time debugger with breakpoints that allow you to inspect scripts at runtime. Joel Day did it for Fallout 4 already with Skyrim support in the wings.

Link to comment
Share on other sites

1.) When i say "build support" i dont actually mean an in-editor build support - if that is what you mean, then it would be a big NO.

I think the "build support" in Notepad++ is the ultimate perfection, because it allows me to call external batch file to do the work, so i have absolute control of the process and can use preprocessors and various scripts to parse the source before handing it over to the compiler, and more.

So, in NP++ i can define separate shortcuts for preprocess active file, preprocesing all files in project, preprocessing & building active file or building all files in project, all using my batch files and external processes - and that is what I mean by "build support".

 

2.) I dont understand the "Debugger Support"

I mean in direct relation to Papyrus - you are working on a realtime debugger? If so, then yes, that would be amazing feature, but i am having a hard time imagining it being true :smile:

If you mean anything else by it, then i dont think it would be of any importance to me, in which case you can scratch my vote for "Debugger Support".

As for 1, builds can already be done now that same way just using vscode build task configuration and that ability wouldn't be removed by the extension so that's not really a problem. VSCode lets you set up build tasks and dependent build tasks so all of that can already be done. All I was talking about was some easy auto-configuration of builds for people who aren't familiar with the sort of advanced stuff you're describing.

 

As for 2, the debugger support already exists. It looks like this:

 

29491-1570728386-1585549388.jpeg

 

I'm not sure if all data inspection features fully work in SSE but breakpoints work and the stuff you see above all works.

 

This tells you how to set it up https://www.nexusmods.com/skyrimspecialedition/mods/29491 (scroll all the way down)

Edited by nimrodxy
Link to comment
Share on other sites

  • Recently Browsing   0 members

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