Search found 936 matches

by StarMan
Mon Nov 07, 2011 4:12 pm
Forum: Macros
Topic: Change State with a Change in a Property?
Replies: 10
Views: 828

Re: Change State with a Change in a Property?

As BW says, you do have "Elevation+1", "Elevation+2" etc states defined in Campaign Properties, right? If so, then this should work: [h:Token="Bob the Kingfisher"] [h:sign=if(Change>0, "+", "-")] [h:setState("Elevation"+sign+Change, 1, Toke...
by StarMan
Tue Nov 01, 2011 12:08 pm
Forum: Macros
Topic: Benchmark: Fast and slow comments...
Replies: 11
Views: 1293

Re: Benchmark: Fast and slow comments...

OK I am less enthusiastic about these results given my very heavy dependence on the macro.return technique. :( Again, nowhere throughout my entire framework do I loop macro calls through enough iterations to produce any degree of degradation. Nevertheless it does give food for thought wrt my coding ...
by StarMan
Mon Oct 31, 2011 9:58 pm
Forum: Macros
Topic: Benchmark: Fast and slow comments...
Replies: 11
Views: 1293

Re: Benchmark: Fast and slow comments...

Woohoo, that's even better news! :lol: That means I am pushing the stack and still getting no overflow errors at all! Just goes to show ya there's a price to be paid for enormous GUIs and bulky macros. Yeah, they look pretty but if they're gonna tax available resources to the point of mandating a wh...
by StarMan
Mon Oct 31, 2011 2:44 pm
Forum: Macros
Topic: Benchmark: Fast and slow comments...
Replies: 11
Views: 1293

Re: Benchmark: Fast and slow comments...

Not only interesting findings but quite vindicating as well. I have sworn by the use of HTML comments vs 'h:' since Day 1. The only reason I can think of for prefacing all your lines with "h:" is so you can selectively debug. It's far easier to begin a "no-output" block of statem...
by StarMan
Fri Oct 28, 2011 9:34 pm
Forum: Macros
Topic: Basic Coding + Initiative
Replies: 217
Views: 7018

Re: Basic Coding + Initiative

Well in that case you would do this: [Token="Bob"] [MACRO("Make Prone@Lib:Token") : Token] and the code on your library token would be: [setState("Prone", 1, macro.args)] You may have to uncheck "Allow Players to Edit Macro" in the Options tab when editing the...
by StarMan
Fri Oct 28, 2011 8:48 pm
Forum: Macros
Topic: Basic Coding + Initiative
Replies: 217
Views: 7018

Re: Basic Coding + Initiative

This is where you send parameters for the macro to process. For example: [MACRO("Double@Lib:Token") : 3] And if the code for the "Double" macro on your library is: [macro.return=macro.args*2] ... then "6" will be the value returned in the "macro.return" variab...
by StarMan
Thu Oct 27, 2011 3:19 pm
Forum: Macros
Topic: Clean exit from WHILE()
Replies: 9
Views: 691

Re: Clean exit from WHILE()

What would be nice is if you could terminate loops or skip the remainder of the current iteration like ya can in Java. Any chance this will be included in a future MT build?
by StarMan
Mon Oct 24, 2011 2:23 pm
Forum: Macros
Topic: Modulus
Replies: 4
Views: 529

Re: Modulus

aliasmask wrote:How many -2s are in 11?
-5? i.e. -2 x -5 = 10
10 < 11?
by StarMan
Fri Oct 21, 2011 3:13 pm
Forum: Macros
Topic: This works but i dont like it! Something shorter?
Replies: 10
Views: 859

Re: This works but i dont like it! Something shorter?

He means to reorganize your code (known as "refactoring" in the lingo us programmers use). One trick I use is to use evalMacro as described in my post here . If you want to bundle several assignments together as it appears you do, then you can do something like this: [varsFromStrProp("...
by StarMan
Tue Oct 18, 2011 3:57 pm
Forum: Macros
Topic: Frame sharing, limitation or possible?
Replies: 7
Views: 529

Re: Frame sharing, limitation or possible?

Yeah I created a combat log as well attached to a framework macro called "Who attacked me?" which builds a round by round breakdown of sustained damage in the token's "Notes" tab. Unfortunately, my players rarely use it despite constantly asking, "I'm bloodied already? Why?&...
by StarMan
Tue Oct 18, 2011 3:37 pm
Forum: Macros
Topic: Canyou prevent players from using certain framework buttons?
Replies: 9
Views: 696

Re: Canyou prevent players from using certain framework butt

IMO this isn't so much a technical problem as an interpersonal one. If you're that concerned about Player X being dishonest, then you need to talk to him as opposed to Big Brothering the guy. Yes, I've taken these sort of measures in my framework but that was more so I can process the circumstances ...
by StarMan
Mon Oct 17, 2011 4:42 pm
Forum: Macros
Topic: More benchmarks: Storing variables
Replies: 3
Views: 371

Re: More benchmarks: Storing variables

conclusion: - Saving a var on a libToken is (relatively speaking) extremely slow, so storing each variable separately is inadvisable (assuming of course that you need the variables in one macro) Doing so on a regular non-libToken is no picnic either. I had a macro which ran at a glacial pace when s...
by StarMan
Fri Oct 14, 2011 3:24 pm
Forum: Macros
Topic: Basic Coding + Initiative
Replies: 217
Views: 7018

Re: Basic Coding + Initiative

Ok, so currently elevation in maptools is a bit complicated for me to run. At current, I set a public-visible elevation tag to objects and tokens on a ledge. I then add these tokens/objects to a basic 'getVisible' function and run the perception macro. (This macro rolls a passive perception test fo...
by StarMan
Fri Sep 30, 2011 1:57 pm
Forum: Macros
Topic: [COUNT(): inside a [COUNT():
Replies: 25
Views: 1834

Re: [COUNT(): inside a [COUNT():

If you feel it appropriate to make a separate macro call within your innermost code block then you may do so as I sometime do. However, when I really want to keep my code together I work around the nesting limit by using evalMacro . Your code then becomes: [dialog("Treasure Chamber", "...
by StarMan
Fri Sep 30, 2011 1:02 pm
Forum: Macros
Topic: Basic Coding + Initiative
Replies: 217
Views: 7018

Re: Basic Coding + Initiative

I assigned the macro to actually get the Attribute (str, dex, etc) and determine its modifier ((X-10)/2) then apply that, +1/2 level to the roll, and its working great. I'm finishing the whole thing up by including all the miscellaneous attack bonuses (proficiency, magic weapons, etc) and I'm curio...

Go to advanced search