Search found 444 matches

by biodude
Sun Jul 11, 2010 3:36 pm
Forum: MapTool
Topic: Quick, stupid question about the round() function.
Replies: 3
Views: 277

Re: Quick, stupid question about the round() function.

Do you want to round to the nearest integer, or a decimal place?
see Wiki: floor(), and Wiki: ceiling() for other rounding functions.
by biodude
Sun Jul 11, 2010 3:33 pm
Forum: Macros
Topic: Problem with UDF
Replies: 7
Views: 424

Re: Problem with UDF

I believe functions are case-sensitive (unlike many other aspects of the Macro script language). Therefore [r: getabilitymodifier(18)] will return an error if you defined the function as "getAbilityModifier". Granted, I would expect the error to be "function is not defined", but ...
by biodude
Sat Jul 10, 2010 8:46 pm
Forum: Feature Requests
Topic: [1.3b56-70] Try() function to suppress error messages?
Replies: 9
Views: 986

[1.3b56-70] Try() function to suppress error messages?

Error messages can be useful for debugging, but a pain to try to avoid at times. I would like to request a function that can attempt to execute code, and returns a logical to indicate whether the code generated any error messages. This would be similar to evalMacro, except that error messages would ...
by biodude
Sat Jul 10, 2010 8:27 pm
Forum: Macros
Topic: Multiple input screens in same macro?
Replies: 9
Views: 500

Re: Multiple input screens in same macro?

After lots of kvetching from my players, I had to design a combat macro that could be launched by the attacker and then modified by the defender. Supposedly there is an HTML trick that can do it, but the solution I wound up doing involved saving all the details of the first macro to a JSON of pendi...
by biodude
Sat Jul 10, 2010 8:22 pm
Forum: Macros
Topic: Suppress macro.return?
Replies: 10
Views: 470

Re: Suppress macro.return?

My practice is to IMMEDIATELY assign macro.args (when it it used) to a local variable first thing in a macro, and to keep track of return value in a local variable until the last line of the macro, which looks something like "[h: macro.return = value]" (when it is used). Yeah, me too. Kee...
by biodude
Sat Jul 10, 2010 11:56 am
Forum: MapTool
Topic: Change macro edit font?
Replies: 2
Views: 291

Re: Change macro edit font?

As far as I know, No, you can not. At least, not within the MapTool Interface, which means changes would have to be made 'under-the-hood'. Hopefully, one of the devs will be able to respond to that. In the meantime, many folks write their macro code in their preferred text editor: a search of the fo...
by biodude
Fri Jul 09, 2010 12:35 pm
Forum: Macros
Topic: Multiple input screens in same macro?
Replies: 9
Views: 500

Re: Multiple input screens in same macro?

As far as I know, nothing goes to chat until macro execution has stopped. The only way to show anything during macro execution is via the input function. I would suggest including the roll (and any other necessary information) in your second prompt. Alternatively, you could send a macroLink to chat ...
by biodude
Fri Jul 09, 2010 9:04 am
Forum: Macros
Topic: TOKEN macro and sub-macros
Replies: 6
Views: 627

Re: TOKEN macro and sub-macros

macroLink and macroLinkText both accept a target parameter -- the last parameter -- which is the target tokens to run the macro against. If its a single token the macro is run once, otherwise it is run each time for each target. The target token is the current token for that macro when the link is ...
by biodude
Tue Jul 06, 2010 8:05 pm
Forum: Macros
Topic: Adding information as the first entry of a json array
Replies: 10
Views: 587

Re: Adding information as the first entry of a json array

[h: isVisible=json.set("[]", "no target selected")] [h: isVisible=json.append(isVisible, getVisibleTokenNames())] I don't expect this will work, nor would it give you what you are looking for: - The first line has a small syntax problem (json.set is missing the second argument f...
by biodude
Tue Jul 06, 2010 12:44 pm
Forum: InitiativeTool
Topic: Integrating InitTool with MapTool
Replies: 4
Views: 2971

Integrating InitTool with MapTool

I would love to be able to use InitTool instead of MapTool's rudimentary initiative tracker (mostly for the reminders & such), but here are the challenges I have encountered trying to figure it out in a short time: - I can't figure out how to import a token from MT to IT, but this would be a gre...
by biodude
Mon Jul 05, 2010 8:17 am
Forum: Macros
Topic: Help!
Replies: 28
Views: 1346

Re: Help!

Is there a way to stop the macro from continuing through the rest of its code? I haven't run across it yet in the Wiki. Something like: if(condition is not met): end macro. Check out abort . Note that abort will end macro execution if the argument passed to it is == 0. Thus, you could achieve what ...
by biodude
Sun Jul 04, 2010 6:07 pm
Forum: Drop-In Macro Resources
Topic: Plo's Inventory Manager
Replies: 110
Views: 23567

Re: Plo's Inventory Manager

Well, I balk at using phrases like "you should do X" when describing what is a better (but more labor-intensive) way to code something, yes, it would be better if this was easier to install. I didn't for the aforementioned reasons, but I will recode things when I get the chance. Thought I...
by biodude
Sun Jul 04, 2010 1:30 pm
Forum: Drop-In Macro Resources
Topic: Plo's Inventory Manager
Replies: 110
Views: 23567

Re: Plo's Inventory Manager

ah, nm... yeah, I typically always use the getProperty. I wasn't thinking that other people didn't. Don't bother on my account. Sounds like a lot of extra work. I've started doing this when I have modularity and share-ability in mind. But a lot of the code here came out of my pre-existing FW-integr...
by biodude
Sun Jul 04, 2010 8:00 am
Forum: Macros
Topic: SetMacroProps, GetMacroProps,JSON, and semi-colons oh my!
Replies: 2
Views: 712

Re: SetMacroProps, GetMacroProps,JSON, and semi-colons oh my

I'm not familiar with the frameworks you're working with, but maybe I can comment on the metamacro code (BTW, a lot of that macro editing code is 'borrowed' from Rumble's batch macro deletion / copying macros, which I built on). I am most concerned about this line:       <!----code for semicolon tes...
by biodude
Sun Jul 04, 2010 7:38 am
Forum: Macros
Topic: Help with Slash commands, particularly /clr
Replies: 14
Views: 626

Re: Help with Slash commands, particularly /clr

Umm. Why would you need a macro to create a campaign macro? Doesn't every connected player have access to campaign macros? Set it up once for each campaign, and you should be good. The main reason I wanted it was to facilitate campaign set-up. My Framework has a Lib:Token, which also contains all t...

Go to advanced search