RPedit - Macro Importer/Exporter and Editor [4/19/13]
Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
We've had this problem in a recent game with a certain macro using 1.4.1.8. cut/paste was the general fix.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Thanks for the fix... unfortunately, I can't drop this token into 1.4.0.5 without it throwing an error:
Ultimately, I was just surprised how many of my lib token IDs were bad. I guess once they go bad they stay bad.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Go ahead and download again. I saved it under b91 for compatibility.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
So I was able to drop the new tptok file in...
But I'm still running into problems.
1) When trying to run Edit Token I get "Undefined function: am.rpe.mtIdBugFix"
2) Silly me, run the rpedit onCampaignLoad after dropping the new token...
3) Try again. No dice. Same error.
4) Look for "mtIdBugFix" function. It's not there.
5) Add the function using the code you posted above to the rpEdit lib.
6) Run rpedit onCampaignLoad again.
7) Test on busted token and get the following error:
Error executing "copyToken": the token name or id "00000000000000000000007302695320" is unknown on map "null".
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Okay, not sure how the function didn't make it on the token, but I fixed that.
Does the id listed match the id of the token? My worry is if the bad id looks like a hex number and strformat converts it to decimal. Another possibility is if the token is not on the token layer copyToken won't copy it without using other parameters. I don't have a "bad" token to test on, so I'm relying on your feedback.
Does the id listed match the id of the token? My worry is if the bad id looks like a hex number and strformat converts it to decimal. Another possibility is if the token is not on the token layer copyToken won't copy it without using other parameters. I don't have a "bad" token to test on, so I'm relying on your feedback.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- Full Bleed
- Demigod
- Posts: 4736
- Joined: Sun Feb 25, 2007 11:53 am
- Location: FL
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
It's not working. But it's a different error than the one I got when I created the missing function myself... back to the original error.aliasmask wrote: ↑Fri Dec 21, 2018 6:14 amOkay, not sure how the function didn't make it on the token, but I fixed that.
Does the id listed match the id of the token? My worry is if the bad id looks like a hex number and strformat converts it to decimal. Another possibility is if the token is not on the token layer copyToken won't copy it without using other parameters. I don't have a "bad" token to test on, so I'm relying on your feedback.
On a bad token I get the following error:
Using getSelected() the ID of the token is: 0000000007302695320E000000000000Error executing "getName": the token name or id "7302695320" is unknown.
Couple other bad IDs:
0000000008302695640E000000000000
0000000007302695420E000000000000
All of the tokens are on the Token layer.
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Yeah, the E00... is the problem. Since it's a valid number format. It's going to remove all those ending 0's and there's no way to know how many are supposed to be there. You'll have to manually cut/paste those tokens to get a workable token id.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Sorry this may be a dumb question, but once I "load" the code and it shows up in Edit Token window, how do I select & copy all of it without having to scroll through the whole window?
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
I just use ctrl-A to select all. I think you can triple click the text as well. Then you use ctrl-c to copy.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Hey, noob MapTool coder here. This is a fantastic tool, thanks a lot.
I don't know if it came up already but one thing I found a bit annoying was the ordering of the macro "headers" (@@macroName.*\n@PROPS@.*) properties. In my code editor I always see the font color of a method very prominently May I suggest a default ordering like this in reformatMacroOutput: "tooltip,group,applyToSelected,autoExecute,playerEditable,sortBy,color,fontColor,fontSize,minWidth".
This way its easy to see what a macro does in an external editor:
Thanks again for this!
P.S. I know theres backwards compatibility issues with this - I just thought I'd mention this coming from the perspective of a new user
I don't know if it came up already but one thing I found a bit annoying was the ordering of the macro "headers" (@@macroName.*\n@PROPS@.*) properties. In my code editor I always see the font color of a method very prominently May I suggest a default ordering like this in reformatMacroOutput: "tooltip,group,applyToSelected,autoExecute,playerEditable,sortBy,color,fontColor,fontSize,minWidth".
This way its easy to see what a macro does in an external editor:
Thanks again for this!
P.S. I know theres backwards compatibility issues with this - I just thought I'd mention this coming from the perspective of a new user
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Oh, I see. I thought you meant the order in which macros appear in full document. You're just talking about the PROPS line. Having the tooltip first makes the most sense. I've thought about removing the props line and just include it in the comments of function instead. Something like
And removing the @@ @macroName completely. The trick will be in the formatting. Using <!--- (3 dashes) will signify and generate the needed options for the special header and would be compatible with putting in to the macro. The header and ender will/can post macro data to the debugger.
But those are just thoughts I have and aren't really being worked on. I'll keep your suggestion in mind if I do make some changes. It looks like you made the changes yourself for the PROPS header, so I don't need to go in to how to do it (ie change 1 or 2 lines of code).
Thanks for your input.
Code: Select all
<!--- Macro: macroName(arg1,arg2|arg3);
Tooltip: ...
-->
<!-- Your code here -->
<!-- Special Macro Ender --->
But those are just thoughts I have and aren't really being worked on. I'll keep your suggestion in mind if I do make some changes. It looks like you made the changes yourself for the PROPS header, so I don't need to go in to how to do it (ie change 1 or 2 lines of code).
Thanks for your input.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Hey, thanks for the info!aliasmask wrote: ↑Wed Jan 13, 2021 8:17 pmOh, I see. I thought you meant the order in which macros appear in full document. You're just talking about the PROPS line. Having the tooltip first makes the most sense. I've thought about removing the props line and just include it in the comments of function instead. Something like
And removing the @@ @macroName completely. The trick will be in the formatting. Using <!--- (3 dashes) will signify and generate the needed options for the special header and would be compatible with putting in to the macro. The header and ender will/can post macro data to the debugger.Code: Select all
<!--- Macro: macroName(arg1,arg2|arg3); Tooltip: ... --> <!-- Your code here --> <!-- Special Macro Ender --->
But those are just thoughts I have and aren't really being worked on. I'll keep your suggestion in mind if I do make some changes. It looks like you made the changes yourself for the PROPS header, so I don't need to go in to how to do it (ie change 1 or 2 lines of code).
Thanks for your input.
Yes, its a very simple change, really just one array string where the props are sorted. I was quite happy with it though so I thought I'd mention.
An even more advanced "proper" header as you suggest would be even better of course - but might also increase the file size (number of lines) quite a lot, no? Also I found the @@name quite practical as its easy/unique to search for.
I am just starting out and hacking in one framework, editing everything in one file, idk if thats "normal". It just seemed easiest to me as you basically get "free" code completion from just the one file itself.
Cheers!
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
"Lines of code" shouldn't really matter. I usually put a detailed header on most of work anyway. I would be changing one key word for another, but instead of macro: maybe I'll keep @@ since it's in the comments and it doesn't really matter other than readability. For Notepad++ the block will be changed from @@,!! to <!---,--->. That way, when sharing code, it won't confuse people and interfere with them entering a macro. I will include other new tools with RPEdit including UDFMaker and output() so sending html comments to the chat won't be an issue with stack size.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
I've used this a bit, but I mostly thought working in vanilla Notepadd++ was sufficient for my coding needs.
Then I started working on a new drop-in and I heavily leveraged RPedit and the Maptool notepad++ addons. OMG I was missing out on sooo much.
It greatly increased the speed at which I could troubleshoot, re-design, test, etc. Thank you for your fantastic contribution.
Then I started working on a new drop-in and I heavily leveraged RPedit and the Maptool notepad++ addons. OMG I was missing out on sooo much.
It greatly increased the speed at which I could troubleshoot, re-design, test, etc. Thank you for your fantastic contribution.
Re: RPedit - Macro Importer/Exporter and Editor [4/19/13]
Thanks. Yeah, the coloring and code blocks is handy. Along with ctrl-shift-C macro to quick copy a macro.
I really want to try out VS code, mostly because NP++ formatting goes wonky sometimes, especially when you have css and js code on the lib token.
I really want to try out VS code, mostly because NP++ formatting goes wonky sometimes, especially when you have css and js code on the lib token.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools