RPTools.net

Discussion and Support

Skip to content

It is currently Sun Nov 19, 2017 7:21 am 






Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Thu Mar 31, 2011 4:12 pm 
Okay, here's the fix: import this macro to your Campaign Macros, and run it before you copy a token (it will also work after you copy the token, but if you wait until after, you need to run it on each copy of the token, individually).

All you have to do is select the token you want to copy, run this macro, and then do Ctrl-C/Ctrl-V as usual. What the macro does is simply clear any cached character sheet information, which should keep the switchToken() error from popping up.


clearCachedQuicksheet.mtmacro [986 Bytes]
Downloaded 119 times

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight
Top
 Profile  
 
 Offline
Kobold
 
Joined: Wed Mar 30, 2011 7:44 pm
Posts: 6
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Thu Mar 31, 2011 4:48 pm 
Interesting. Works great. Thanks.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Thu Mar 31, 2011 6:42 pm 
Ian_Backlund wrote:
Interesting. Works great. Thanks.


No problem - thanks for finding the bug!

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
 Offline
Kobold
 
Joined: Wed Mar 30, 2011 7:44 pm
Posts: 6
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Wed Apr 06, 2011 2:23 am 
Ok, think I got another bug for you. I noticed that when I used the quicksheet to launch an attack, and attempted to target more than one enemy, I got an error in chat:

Error executing "switchToken": the token name or id "Ukj,Bruce Brucinski" is unknown.

The same attack works fine targeting two characters when I launch it from the selection pane macros.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Wed Mar 30, 2011 7:44 pm
Posts: 6
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Thu Apr 07, 2011 2:19 am 
I have a small fix.

Ongoing damage is not reported to the chat window.

To Fix:
The last line of rfw.processOngoing reads:
Code:
[r:token.name] takes <b>[r:DmgValue]</b> damage.

change it to:
Code:
[h:link = macroLinkText("rfw.deferDmgNote@this", "all",json.append("[]", token, DmgValue, DmgType), token)]
[r:execLink(link, 1)]


Top
 Profile  
 
 Offline
Kobold
 
Joined: Wed Mar 30, 2011 7:44 pm
Posts: 6
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Fri Apr 08, 2011 2:08 am 
OK I have some more info about the "multiple target" error bug.

at the end of rfw.processDamage there is this line:

Code:
[h,if(isFrameVisible("Quick Reference Sheet")),CODE:
{
    [macro("rfw.CharSheet@this"):target]
}]


Whenever the Quick Sheet is open and you are resolving damage against more that one target, the rfw.CharSheet call throws a "switchToken" error.
Right here at the top of rfw.CharSheet:

Code:
[h:context = getSelectedNames()]
[h,if(startsWith(context, "Lib:") || context == "Dummy_Target"): abort(0)]
[h:debug("context")]
[h:switchToken(context)]

If you have more than one target, getSelectedNames returns a list of target names and then switchToken gags on the list.

I confess I am not 100% sure why rfw.processDamage is even making this call. The target quicksheats should never be open during an attack, only the attacker's quicksheet. Maybe if you are on a different computer than your attacker, this code updates your hitpoints on your quick sheet? I removed those last four lines from rfw.processDamage and that takes care of the error, but I can't tell if I am causing other bugs.


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Fri Apr 08, 2011 7:32 am 
Ian_Backlund wrote:
OK I have some more info about the "multiple target" error bug.

at the end of rfw.processDamage there is this line:

Code:
[h,if(isFrameVisible("Quick Reference Sheet")),CODE:
{
    [macro("rfw.CharSheet@this"):target]
}]


Whenever the Quick Sheet is open and you are resolving damage against more that one target, the rfw.CharSheet call throws a "switchToken" error.
Right here at the top of rfw.CharSheet:

Code:
[h:context = getSelectedNames()]
[h,if(startsWith(context, "Lib:") || context == "Dummy_Target"): abort(0)]
[h:debug("context")]
[h:switchToken(context)]

If you have more than one target, getSelectedNames returns a list of target names and then switchToken gags on the list.

I confess I am not 100% sure why rfw.processDamage is even making this call. The target quicksheats should never be open during an attack, only the attacker's quicksheet. Maybe if you are on a different computer than your attacker, this code updates your hitpoints on your quick sheet? I removed those last four lines from rfw.processDamage and that takes care of the error, but I can't tell if I am causing other bugs.



Truthfully, I don't remember either. I'll take a look at it when I get a chance and see if I can remember why I did that - it could be that it was copied in from some other macro but doesn't actually need to be done, and I just forgot to remove it from processDamage.

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
 Offline
Kobold
 
Joined: Wed Mar 30, 2011 7:44 pm
Posts: 6
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Fri Apr 08, 2011 5:34 pm 
Another Small Fix:
Under the GM Utilities for PC Tokens, the Power Library button allows you to assign a PCpower to a PC. Some code is in there for adding an NPC power to a NPC, but it is incomplete.

To Fix:
replace rfw.addPowerFromLibrary with this:
Code:
[h:info = arg(0)]
[h:prsName = "PCPowers"]

[if(isNPC()),CODE:
{
   [h:prsName = "NPCPowers"]
}]

[h:Pwrs = getLibProperty(prsName, "Lib:PowerLibrary")]
[h:pcplist = json.fields(Pwrs)]

[h,foreach(p, pcplist),CODE:
{
   [if(json.contains(info, p)),CODE:
   {
      [mcbInfo = json.get(Pwrs, p)]
      [h:rfw.makeMacro(mcbInfo)]
   }]
}]


Now you should be able to select an NPC hit the Power Library button and assign an NPC Power.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Wed Sep 22, 2010 9:07 am
Posts: 6
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Wed May 11, 2011 5:29 pm 
Are powers suppose to be applying damage to the token the attack was made against? If so I am having issues with this.

Never mind, I found the toggle button. :oops:


Top
 Profile  
 
 Offline
Kobold
 
Joined: Fri Jun 10, 2011 10:36 am
Posts: 2
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Fri Jun 17, 2011 3:09 pm 
Hi! Thank you SO much for creating a framework for Gamma World. I'm a first time MapTool user, and I have a few questions regarding your framework.

First, is there an option for player decks? In Gamma World the player generally has their own deck of Alpha Mutations (and Omega Tech, but I'm not planning on using the Omega player decks, as it seems silly that the players would always find the same stuff, and it would be just what they wanted)

While you can play the game using the GMs Alpha Deck, it's nice for the players to have their own decks that they construct, this provides them an opportunity to select powers that follow a theme.

So, am I missing something, and I haven't figured out how to make player decks yet? Or if there currently isn't a player deck, I'm fairly familiar w/ coding, though I haven't messed w/ Java much, is it something I can duplicate based on the GMs deck, and port that to each player token? Please let me know! Thanks again for making this awesome framework!! This framework + Maptools is going to enable me to game w/ a group of friends I haven't played with in about a decade. :)


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Jul 01, 2008 6:48 pm
Posts: 6237
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Fri Jun 17, 2011 6:05 pm 
TheOtherRuss wrote:
Hi! Thank you SO much for creating a framework for Gamma World. I'm a first time MapTool user, and I have a few questions regarding your framework.

First, is there an option for player decks? In Gamma World the player generally has their own deck of Alpha Mutations (and Omega Tech, but I'm not planning on using the Omega player decks, as it seems silly that the players would always find the same stuff, and it would be just what they wanted)

While you can play the game using the GMs Alpha Deck, it's nice for the players to have their own decks that they construct, this provides them an opportunity to select powers that follow a theme.

So, am I missing something, and I haven't figured out how to make player decks yet? Or if there currently isn't a player deck, I'm fairly familiar w/ coding, though I haven't messed w/ Java much, is it something I can duplicate based on the GMs deck, and port that to each player token? Please let me know! Thanks again for making this awesome framework!! This framework + Maptools is going to enable me to game w/ a group of friends I haven't played with in about a decade. :)


No, there's no player deck functionality. However, I see no reason why duplicating the deck property to the player tokens, and writing macro code to have them draw from their own decks (note that it's not Java, it's a homegrown scripting language) wouldn't work. It'll be complicated, but if you start with the GM deck macros you can probably dope out how to do it.

_________________

What I'm Working On

MapTool Tutorials:
Introduction to Tokens
Introduction to Properties
Introduction to Macro Writing
Introduction to Light and Sight


Top
 Profile  
 
 Offline
Kobold
 
Joined: Fri Jun 10, 2011 10:36 am
Posts: 2
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Sat Jun 18, 2011 11:18 am 
Thanks for the info. Do you mind if I pm you if I get stuck?


Top
 Profile  
 
 Offline
Kobold
 
Joined: Fri Jul 10, 2015 9:24 am
Posts: 2
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Fri Jul 10, 2015 9:37 am 
This might not be supported anymore, but if anyone could lend a hand I would be super grateful!

When clicking "Manage Origins (F3)" under "GM Utilities for PC Tokens" in the Campaign settings, I get the following error message:

Code:
 Error in body of roll.       
Statement options (if any): h,if(which == "Add New"),CODE       
Statement Body (first 200 characters): { [h:odets = json.set("{}", "bprimary", "None", "bskill", "None", "bdef", "None", "boc")] [h:oname = "Add New"] [h:oprim = json.get(odets, "bprimary")] [h:oskill = json.get(odets, "bskil


Top
 Profile  
 
 Offline
Kobold
 
Joined: Fri Jul 10, 2015 9:24 am
Posts: 2
 Post subject: Re: [Gamma World] Framework Adaptation
PostPosted: Sat Jul 11, 2015 1:44 am 
jwfitt wrote:
This might not be supported anymore, but if anyone could lend a hand I would be super grateful!

When clicking "Manage Origins (F3)" under "GM Utilities for PC Tokens" in the Campaign settings, I get the following error message:

Code:
 Error in body of roll.       
Statement options (if any): h,if(which == "Add New"),CODE       
Statement Body (first 200 characters): { [h:odets = json.set("{}", "bprimary", "None", "bskill", "None", "bdef", "None", "boc")] [h:oname = "Add New"] [h:oprim = json.get(odets, "bprimary")] [h:oskill = json.get(odets, "bskil



This seems to have done the trick...

Changing:
Code:
[h,if(which == "Add New"),CODE:
{
   [h:odets = json.set("{}", "bprimary", "None", "bskill", "None", "bdef", "None", "boc")]
   [h:oname = "Add New"]
   [h:oprim = json.get(odets, "bprimary")]
   [h:oskill = json.get(odets, "bskill")]
   [h:odef = json.get(odets, "bdef")]
   [h,if(!json.contains(odets, "boc")): ovrc = "Bio"; ovrc = json.get(odets, "boc")]

};


To:
Code:
[h,if(which == "Add New"),CODE:
{
   [h:odets = json.set("{}", "bprimary", "None", "bskill", "None", "bdef", "None", "boc", "None")]
   [h:oname = "Add New"]
   [h:oprim = json.get(odets, "bprimary")]
   [h:oskill = json.get(odets, "bskill")]
   [h:odef = json.get(odets, "bdef")]
   [h,if(!json.contains(odets, "boc")): ovrc = "Bio"; ovrc = json.get(odets, "boc")]

};


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman