Notepad++ Maptool Text Editor config file [UPDATE: 5/31/12]

Show off your RPG maps, campaigns, and tokens. Share your gaming experiences and stories under General Discussion and save this forum for things you've created that may help others run their own games. Use the subforums when appropriate.

Moderators: dorpond, trevor, Azhrei, Gamerdude

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file [UPDATE: 2/26]

Post by aliasmask »

wolph42 wrote:AM, a couple of the links in the OP are dead!!
Weird. I think it may be sugarsync because that is the correct link given to me when I get as public link. I'll have to check it out later. The zip file has most of the downloadable links files.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file [UPDATE: 2/26]

Post by aliasmask »

Okay, I fixed the links in OP.

For coders who use the collapsible features of notepad++, I recommend using the portable version if you're dealing with large files. There is a delay on several actions when using a couple thousand lines and collapsing unused code. It's not that bad at a couple of thousand. Once you reach about 6 or 7 it becomes really noticeable and at 12 thousand it is a nuisance. The portable version doesn't have this problem. So, if you experience long delays when changing to a tab with collapsed bits of code, then switching is what you want to do.

You can read some other posts in this thread for installing the portable version and file locations.


User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file [UPDATE: 5/31/

Post by aliasmask »

wolph42 wrote:well it seems that again some links are dead, maptools.xml specifically
I'm thinking sugarsync has the public link expire if not used for X period of time (annoying). Most people, if any people probably use the zip file. I'll probably just remove the links.

badsequel
Giant
Posts: 115
Joined: Thu May 31, 2012 3:13 am

Re: Notepad++ Maptool Text Editor config file [UPDATE: 2/26]

Post by badsequel »

aliasmask wrote:There is a delay on several actions when using a couple thousand lines and collapsing unused code. It's not that bad at a couple of thousand. Once you reach about 6 or 7 it becomes really noticeable and at 12 thousand it is a nuisance. The portable version doesn't have this problem. So, if you experience long delays when changing to a tab with collapsed bits of code, then switching is what you want to do.
Dang I didn't know that.. I do know that 20mb+ xml files are no fun collapsing after running the xml pretty print functions on them..
My shared rpg stuff:
(exe)TokenNameChanger3: https://www.dropbox.com/s/cqsof54v3dl2k ... 3.zip?dl=0
Tiddly Spell Wiki: https://www.dropbox.com/s/53pya4k68mnvc ... ddly01.htm

Stuff to check out:
Mote Kickstarter(back it): https://www.kickstarter.com/projects/74 ... abletop-ev

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: Notepad++ Maptool Text Editor config file [UPDATE: 5/31/

Post by neofax »

It seems notepad++ 6.2 and this syntax highlighting no longer works fully. The folding capability seems to be broken.
Image
Time-Zone information UTC -5

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file [UPDATE: 5/31/

Post by aliasmask »

neofax wrote:It seems notepad++ 6.2 and this syntax highlighting no longer works fully. The folding capability seems to be broken.
Thanks for heads up. I'm still trying to figure out the "lag" issue with collapsing. I notice with portable it didn't have it but when I either added a plug-in or changed a setting I started to get lag again. I'll check out the new bug as well.

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: Notepad++ Maptool Text Editor config file [UPDATE: 5/31/

Post by neofax »

Well, the way I fixed it is to remove the @ symbol in the "Comment line style" Open parameter. This then allows the code to fold. However it breaks the MT code comments for the macro. i.e. @PROPS@
Image
Time-Zone information UTC -5


User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file [UPDATE: 5/31/

Post by aliasmask »

Totally forgot about this. I'm still using 6.1.8 and I did figure out the lag issue. If you don't have default.theme in the root of np++ then you get lag. Perhaps one of the version upgrades had removed it for me. Once I copied it from another install without the problem the problem version started working fine again.

As for the 6.2 fix, you need to open the user-defined dialog window. It WAS in the view menu, but was removed for some reason. You can now open it with the shortcut button on menu. Looks like a yellow lightning bolt and is just to the left of the record button. Select maptool language, select comment and number tab and remove the @ under comment line style. I had this there to make the macro name standout. Apparently, 6.2 had a GUI redo and the priorities of how/when things get processed was changed. Having the folding symbol and comment share a character no longer works. You can use another character like #, but that won't work in RPEdit until I create an update for it, so don't do it just yet.

Actually... They added some more keyword styles, so if you click on keywords list tab, under 5th group you can add the @, check prefix mode and set the style to burgundy color and bold. This will make it look mostly the same except when the macro name has a space where the formatting will end. Most of my function names are variable friendly, so this works out for me.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Notepad++ Maptool Text Editor config file [UPDATE: 5/31/

Post by wolph42 »

aliasmask wrote:Totally forgot about this. I'm still using 6.1.8 and I did figure out the lag issue. If you don't have default.theme in the root of np++ then you get lag. Perhaps one of the version upgrades had removed it for me. Once I copied it from another install without the problem the problem version started working fine again.

As for the 6.2 fix, you need to open the user-defined dialog window. It WAS in the view menu, but was removed for some reason. You can now open it with the shortcut button on menu. Looks like a yellow lightning bolt and is just to the left of the record button. Select maptool language, select comment and number tab and remove the @ under comment line style. I had this there to make the macro name standout. Apparently, 6.2 had a GUI redo and the priorities of how/when things get processed was changed. Having the folding symbol and comment share a character no longer works. You can use another character like #, but that won't work in RPEdit until I create an update for it, so don't do it just yet.

Actually... They added some more keyword styles, so if you click on keywords list tab, under 5th group you can add the @, check prefix mode and set the style to burgundy color and bold. This will make it look mostly the same except when the macro name has a space where the formatting will end. Most of my function names are variable friendly, so this works out for me.
thanks for the update. In the mean time I figured I could as well downgrade to the last 5.x version. Did this and everything is peaches again! When you've redone the user define, let me know so I can upgrade back again.
btw, i did not only notice a lag issue in 6.2 but also when fiddling with the code np had the tendancy to suddenly leave everything marked as quoted (italic blue) even when it shouldn't. This too is not the case in 5.x

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file [UPDATE: 5/31/

Post by aliasmask »

The lag is only noticeable with large files and having collapsed code segments without have default.theme in the root directory. With everything in place, I can switch tabs with no lag, but if not it has to reformat the huge file each time which takes awhile.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Notepad++ Maptool Text Editor config file [UPDATE: 5/31/

Post by wolph42 »

ah, thats not what I experienced. Swapping tabs always went smoothly. Formatting large texts takes a bit (few seconds). The only odd thing is the screw up of the formatting when you edit in 6.2 as I mentioned before.

User avatar
aliasmask
RPTools Team
Posts: 9023
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Notepad++ Maptool Text Editor config file [UPDATE: 5/31/

Post by aliasmask »

That just means you have default.theme in your root directory. Somehow, mine was deleted as some point.

evilC
Cave Troll
Posts: 49
Joined: Thu Mar 21, 2013 3:29 pm
Location: London, UK

Re: Notepad++ Maptool Text Editor config file [UPDATE: 5/31/

Post by evilC »

Thanks for this, I have been having a fiddle and I think I can improve the workflow:

I have written a proof of concept Autohotkey script to automate the process of getting the data from Maptool into Notepad++

Usage:
1) Set the Hotkey for Edit Token to F9.
2) Make sure Notepad++ is open.
3) Click Edit Token, and undock the window. It MUST be floating for this to work at the moment.
4) Close (X in top right) the Edit Token window.
5) Install Autohotkey, save the script below to an .ahk file, and double click it. You should have a green icon with a white H in your taskbar.
6) Hit F12 - this should open the "Edit Token" window, click Load, hit Enter to pass the dialog, click in the text box, hit ctrl+a, ctrl+c, tab into Notepad++ and hit ctrl-a, ctrl-v


CAVEATS:
No error checking at the moment, assumes it is going to work.
I suspect that if you have a different version (ie not Sun) of Java installed, it may not work.
May not work if font sizes are different or something - it is based on pixel offsets.

To Alias:
Is it maybe possible to add a Prefix to the name of the window? Maybe if you could I could get this to work with a docked dialog.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

coordmode, mouse, window
loadx = 75
loady = 70
textx = 50
texty = 150
savex = 160
savey = 70
closex = 595
closey = 10

F12::
	WinActivate, ahk_class SunAwtFrame
	send {F9}
	WinWait,ahk_class SunAwtDialog, , 2
	MouseMove, %loadx%, %loady%
	Click
	WinWait,ahk_class SunAwtDialog, , 2
	Send {Enter}
	Sleep, 1000
	MouseMove, %textx%, %texty%
	Click
	Send, ^a
	Send, ^c
	MouseMove, %closex%, %closey%
	Click
	
	WinActivate, ahk_class Notepad++
	Send, ^a
	Send, ^v
	return

Post Reply

Return to “User Creations”