Working on a Mutants & Masterminds framework

Show off your RPG maps, campaigns, and tokens. Share your gaming experiences and stories under General Discussion and save this forum for things you've created that may help others run their own games. Use the subforums when appropriate.

Moderators: dorpond, trevor, Azhrei, Gamerdude

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Working on a Mutants & Masterminds framework

Post by ziltmilt »

I'd like to have a thread on the boards someplace where I can post my work-in-progress framework, so anyone else that's interested can participate.

Is this forum an acceptable place to do that? I've already posted the framework a couple of times in the Macro's forum, as a result of some syntax problems. But, this place seems more appropriate for purposes of collaboration.

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: Working on a Mutants & Masterminds framework

Post by ziltmilt »

Alrighty ... I'll assume it's OK to start sharing my work using this threat. Please, if anyone out there is interested in Mutants and Masterminds, feel free to jump in and contribute.
Attachments
framework vPoint4.cmpgn
(1.18 MiB) Downloaded 109 times

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: Working on a Mutants & Masterminds framework

Post by ziltmilt »

minor updates to framework
Attachments
framework vPoint5.cmpgn
Basic code for all conditions added
(1.19 MiB) Downloaded 93 times

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: Working on a Mutants & Masterminds framework

Post by neofax »

Here is the attack macro. Use only the testAttack for now as I am slowly building it into a true attack macro.
Attachments
framework vPoint4.cmpgn
This is V4, but with the Attack Macro.
(1.19 MiB) Downloaded 79 times

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: Working on a Mutants & Masterminds framework

Post by ziltmilt »

Added a section for skills. I'd like to organize the buttons by colors that match colors used in the rulebook.

This file doesn't have the attack macro yet ... that's next on the list.
Attachments
framework vPoint6.cmpgn
(1.19 MiB) Downloaded 97 times

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: Working on a Mutants & Masterminds framework

Post by neofax »

Here is the attack so far:

Code: Select all

<!--This is the Attack configuration macro for Mutants and Masterminds FW-->

[H: tToken = currentToken() ]

[H: inCC = 
   "fullRound|Single, Full Round|Attack|RADIO|ORIENT=H SELECT=0 ##"
   + "flanking|0|Flanking?|CHECK| ##"
   + "higherGround|0|Attacking from Higher Ground?|CHECK| ##"
	 + "pointBlank|0|<html>Point Blank Range (<font color=red>30 feet</font>)?</html>|CHECK| ##"
   + "fireIntoMelee|0|Shoot/Throw into Melee (-4)?|CHECK| ##"
	 + "repeat | 0,1,2,3,4,5,6,7,8,9,10 | Repeat X times | LIST | SELECT=1" + "##"
   + "seperator|<html>     ------  </i>Situational Attack Modifier</i>  ------</html>||LABEL|SPAN=TRUE ##"
   + "atkMod|0|Situational Attack Modifier|TEXT|WIDTH=10"
]

[H: cancel = input(
   "tab0 | Config Attack | | TAB",
   inCC
)]
[H: abort(cancel)]

[ pause( "repeat" ) ]

<!-- When building a list of tokens, filter for undesirable tokens -->
[H: validTokens = getVisibleTokens("json")]

<!-- If there's nothing in the validTokens list, stop right here -->
[H: status = if(json.isEmpty(validTokens), 0, 1)]
[H: eval(
	if(!status, 'input("blah | No valid targets in sight! | Error | LABEL")', 'true')
)]
[H: abort(status)]

<!-- Sort the validTokens by distance -->
[H: validTokens = json.toList(validTokens)]
[H: rangesList = ""]
[H, FOREACH(token, validTokens): rangesList = listAppend(rangesList, getDistance(token))]

[H: items = listCount(rangesList)]
[H,COUNT(items), CODE: {
	[H, COUNT(items-1), CODE: { 
		[H: currentNum = listGet(rangesList, roll.count)]
		[H: nextNum = listGet(rangesList, roll.count + 1)]
		[H: nextName = listGet(validTokens, roll.count + 1)]
		[H: rangesList = if(currentNum > NextNum,
			listInsert(  listDelete(rangesList, roll.count + 1)  , roll.count, nextNum)
			, rangesList)]
		[H: validTokens = if(currentNum > NextNum,
			listInsert(  listDelete(validTokens, roll.count + 1)  , roll.count, nextName)
			, validTokens)]
	}]
}]

<!-- targetArray holds targets (objects), which each have 3 keys: "Name", "Img", "Distance" -->
[H: targetArray = "[]"]
[H: OFFSET = 1]
[H, FOREACH(token, validTokens), CODE: {
	[H: target = "{}"]
	[H, TOKEN(token): name = getName()]
	[H, TOKEN(token):  img = getTokenImage()]
	[H:           distance = getDistance(token)]

	[H: target = json.set(target, "Name",  name)]
	[H: target = json.set(target, "Img",   img)]
	[H: target = json.set(target, "Distance", distance)]
	[H: target = json.set(target, "ID", token)]

	[H: targetArray = json.append(targetArray, target)]
}]

<!-- Build an input() compatible list -->
[H: targetList = ""]
[H, FOREACH(target, targetArray): targetList = listAppend(targetList,
	  "(" + json.get(target, "Distance") + ") "
	+ json.get(target, "Name") + " "
	+ json.get(target, "Img")
)]

<!-- Build the input() dialog string -->
[H: ICON_SIZE = 50]
[H: inputStr = 'input("help | Choose your target(s): | Note | LABEL",']
[H, COUNT(repeat), CODE: {
	[H: i = roll.count + 1]
	[H: selectNum = 0]
	[H: inputStr = inputStr + '"repeat'+i+' | '+targetList+' | Primary #'+i+ ' | LIST | ICON=true ICONSIZE='+ICON_SIZE+' SELECT='+selectNum+'",']
}]
[H: inputStr = inputStr + '"help | -------------------- | -------------------- | LABEL")']

<!-- If power lacks attacks/targets and is a supplement,
     then don't even show the input dialog -->
[H: status = eval(inputStr)
]
[H: abort(status)]

[H, IF( repeat1 == 0 ): target1ID = ""; target1ID = json.get( json.get( targetArray, repeat1-1 ), "id" ) ]
[H, IF( repeat1 == 0 ): target1Name = ""; target1Name = json.get( json.get( targetArray, repeat1-1 ), "name" ) ]

[H, IF(isNumber(atkMod) == 1): num = atkMod; num = eval(atkMod)]

[T: 1d20 + (flanking * 2) + (higherGround * 1) + num]
Paste into a macro called "Attack" on the Lib:libMM token in the group "Combat". Then put a macro in the campaign window with the following code:

Code: Select all

[MACRO("Attack@Lib:libMM"): ""]
This will allow you to roll an attack roll and select up to 10 different defenders. It currently does not roll 10 attacks, as that has not been built yet, but slow and steady wins the race.

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: Working on a Mutants & Masterminds framework

Post by ziltmilt »

Nice interface!!

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: Working on a Mutants & Masterminds framework

Post by ziltmilt »

Updates:

1) put in the Attack macro
2) added an interface to edit basic traits. these are PPs applied to basic abilities prior to applying the effects of any feats or powers. Think Superman under a red sun.
3) Edited the campaign properties so that pmod bonuses are based on the sum of b, mod and tmod properties. pmod was only calculating based on the value of 'b' properties alone.
Attachments
framework vPoint6.cmpgn
(1.19 MiB) Downloaded 84 times

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: Working on a Mutants & Masterminds framework

Post by ziltmilt »

Created a button to 'Add a Power', which adds a custom property which is a JSON object string. The name of the custom property is the customized name indicated by the token owner of the superpower chosen. So, if a character has 2 forms of 'Blast', each form requires a unique name, and each form will be defined with a differently configured custom property.
Attachments
framework vPoint6.cmpgn
(1.19 MiB) Downloaded 161 times

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

Re: Working on a Mutants & Masterminds framework

Post by neofax »

You may want to take a look at Veggiesama's FW as his does exactly what you are trying to do with Powers. It is great as you can use "Blast 1" to create "Blast 2" because the name has changed and it automatically creates a new version on the token.

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: Working on a Mutants & Masterminds framework

Post by ziltmilt »

With the new edition of M&M coming out soon, I'm wondering if there's any point in continuing and if it'd be best to wait for 3rd ed.

Are many folks planning on sticking w/ 2nd ed? If not, I can't see the point in building a framework for it.

User avatar
Entropicurity
Kobold
Posts: 6
Joined: Fri Jul 16, 2010 3:38 pm
Location: Fort Wayne, IN
Contact:

Re: Working on a Mutants & Masterminds framework

Post by Entropicurity »

Hello!

First off I have to say thanks for all your hard work on the code so far. I'm going to try it out and see how it melds into the game I'm running right now with a group of friends.

As far as 3rd Edition goes, its mostly all cosmetic, with the exception of a couple of powers. Not only that but they are turning stats from the (Trait-10)/2 to a straight stat bonus. The conversion to 3rd edition ought to be completely the same as 1st code wise.

Despite this fact I'm sure people will still be able to use your code. The preorder for DC Adventures is out, and if you buy it you can get the PDF for 5$ (Normally 20$), and it includes the changes if you'd like to see it.

If you feel its still not worth it I completely understand, and I'll continue to learn the code myself.

Thanks again! :D
Christopher
----
"A gem is not polished without rubbing, nor a man perfected without trials." - Chinese Proverb
----

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: Working on a Mutants & Masterminds framework

Post by ziltmilt »

Thanks for the kind words and encouragement! From what you're describing, there's not a lot of change from 2nd to 3rd edition, and it's likely that such changes could be later incorporated into some kind of global options menu. Something that comes to mind is the change to Impervious I read about.

So, if most changes are cosmetic, then I'm leaning towards just continuing what I started.

User avatar
brexor
Cave Troll
Posts: 46
Joined: Mon Dec 15, 2008 11:54 pm

Re: Working on a Mutants & Masterminds framework

Post by brexor »

I (and a friend) have put together a M&M 3rd framework you can look at and steal stuff from. (plug plug) :D
Take a look...

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: Working on a Mutants & Masterminds framework

Post by ziltmilt »

No need for me to steal ... this looks pretty cool. I'm gonna upgrade to 3rd ed just for this framework. Thanks for building this!!

Post Reply

Return to “User Creations”