[Gamma World] Framework Adaptation
Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice
Re: [Gamma World] Framework Adaptation
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.
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.
- Attachments
-
- clearCachedQuicksheet.mtmacro
- (986 Bytes) Downloaded 221 times
-
- Kobold
- Posts: 6
- Joined: Wed Mar 30, 2011 8:44 pm
Re: [Gamma World] Framework Adaptation
Interesting. Works great. Thanks.
Re: [Gamma World] Framework Adaptation
No problem - thanks for finding the bug!Ian_Backlund wrote:Interesting. Works great. Thanks.
-
- Kobold
- Posts: 6
- Joined: Wed Mar 30, 2011 8:44 pm
Re: [Gamma World] Framework Adaptation
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.
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.
-
- Kobold
- Posts: 6
- Joined: Wed Mar 30, 2011 8:44 pm
Re: [Gamma World] Framework Adaptation
I have a small fix.
Ongoing damage is not reported to the chat window.
To Fix:
The last line of rfw.processOngoing reads:
change it to:
Ongoing damage is not reported to the chat window.
To Fix:
The last line of rfw.processOngoing reads:
Code: Select all
[r:token.name] takes <b>[r:DmgValue]</b> damage.
Code: Select all
[h:link = macroLinkText("rfw.deferDmgNote@this", "all",json.append("[]", token, DmgValue, DmgType), token)]
[r:execLink(link, 1)]
-
- Kobold
- Posts: 6
- Joined: Wed Mar 30, 2011 8:44 pm
Re: [Gamma World] Framework Adaptation
OK I have some more info about the "multiple target" error bug.
at the end of rfw.processDamage there is this line:
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:
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.
at the end of rfw.processDamage there is this line:
Code: Select all
[h,if(isFrameVisible("Quick Reference Sheet")),CODE:
{
[macro("rfw.CharSheet@this"):target]
}]
Right here at the top of rfw.CharSheet:
Code: Select all
[h:context = getSelectedNames()]
[h,if(startsWith(context, "Lib:") || context == "Dummy_Target"): abort(0)]
[h:debug("context")]
[h:switchToken(context)]
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.
Re: [Gamma World] Framework Adaptation
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:
Whenever the Quick Sheet is open and you are resolving damage against more that one target, the rfw.CharSheet call throws a "switchToken" error.Code: Select all
[h,if(isFrameVisible("Quick Reference Sheet")),CODE: { [macro("rfw.CharSheet@this"):target] }]
Right here at the top of rfw.CharSheet:
If you have more than one target, getSelectedNames returns a list of target names and then switchToken gags on the list.Code: Select all
[h:context = getSelectedNames()] [h,if(startsWith(context, "Lib:") || context == "Dummy_Target"): abort(0)] [h:debug("context")] [h:switchToken(context)]
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.
-
- Kobold
- Posts: 6
- Joined: Wed Mar 30, 2011 8:44 pm
Re: [Gamma World] Framework Adaptation
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:
Now you should be able to select an NPC hit the Power Library button and assign an NPC Power.
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: Select all
[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)]
}]
}]
Re: [Gamma World] Framework Adaptation
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.
Never mind, I found the toggle button.
-
- Kobold
- Posts: 2
- Joined: Fri Jun 10, 2011 11:36 am
Re: [Gamma World] Framework Adaptation
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.
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.
Re: [Gamma World] Framework Adaptation
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.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.
-
- Kobold
- Posts: 2
- Joined: Fri Jun 10, 2011 11:36 am
Re: [Gamma World] Framework Adaptation
Thanks for the info. Do you mind if I pm you if I get stuck?
Re: [Gamma World] Framework Adaptation
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:
When clicking "Manage Origins (F3)" under "GM Utilities for PC Tokens" in the Campaign settings, I get the following error message:
Code: Select all
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
Re: [Gamma World] Framework Adaptation
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: Select all
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: Select all
[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")]
};
Code: Select all
[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")]
};