Campaign Buttons vs. Token Buttons (Macro Issues)

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

User avatar
Kizan
Giant
Posts: 178
Joined: Sun Apr 01, 2007 2:09 pm
Location: Near Midville, OH

Re: Campaign Buttons vs. Token Buttons (Macro Issues)

Post by Kizan »

zEal wrote:I don't see any trusted functions in your code, which makes this behaviour seem a bit odd; but I haven't poked that deeply into it.


As for the client background, as you can see it looks a little odd:
Image
Yeah sorry about that. I put a post into TK's forum about it. Thanx for the heads up.

http://forums.rptools.net/viewtopic.php ... &start=330

Kizan

User avatar
zEal
Dragon
Posts: 944
Joined: Sun Mar 22, 2009 2:25 am

Re: Campaign Buttons vs. Token Buttons (Macro Issues)

Post by zEal »

Kizan wrote:Yeah sorry about that. I put a post into TK's forum about it. Thanx for the heads up.

http://forums.rptools.net/viewtopic.php ... &start=330

Kizan
No worries, I use my own 4E thingamajig :P I just didn't want to see you fall victim to a classic html blunder.

Now to try to get this back on topic:
Kizan wrote:zEal,

I hadn't tried that because I wanted the players to be able to build macro buttons by pulling the power description from the Lib:TKText and the math would then be done in my Lib:KZCombat. As you have probably guessed I want the players to be able to build own their macro buttons.

Thanx for poking at this. I wonder if it has something to do with the code the requires Lib tokens to not be editable by players. I don't know much about "trusted" tokens, but I remember reading something about them. That if you wanted it to be a trusted token you should setup the Lib token so that no one has ownership or something like that.

Kizan
zEal wrote:I don't see any trusted functions in your code, which makes this behaviour seem a bit odd; but I haven't poked that deeply into it.
Anyone have any ideas why the tooltips only seem to work if it's a trusted function?

User avatar
Kizan
Giant
Posts: 178
Joined: Sun Apr 01, 2007 2:09 pm
Location: Near Midville, OH

Re: Campaign Buttons vs. Token Buttons (Macro Issues)

Post by Kizan »

So I went and started a server and a client. Client connects just fine. On client if I go and press the "Basics Melee Attack" button on the token named "Copy Me 2" MT dies with the following error info.

Code: Select all

java.lang.StackOverflowError
	at java.util.regex.Pattern$Loop.match(Unknown Source)
	at java.util.regex.Pattern$GroupTail.match(Unknown Source)
	at java.util.regex.Pattern$BranchConn.match(Unknown Source)
	
Last edited by Kizan on Mon Apr 06, 2009 11:43 am, edited 1 time in total.

User avatar
Kizan
Giant
Posts: 178
Joined: Sun Apr 01, 2007 2:09 pm
Location: Near Midville, OH

Re: Campaign Buttons vs. Token Buttons (Macro Issues)

Post by Kizan »

and continues with this.

Code: Select all

at java.util.regex.Pattern$BranchConn.match(Unknown Source)
	at java.util.regex.Pattern$CharProperty.match(Unknown Source)
	at java.util.regex.Pattern$Branch.match(Unknown Source)
	
Last edited by Kizan on Mon Apr 06, 2009 11:43 am, edited 1 time in total.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: Campaign Buttons vs. Token Buttons (Macro Issues)

Post by jfrazierjr »

Stack overflow.. you have to increase your stack size before starting maptool
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
Kizan
Giant
Posts: 178
Joined: Sun Apr 01, 2007 2:09 pm
Location: Near Midville, OH

Re: Campaign Buttons vs. Token Buttons (Macro Issues)

Post by Kizan »

jfrazierjr wrote:Stack overflow.. you have to increase your stack size before starting maptool
Yup that was it. I don't think I've ever seen that error. (Guess I should have read the first line). The weird part is that I had people using those macros recently and didn't have that error. Well, I'll have my players update their settings. Thanx again.

Kizan

P.S. The Windows launcher is nice but doesn't work in Win x64 :-(

dorpond
RPTools Team
Posts: 5534
Joined: Thu Jun 01, 2006 2:05 pm
Location: Buffalo, NY

Re: Campaign Buttons vs. Token Buttons (Macro Issues)

Post by dorpond »

Disregard my post - I was in error.
How to use my bundled artwork (MT1.3B60+): http://forums.rptools.net/viewtopic.php?f=8&t=11759

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: Campaign Buttons vs. Token Buttons (Macro Issues)

Post by Craig »

Ah this is the problem here

If the macro is not trusted then it can not create its own << >> type rolls or tool tips.
For a very simple reason, it would allow players to cheat, so << and >> are stripped and
you end up with what you have.

If a macro is trusted then its assumed either the GM has written or OK'd it, and since it is not player editable then it can return what it likes. So if you want your user defined functions to create verified rolls it will either have to be run from the campaign panel or a button that has player editable un selected.


Edit: as clarification if it returns a value that does not contain such formatting then normal formatting rules applied, so if you had a function called attackVal() and it returned a number, when doing [attackVal()] you would get something like << attackVal() = 3 = 3>>.

Post Reply

Return to “Macros”