Search found 8984 matches
- Mon Apr 22, 2024 7:12 am
- Forum: Macros
- Topic: Drop down list in HTML frame (creating a SELECT control)
- Replies: 3
- Views: 38
Re: Drop down list in HTML frame (creating a SELECT control)
I like using templates for my html and then fill in the blanks using strformat(). For example, I recently gave this advice to someone else [H: template = ' <tr> <td colspan=2 class="wp"><a href="macro://MagicC@Lib:tkn/all/%{activeId}?%{args}">%{image}</a></td> <td colspan=2 class...
- Sun Apr 21, 2024 10:51 pm
- Forum: Macros
- Topic: Drop down list in HTML frame (creating a SELECT control)
- Replies: 3
- Views: 38
Re: Drop down list in HTML frame (creating a SELECT control)
I believe the commas are from the for() loop. [for:] - set your separator to "".
Generally speaking, the best practice is to put your output in to a variable then send to frame at the end. Then all your code will have [h] option to prevent unwanted output.
Generally speaking, the best practice is to put your output in to a variable then send to frame at the end. Then all your code will have [h] option to prevent unwanted output.
- Sat Apr 13, 2024 12:21 am
- Forum: Macros
- Topic: input box that updates as information is entered.
- Replies: 3
- Views: 152
Re: input box that updates as information is entered.
If the sum is always 10 do you really need a 2nd entry? I guess it depends on what you're trying to accomplish, but no, it can't be done through input().
- Thu Apr 11, 2024 1:44 am
- Forum: Macros
- Topic: Display issue "\n"
- Replies: 2
- Views: 34
Re: Display issue "\n"
Okay found it here in Discord: https://discord.com/channels/2962308222 ... 8699633724
We were discussing how best to import a raw json structure and I include a test token.
We were discussing how best to import a raw json structure and I include a test token.
- Thu Apr 11, 2024 1:27 am
- Forum: Macros
- Topic: Display issue "\n"
- Replies: 2
- Views: 34
Re: Display issue "\n"
Yeah, it's an encoding thing from how you're inputting the data. For example, if you use input() to get data it will have those kind of symbols. What I end up doing is putting the data in a macro then use getMacroCommand() to read in the raw data as a json. I wrote a code snippet recently somewhere,...
- Wed Apr 03, 2024 2:35 pm
- Forum: Macros
- Topic: Any reason not to use an event handler heavily?
- Replies: 3
- Views: 106
Re: Any reason not to use an event handler heavily?
For the most part, it doesn't matter until it matters.
It is poor design to do unneeded actions, but if you don't notice a performance hit, then it doesn't really matter.
Now if you're trying to predict the limits, it's not really possible until you implement your code.
It is poor design to do unneeded actions, but if you don't notice a performance hit, then it doesn't really matter.
Now if you're trying to predict the limits, it's not really possible until you implement your code.
- Sun Mar 31, 2024 6:44 pm
- Forum: Macros
- Topic: json.remove multiple times on the same array used in a loop
- Replies: 3
- Views: 100
Re: json.remove multiple times on the same array used in a loop
[h: newrounds = "[]"] [h: actiontoreport = "[]"] [h, FOREACH(curjson, rounds), CODE: { [h, if(json.get(curjson, "Round") < moveday): actiontoreport = json.append(actiontoreport,json.get(curjson, "Action")); newrounds = json.append(newrounds,curjson)] }] [H: r...
- Sun Mar 24, 2024 5:42 pm
- Forum: Macros
- Topic: I think I found an error in the maptool wiki...
- Replies: 1
- Views: 54
Re: I think I found an error in the maptool wiki...
It does work as is, but if you don't have "Use Tooltips for inline rolls" set in your preferences, you'll get a bunch of other text with it.
But the best practice is to use [R:] in front. I went ahead and updated the wiki.
But the best practice is to use [R:] in front. I went ahead and updated the wiki.
- Mon Mar 18, 2024 4:28 am
- Forum: MapTool
- Topic: On my own, how can I manage my preferences?
- Replies: 1
- Views: 130
Re: On my own, how can I manage my preferences?
I'm guessing you are using MTPlayer token to play your sounds which plays to all clients at once and if you're playing in person you don't want it to play to all the clients, just the server. There's a line near the bottom for the audio macro. [H: execLink(audioByte,1,"all")] where you can...
- Sun Mar 17, 2024 2:10 am
- Forum: Macros
- Topic: Adding selected campaign macros to right click menu of PCs
- Replies: 6
- Views: 132
Re: Adding selected campaign macros to right click menu of PCs
Not sure I can explain it better. "macroName" is just the name of any macro you define and is just a placeholder.
- Sat Mar 16, 2024 3:52 pm
- Forum: Macros
- Topic: Adding selected campaign macros to right click menu of PCs
- Replies: 6
- Views: 132
Re: Adding selected campaign macros to right click menu of PCs
If you're handling all the tokens, then I don't think you need to get very fancy. Just create a macro to "Initialize" your token. The "do something when this happens in MT" is called an Event Handler and those are very limited. Sometimes you can piggyback off an event not related...
- Sat Mar 16, 2024 3:12 am
- Forum: Macros
- Topic: Adding selected campaign macros to right click menu of PCs
- Replies: 6
- Views: 132
Re: Adding selected campaign macros to right click menu of PCs
It could be a little tricky, but it can be done. To prevent players from placing tokens on the map, I would have a mouse over event check the token. Basically, the default value of a token will run a macro, do the checks, then set the field to blank once done so it doesn't run again. You can use thi...
- Wed Mar 13, 2024 8:29 am
- Forum: MapTool
- Topic: Venturing into the World of D&D DMing
- Replies: 1
- Views: 67
Re: Venturing into the World of D&D DMing
Although, I'm more than 50% sure this is a chat bot post since asking about Roll20 macros and not MapTool macros is a bit of a giveaway. MapTool macro system, imo, is far easier and powerful than the other VTTs out there. If you're looking to use detailed character stats I recommend one of the exist...
- Tue Mar 12, 2024 5:00 am
- Forum: MapTool
- Topic: Salutations, esteemed Framework users!
- Replies: 1
- Views: 64
Re: Salutations, esteemed Framework users!
There are threads for the 5E frameworks in our Discord. You'll probably get a better response from there. But generally speaking, if there is one macro that displays the compendium information you can limit access with the following line at the top of macro. [H: assert(isGM(),"No player access ...
- Fri Feb 16, 2024 12:06 pm
- Forum: Macros
- Topic: macroLink issue resurfaces...
- Replies: 4
- Views: 171
Re: macroLink issue resurfaces...
Put an H in front of broadcast and specify the targets if not "all".
Also, NPCs probably return "" for tokenOwner, so it then sends to all instead. I would use an if(isNPC()) for 2 different broadcasts.
Also, NPCs probably return "" for tokenOwner, so it then sends to all instead. I would use an if(isNPC()) for 2 different broadcasts.