Papyrus syntax highlight for Notepad++

Post » Sun Jun 17, 2012 3:29 pm

9 out of 10 (imaginary) doctors agree that looking at Papyrus script in a text editor is a major source of eye strain and may result in scrambled brains :ohmy:

After a short wander through some of the script files I made a little syntax highlighter for that most versatile of text editors, Notepad++. It's a bit quick and nasty, I skipped reading any actual Papyrus language spec and simply configured it around a selection of the script files I was viewing, but it's functional, a reasonable start and my eyes have been thanking me all day :smile:

Examples:
http://www.i2net.me.uk/files/Skyrim/Notepad++/Before-1.jpg
http://www.i2net.me.uk/files/Skyrim/Notepad++/After-1.jpg

http://www.i2net.me.uk/files/Skyrim/Notepad++/Before-2.jpg
http://www.i2net.me.uk/files/Skyrim/Notepad++/After-2.jpg


Oh, so much better. Along with the usual variable type, string & comment highlighting, I've configured 'folding' for functions, STATE, EVENT, if and while : click on one of the little '-' in a box that appear on the left margin.

You can download (Right Click->Save As) http://www.i2net.me.uk/files/Skyrim/Notepad++/Papyrus.xml OR those who don't trust random links can copy the following into a new file and save it somewhere themselves, the file name MUST end in .xml

																			"00"00			if EVENT FUNCTION STATE WHILE			endif endEVENT endFUNCTION endSTATE endWHILE			( )			1{ 2} 0;			self else FALSE TRUE bool float int string keyword objectReference ReferenceAlias ImageSpaceModifier WordofPower Quest WordWallListenerQuestScript formlist activator GlobalVariable Scriptname spell			auto property native global Hidden			import extends																																																				

In Notepad ++: Menu 'View->User-Defined Dialouge' and select 'Import', navigate to the file downloaded/created and Bob should be a blood relative. The highlight settings should automatically apply to every .psc file you open.

Modify as you wish. No warranty provided :wink:

Enjoy :smile:
User avatar
Claire Jackson
 
Posts: 3422
Joined: Thu Jul 20, 2006 11:38 pm

Post » Sun Jun 17, 2012 6:35 pm

Really better off with this in the CK board. It's also in the wiki already.
User avatar
helliehexx
 
Posts: 3477
Joined: Fri Jun 30, 2006 7:45 pm

Post » Mon Jun 18, 2012 7:05 am

There is already an official Notepad++ Papyrus highlighting http://www.creationkit.com/Notepad%2B%2B_Setup, but I'll give yours a go :)
User avatar
alyssa ALYSSA
 
Posts: 3382
Joined: Mon Sep 25, 2006 8:36 pm

Post » Mon Jun 18, 2012 7:15 am

lol,

That's what I get for not reading the Wiki. Oh well, Today I learned two things :)
User avatar
Tinkerbells
 
Posts: 3432
Joined: Sat Jun 24, 2006 10:22 pm

Post » Sun Jun 17, 2012 7:50 pm

There's an autocompletion file there too, which can be helpful. I've been working on adding function definitions, but it's incomplete in that regard and if anyone else wants to help with that (you can use what I've done as a template) that would be very... helpful :P

Cipscis
User avatar
Marquis deVille
 
Posts: 3409
Joined: Thu Jul 26, 2007 8:24 am

Post » Sun Jun 17, 2012 9:50 pm

There's an autocompletion file there too, which can be helpful. I've been working on adding function definitions, but it's incomplete in that regard and if anyone else wants to help with that (you can use what I've done as a template) that would be very... helpful :tongue:

Cipscis

There looks to be a full (?) list of functions etc in the skse headder files, would save a LOT of typing. I was saving that for another day :tongue:

Really better off with this in the CK board. It's also in the wiki already.



I considered the CK board but:

The Creation Kit

For general questions on how to use the The Creation Kit for Skyrim.


Nope, doesn't fit there... or rather here as it is now. :stare:
User avatar
ezra
 
Posts: 3510
Joined: Sun Aug 12, 2007 6:40 pm

Post » Mon Jun 18, 2012 6:41 am

During the beta test we searched all the source files for the "native" keyword in order to make a complete list, so I'd expect everything's there. They don't all have their parameters, return values and descriptions defined, yet, which is what I was referring to.

Cipscis
User avatar
elliot mudd
 
Posts: 3426
Joined: Wed May 09, 2007 8:56 am

Post » Mon Jun 18, 2012 2:00 am

If we are talking about the same thing here (or if the following is equivalent to the script calls) Cipscis, then it was the headers for Alexander Blade's Script Dragon I was thinking about, not skse as I first mentioned. Alexander's headers look like machine extracted source from the executable - or he did a hell of a lot of typing. eg

From his skyscript.h file

Game.AddAchievement(int aiAchievementID)AdvanceSkill(char * asSkillName, float afMagnitude)IncrementSkill(char * asSkillName)Utility.RandomInt(int aiMin, int aiMax)WaitGameTime(float afHours)

etc. Way to much stuff to list and I suspect some functions are missing from script. Still may be worth a look.

http://alexander.sannybuilder.com/?category=other&altname=skyrim_script_dragon
User avatar
Nathan Risch
 
Posts: 3313
Joined: Sun Aug 05, 2007 10:15 pm


Return to V - Skyrim