RPedit - Macro Importer/Exporter and Editor [4/19/13]

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by aliasmask »

Full Bleed wrote:Great tool. It's amazing that I'm just getting around to using this with Notepad. Heck I'd totally be for hardcoding a context menu option to "Edit in RPEdit" in Maptool macro buttons and tokens! ;)


Btw, I'm trying to get dark backgrounds and light text in my editors. Where should I edit that code to have RPEdit open with a black background and white text?
Can't do it in the macro code because the form elements can't be formatted that way with css or other attributes. You will have to the tinyLaF to change those colors and fonts. I know Az did an upgrade in b87 so the tinyLaF requires other stuff to build the default.theme file (can't just run it like before), but you can probably just use b86's tinyLaF to make those changes and drop it in the executables directory as default.theme.

aRTy
Kobold
Posts: 4
Joined: Sat Apr 21, 2012 7:10 am

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by aRTy »

I recently had the problem described here ("input value..." crash). I wrote a makro to list all properties of the selected token with checkboxes, so one can pick those one wants to delete/reset (including stuff like an "invert selection"-option to minimize clicking). It is probably not that complex, but maybe handy.

I'm rather new to maptool, but I gained knowledge of your tool while improving a framework of a friend, whos RP group I joined a few months ago. Since it was very useful I wanted to ask whether you are interested in adding the makro I wrote or if there is another (better fitting) place for it.

Regards,
aRTy

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by aliasmask »

I use this tool: Token Manager to mess with token properties, even the hidden ones. I think your update would be more appropriate there. I haven't used it in awhile, but I don't think it has a way to delete many props at one time.

I did an update to that tool to handle some of the funky data structures I use that it didn't like, so be sure to update that version.

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

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by wolph42 »

I just got the following error when trying to use the 'button' option for the Bag of Trick, ontokenmove lib. :
java.util.UnknownFormatConversionException: Conversion = '2' error executing expression line1 = strformat(strformat('
%{t.macroButton}
%{t.color}
%{t.font}
%{t.tooltip}
'),minWidth+6,link).
I've also tried downloading the live version, same result.

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by aliasmask »

Yeah, that line of code is a bit iffy when I did it. You probably have a special character in one of your macro buttons, like a % or $. Does this apply to the latest version of your BoT?


ShanG
Kobold
Posts: 8
Joined: Sat Jun 02, 2012 2:01 am

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by ShanG »

Hey there.

I've been using RPEdit for a while, it's been a great resource and super-helpful for my more complex macros. I took a break from working on my maptool framework for a while (life going on, that sort of thing) and after coming back to it RPEdit doesn't work right anymore.

Whenever I select a function to load, the label (function name) is undefined. It asks me to input a value for label, and fails with 'unresolved value for label' if I cancel out. If I do input a label, it uses that label instead of the macro name, and it asks me again for every macro I try to load. If I close out of the 'load' window without selecting one, I get a nullpointerexception 'hasInput = input(json.toList(inputStr,"##"))'.

I can't figure out what might have happened to cause this - I've tried changing every configuration option in there, re-installing the lib token, and both the 1.0 and 1.3 versions of the token just to be sure. None of that fixed the problem. I searched through the thread, and didn't find any related keywords, but I didn't read the entire thing in depth so I apologize if this has been covered - could someone tell me what's causing my issue?

Edit 1: Strangely, when I load the 'edit token' macro itself, it loads and uses the proper label. Why would that one work and not, say, 'configOptions' or 'closeOpenFrames'

Edit 2: There's a couple other macros which will load the correct name as well - 'verifyId' for another example on the RPedit token itself. I'm still not sure what the difference between them is.

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by aliasmask »

It sounds like you may be manually editing the token macros in between loads. For example, if you move a macro from one group to another or change a name, then you need to reload RPEdit. There is also a REFRESH button under Buttons you can use. I find it easier to just close and reopen. Now if this isn't the case, you can upload your token and I can check it out.

ShanG
Kobold
Posts: 8
Joined: Sat Jun 02, 2012 2:01 am

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by ShanG »

I haven't been doing any edits, is the weird thing - I start up maptool, run RPedit, and I get errors the first time I try to load the token.

I created a new token and started copying macros over piece-by-piece. Here's an example using (partial) CSS styles:
@@ @css_Test_One
@@ @css_Test_Two
@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=;color=default;playerEditable=false;applyToSelected=false;group=Styles;tooltip=;minWidth=
body
{
background-color:#ece9d8;
color:#000000;
font: 12px;
}
!!

@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=;color=default;playerEditable=false;applyToSelected=false;group=Styles;tooltip=;minWidth=
body{background-color:#ece9d8;color:#000000;font: 12px;}
!!

@@ @css_Test_Three
@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=;color=default;playerEditable=true;applyToSelected=false;group=Styles;tooltip=;minWidth=
body{background-color:#ece9d8;color:#000000;font: 12px;}
h1{font-weight:bold;text-align:center;}
!!
The first version gives me the labeling error when I try to load it. The second and third work fine.

And using another Macro, if I try to load:
@@ @createToken
@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=;color=default;playerEditable=false;applyToSelected=false;group=Setup;tooltip=;minWidth=
[h: name=json.get(macro.args,"Name")]
[h: type=json.get(macro.args,"Type1")]
[r: tokenID=copyToken("New "+type, 1, "Storage","{name:'"+name+"'}")]
!!
I get an error, but if I remove the linebreaks and load:

@@ @createToken
@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=;color=default;playerEditable=false;applyToSelected=false;group=Setup;tooltip=;minWidth=
[h: name=json.get(macro.args,"Name")][h: type=json.get(macro.args,"Type1")][r: tokenID=copyToken("New "+type, 1, "Storage","{name:'"+name+"'}")]
!!
Then it seems to work. But I could swear to you that it was working just fine when I wrote the majority of those code, so I don't know what's changed. Is there something that would be causing it to choke on newlines in the body of the macro?

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by aliasmask »

What text editor are you using? The first line may be a problem because there is no more macro data and I may need to check for empty data in a new place. It looks like you're trying to next the macros.

@@ @css_Test_One - would be the whole macro line
@@ @css_Test_Two
@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=;color=default;playerEditable=false;applyToSelected=false;group=Styles;tooltip=;minWidth=
body
{
background-color:#ece9d8;
color:#000000;
font: 12px;
}
!!

@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=;color=default;playerEditable=false;applyToSelected=false;group=Styles;tooltip=;minWidth=
body{background-color:#ece9d8;color:#000000;font: 12px;}
!!
Is the second macro. You see it'll include some unintended code.
@@ @createToken
@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=;color=default;playerEditable=false;applyToSelected=false;group=Setup;tooltip=;minWidth=
[h: name=json.get(macro.args,"Name")]
[h: type=json.get(macro.args,"Type1")]
[r: tokenID=copyToken("New "+type, 1, "Storage","{name:'"+name+"'}")]
!!
This looks to be formatted fine. I saved and loaded it without a problem.

ShanG
Kobold
Posts: 8
Joined: Sat Jun 02, 2012 2:01 am

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by ShanG »

I'm using notepad++ with your language definition file. And I think I just screwed up the copy and paste in that post - I wasn't actually saving one macro inside the other like that.

At this point I'm wondering if it isn't something to do with my Maptool installation/settings, since it happens even when I create a new map, a new token, and a new macro, then try to load it. Saving seems to work okay, though.

I'll upload my Lib token, then, and you can tell me if you see anything wrong with it. Fair warning, though, I tend to subscribe to the theory that if something is worth doing, it's worth /over/doing. My campaign framework is relatively large compared to the others I've downloaded. :oops:
Attachments
LibMHR.rptok
Marvel Heroic Roleplaying Library Token
(74.84 KiB) Downloaded 49 times

User avatar
Bone White
Great Wyrm
Posts: 1124
Joined: Tue Aug 23, 2011 11:41 am
Location: Cornwall, UK

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by Bone White »

ShanG wrote: My campaign framework is relatively large compared to the others I've downloaded. :oops:
Usually it's because it includes pictures. My framework contains only two token pictures which are 100x100 jpgs, but it sizes up to 420kB.

ShanG
Kobold
Posts: 8
Joined: Sat Jun 02, 2012 2:01 am

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by ShanG »

Ah! Yeah, that must me it. I've got a whole set of custom dice tables in multiple colors, along with having used an image of the book's cover as the token image.

User avatar
booga
Dragon
Posts: 365
Joined: Fri Dec 14, 2007 9:00 am

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by booga »

First, thanks to Aliasmask for this wonderful tool. It's really nice when I need to translate a FW from French to English, among others.

I am currently using the RPedit v1.3pre MT1.3.b84 lib token to work on my frameworks, and noticed an oddity when I export the macros from a French language framework lib that includes HTML entities converted from accents (é for é for exemple). When I export macros using RPedit, all these HTML entities got a space added to them at the end: "é" becomes "é ", and so on. This does not occur if I use the ASCII entities instead (é for é for example), but I'd rather use the former one as I have an automated converter in Notepad++ that saves me a lot of time :) This is of course kind of a problem when these characters are in the middle of a word, and it takes a long time to correct them one by one afterwards.

Do you know what could cause this problem, and is there an "easy" alteration I can add to RPEdit macros to prevent this ? Thanks in any help for any advice you can provide on the matter.

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

Re: RPedit - Macro Importer/Exporter and Editor [7/17/11]

Post by wolph42 »

I've just discovered a fairly big issue with rpedit. Im doing a major overhaul of the BoT and suddenly encountered strange errors. After quite a while of debugging I noticed that rpedit replaces ";" with "; ". I did notice this before in
[...CODE:{
}; {
}]
where I always wondered where the space in "; " came from and now I realise its from rpedit. The issue is with the following line(s):

Code: Select all

[h,if(!returnArg): result = "<a href='macro://gotoToken@lib:OnTokenMove/none/impersonated?[" %{currentMap}" , " %{tok}" , " %{copyTok}" , " %{X}" , " %{Y}" ]'>"+if(showImage, "<img src=%s></img>", "<!-- %s -->")+if(showName, "%{tok}", "")+if(showLayer, " (%s)", "")+"</a>" ; result = "%{tok}"] 
specifically """ being turned into "" " which FU the whole link...
Is this something you think you can fix??

Post Reply

Return to “Drop-In Macro Resources”