[Call of Cthulhu] Ia! MapTool! Framework

MapTool campaign files that encapsulate properties, tokens, and macros for a particular ruleset or game world. "Framework" is often abbreviated "FW".

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

Forum rules
This forum is LOCKED. If a thread belongs here, use the "Report" feature of the post to let a moderator know to move it. General discussion should occur in the User Creations or MapTool forums.
jmurrayufo
Cave Troll
Posts: 38
Joined: Mon Apr 27, 2009 5:04 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by jmurrayufo »

Will use the fix for my next session. I'm interested to see how it goes.

Out of curosity, we tend to have missions that result in the same skill being rolled over and over and over (not always the same one, but Spot Hidden is a fan favorite). Is there and easy way to hack up a macro to search though the skills array for spot hidden and roll it? Or any other particular named skill? I tried hacking one up for a few hours bit alas, my understanding of the macro system is still a work in progress.

User avatar
DrVesuvius
Giant
Posts: 199
Joined: Wed Jun 18, 2008 2:07 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by DrVesuvius »

I did something similar for my Castle Falkenstein framework - the core skill rolling system had a picklist just like this one, but I had a variant skill macro that took a hard-coded variable as the first line, such as

[H: skillToTest = "Spot Hidden"]

It would then search the skill list and roll that skill. That sounds sorta like what you're asking for.

Only problem is it was written to use StrProps rather than JSON objects and would need a bit of re-writing. I'll have a look and see how much work it'll be.

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by CoveredInFish »

Its not a big rewrite.

Just duplicate the "Skill Roll" macro, rename as appropriate. Edit the following...

Code: Select all

[H: SkillList = ""]
[R, FOREACH(Skill, Skills,""), CODE: {
  [H: SkillList = SkillList + json.get(Skill, "Name") + ", "]
}]  

<!-- this is new, enter your skill here -->
[h: WhichSkill = listFind( SkillList, "Spot Hidden")]

<!-- this is changed -->
[H: flag=input("Multiplier|Double,Normal,Three-Quarter,Half,Quarter|Multiplier|LIST|SELECT=1 VALUE=STRING",
"Modifier|+30,+20,+10,0,-10,-20,-30|Modifier|LIST|SELECT=3 VALUE=STRING")]
[H: abort(flag)]

<!-- rest of the macro stays unchanged... -->

User avatar
DrVesuvius
Giant
Posts: 199
Joined: Wed Jun 18, 2008 2:07 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by DrVesuvius »

darnit, why can't I pass up a challenge. I fancied a quiet night tonight. :lol:

The CF framework was no use, since it relied entirely on how StrProps work, but I've hacked this together.

Code: Select all

<!--	SpecificSkill@token -->

[H: SkillToTest = "Mechanical Repair"]
[H: WhichSkill = 0 ]
[H: Count = 0]
[H, FOREACH(Skill, Skills,""), CODE: {
  [H: WhichSkill = IF(json.get(Skill, "Name") == SkillToTest, Count, WhichSkill)]
  [H: Count = Count + 1]
}]

[H: abort(WhichSkill)]

[H: SkillToTest = json.get(Skills, WhichSkill)]
[H: SkillName = json.get(SkillToTest, "Name")]
[H: SkillBaseScore = json.get(SkillToTest, "Score")]

[H: flag=input("Dummy|" + SkillName + " " + SkillBaseScore +"%|Testing Skill|LABEL",
"Multiplier|Double,Normal,Three-Quarter,Half,Quarter|Multiplier|LIST|SELECT=1 VALUE=STRING",
"Modifier|+30,+20,+10,0,-10,-20,-30|Modifier|LIST|SELECT=3 VALUE=STRING")]
[H: abort(flag)]

[H: SkillMod = Modifier]
[H, SWITCH(Multiplier):
case "Double": SkillMult = 2;
case "Normal": SkillMult = 1;
case "Three-Quarter": SkillMult = 0.75;
case "Half": SkillMult = 0.5;
case "Quarter": SkillMult = 0.25]

[R: if(Multiplier == "Normal", "", Multiplier + " ")]
[R: SkillName ]
[R: if(Modifier == 0, "", if(Modifier > 0, "+"+Modifier, Modifier))]
=
[R: SkillScore = floor(SkillBaseScore*SkillMult)+SkillMod)]%
Rolls <b>[R: DieRoll = 1d100]</b> - [R: if(DieRoll <= min(99,SkillScore), "Success", "Failure")]
[R: if(DieRoll <= floor(SkillScore/5), "<br>Possible Special/Impale","")]
[R: if(DieRoll == 100, "<br>Fumble",if(DieRoll >= 100 - floor((100-SkillScore)/20), "<br>Possible Botch",""))]

Change "Mechanical Repair" to whatever skill you want to test. You'll still get the pop-up asking for the modifier and multiplier, but now it fills in the skill name for you. If it can't find the skill name in the list of skills, then the macro outputs nothing.

It's not elegant or pretty, and it's had all of one minute thirty seven seconds of testing. A real macro guru could probably knock up something much better. But it seems to do the trick. Stick that code in a macro button and put it in a macro group called "Favourites", then duplicate, rename and change the SkillToTest variable for every skill you want to have a macro button for.

User avatar
DrVesuvius
Giant
Posts: 199
Joined: Wed Jun 18, 2008 2:07 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by DrVesuvius »

CoveredInFish wrote:Its not a big rewrite.

Just duplicate the "Skill Roll" macro, rename as appropriate. Edit the following...

Code: Select all

[H: SkillList = ""]
[R, FOREACH(Skill, Skills,""), CODE: {
  [H: SkillList = SkillList + json.get(Skill, "Name") + ", "]
}]  

<!-- this is new, enter your skill here -->
[h: WhichSkill = listFind( SkillList, "Spot Hidden")]

<!-- this is changed -->
[H: flag=input("Multiplier|Double,Normal,Three-Quarter,Half,Quarter|Multiplier|LIST|SELECT=1 VALUE=STRING",
"Modifier|+30,+20,+10,0,-10,-20,-30|Modifier|LIST|SELECT=3 VALUE=STRING")]
[H: abort(flag)]

<!-- rest of the macro stays unchanged... -->
Or this also works :-)

User avatar
DrVesuvius
Giant
Posts: 199
Joined: Wed Jun 18, 2008 2:07 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by DrVesuvius »

Guys, just to make you aware of a bug that just came up in our game. When using the "Personal Details" macro to set a token's name, age and occupation, if a player leaves the name unchanged it throws up an error message which says something like "Duplicate name, only the GM can create multiple tokens with the same name." If you're the GM, or as long as you're changing the name by at least one character, then you won't have a problem. As an alternative, the player can always right click the token and edit the properties directly, the macro is just there as a convenience.

I can think of a couple of ways to recode to get around this problem, so I'll add it to the list of fixes for the next version, but in the meantime just be aware of the problem and the workarounds.

jmurrayufo
Cave Troll
Posts: 38
Joined: Mon Apr 27, 2009 5:04 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by jmurrayufo »

The further development is always appreciated =)

Out of curiosity, do you have any plans to make a sort of "from scratch" character button? It would be great to click a single button that would then run a series of dialogs to gather all the needed information for a character (Name, profession, stats, skill numbers, weapons).

Players in my campaigns tend are not very tech savy, so using the macro interface right now is a pain for them. Personally speaking I don't mind it at all, but I thought i'd pass the request along.

User avatar
DrVesuvius
Giant
Posts: 199
Joined: Wed Jun 18, 2008 2:07 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by DrVesuvius »

Hmmm to be honest I wasn't planning on doing that much more development work on this framework. I've got at least three other game systems that I want to be able to run with MapTool so work on getting them functional takes priority. Maybe when I get the hang of HTML forms I might come back and revisit this with an "Edit whole character sheet" macro, but for now if anyone else wants to build on this they're more than welcome.

BlueAngel
Kobold
Posts: 7
Joined: Fri Sep 25, 2009 10:23 am

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by BlueAngel »

I can see alot of hard work went into this and I plan on using it, Just a heavily edited version of it.

What I do like....

I do like the desktop, this gives DM's a place to plan and arrange things accordingly, very nice. I also like how you made the Token Templates, although having all the resources in the scripting could be a problem.

What could be better....

Although I understand you are using a old version to build off of, I think you are trying to do to much here. What we sometimes forget about the PnP games we know and love, is that we never have machines around to calculate damage and roll dice.

This being said, for newer players having everything in the scripting already is kinda like saying, okay to do this push this button. By doing so we are preventing people from actually learning the game. For all they know damage is whatever that button there does.

I think you should try and make a very toned down version, I am working on one I am calling "CoC-Empty" because that is what It will be, dice, some sheets, and a handout template. Also, as a last note perhaps including a how-to file would be nice as well.

Great work so far, I really hope you continue to work on this for I am sure it will make a great framework when it is complete!

User avatar
DrVesuvius
Giant
Posts: 199
Joined: Wed Jun 18, 2008 2:07 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by DrVesuvius »

Clearly you haven't seen any of the other frameworks that are out there, if you think this one is over-automated :roll:

wbcreighton
Kobold
Posts: 5
Joined: Sat May 29, 2010 7:25 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by wbcreighton »

Looks very good.
One problem when I try to generate a new character, I get an error:
Function SetPC requires exactly 1 parameters ; 0 were provided

It looks like an easy one to fix but I have zero experience with the macros.

Warren

User avatar
Venatius
Dragon
Posts: 256
Joined: Mon Feb 16, 2009 7:12 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by Venatius »

wbcreighton wrote:Looks very good.
One problem when I try to generate a new character, I get an error:
Function SetPC requires exactly 1 parameters ; 0 were provided

It looks like an easy one to fix but I have zero experience with the macros.

Warren
Warren? That's impossible. You fool! WARREN IS DEAD.

(Sorry, I'm going out on a limb and assuming you'll get it if you're interested in a Call of Cthulhu framework, but if you don't, just nod and move along)

wbcreighton
Kobold
Posts: 5
Joined: Sat May 29, 2010 7:25 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by wbcreighton »

Just nodding :(

Actually looking at it from a d100, RQ, BRP pov

Never played CoC but have an idea of what it entails.

User avatar
DrVesuvius
Giant
Posts: 199
Joined: Wed Jun 18, 2008 2:07 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by DrVesuvius »

Warren

When dealing with Call of Cthulhu veterans, best to just nod and agree with them while backing away slowly, no sudden moves, while trying to distract them from any sharp objects nearby. :wink:

I'm not able to replicate your bug. How are you creating your new token? Are you duplicating the sample character token?

What version of MapTool are you using? I wrote this for b55, but have been using it successfully with b63. If you're using a newer version of MapTool it's possible they've changed the way SetPC works.

As a quick fix, you could just try removing the setPC command from the "Roll New Investigator" macro, it's on the fourth line. Just remember to make sure that your token is set to PC (right-click, Edit, then use the drop-down box in the top right of the window)

wbcreighton
Kobold
Posts: 5
Joined: Sat May 29, 2010 7:25 pm

Re: Ia! MapTool! Call Of Cthulhu Framework

Post by wbcreighton »

Thanks

I think it is to do with the version. I downloaded b55 and tried it and the macro works fine, except I can't copy the sample token for some reason. I try a copy and paste from the drop down menu but nothing happens when I select paste. Is the macro tab on the token supposed to be frozen/locked.

I can copy the tokens in b66 but the macro doesn't work.

I've tried deleting the SetPC in b66 but that doesn't work either.

I feel a brain fever coming on...

Post Reply

Return to “Campaign Frameworks”