
How do I add a comment to a macro/ability?
I have found conflicting information / tales of changes, but there is no official way that I can find in the manuals.
How do I add a comment to a macro/ability?
I have found conflicting information / tales of changes, but there is no official way that I can find in the manuals.
Have you looked on the reddit? https://www.reddit.com/r/roll20 there might be more information there!
Gregory, are you talking about putting comments in the rolls so that you can see what a given calculation is for by hovering over the inline roll (or seeing it inline if using /r)
If so, then that is what roll tags inline labels are:
/r 1d20 + 5[Bab] +2[Ability Score] -5[Penalties or [[1d20 + 5[Bab] +2[Ability Score] -5[Penalties]]]
gives the following output:
Hope that helps,
Scott
EDIT: apparently the name has changed to inline labels.
You can also trick the chat window into thinking something is a comment by putting a ! in front. It must be at the beginning of the line and everything on that line will be hidden from chat.
This is possible because a ! at the beginning of the line tells Roll20 that the line is an API command, which are not shown in the Chat Window.
Scott, I was not talking about hover text. Thanks though.
Kyle, this is also not what I want.
I want an actual coding comment. That never does anything. At all.
A ! at the beginning of a line will still run and prompt me for things. That is NOT a coding comment.
Like C++ has
// This is a single one line comment
What functionality are you trying to get by having comments in? I'm trying and failing to see how this could be used.
Macros are essentially saved chat entries. They were never intended to be a programming language, so they are very limited in many ways. Are basically looking for way to annotate longer macros?
To build on Keith's point, since they're essentially saved chat entries there is a way to add comments, sort of, but it's not perfect.
/em waves <!-- action --> Hello <!-- greeting -->
World <!-- recipient -->
I haven't experimented with URL-encoding the angle brackets or anything; this is the result of a quick I wonder if that'd work...? flight of fancy just now.
Hope it helps.
keithcurtis said:
Macros are essentially saved chat entries. They were never intended to be a programming language, so they are very limited in many ways. Are basically looking for way to annotate longer macros?
Yes.
All programming / macros/ complicated computer text type things should have comments that explains what is going on. Always. This is so other people can understand what the code is if anybody but the creator wants to read/use it.
// this only spits out the correct answer assuming....
// for similar macros, I found this one at www.listofhelpfulthingys.com
// For the me five years from now. Remember how this nomenclature works? No? Of course you don't! It has been five years! Lucky for you I explained what the hell is going on.
// here is some part of the functionality that will not come in play until I level up / get that sword / get my clothes back from the prison guards
// If you are just starting out, and have found this thingy, you CANNOT just copy/paste it into your own game. Here is why...
These are just SOME of the examples why comments are a thing.
Having extensive documentation just doesnt make sense for macros. Macros in roll20 or more similar to how the word macro was originally used: methods of automating repetitive keystrokes, and it was very unusual to have comments in those. Macros in roll20 were also intended to be short and simple, and for personal use. There's no easy way to share them, for instance. If you do want to share documented macros, you'd normally save them to something like gist, where you can document them freely.