Vegg's SR Macro

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

Post Reply
Volomon
Cave Troll
Posts: 56
Joined: Fri Jul 02, 2010 4:43 am
Contact:

Vegg's SR Macro

Post by Volomon »

Ok so shadowrun 4ed used a init that was dice based, the new 5th ed uses two stats added together plus a dice roll(s).

Can anyone modify that init macro so it will work with new inputs?

Such as Intuition + Reaction + Initiative Dice (1d6) = Initiative.

I can get into the macro to change the output to look different but I still haven't figured out how these more complex dice pool systems work.

His original macro.
http://forums.rptools.net/viewtopic.php?f=59&t=9002

The input code.

Code: Select all

<!-- Veggiesama's inputInit macro, MapTool B55 -->

[MACRO("checkTokenValidity@this"):""]
[H: unloadLibProps()]

<!-- Recall last inputs --> 
[H: lastInit    = getStrProp(Last, "Init",    1)]
[H: lastIPs     = getStrProp(Last, "IPs",     1)]
[H: lastUseEdge = getStrProp(Last, "UseEdge", 0)]
[H: lastWounds  = getStrProp(Last, "InitWounds" , 1)]

[H: status = input(
  "init | " + lastInit + "       | Initiative | TEXT | WIDTH=4",
  "ips  | " + lastIPs + "        | Init passes| TEXT | WIDTH=4",
  "useEdge | " + lastUseEdge + " | Rule of six? | CHECK",
  "wounds  | Do not include, Include P & S, Include P & S &M | Use wounds | LIST | SELECT="+lastWounds
)]
[H: abort(status)]

<!-- Memorize last inputs -->
[H: Last = setStrProp(Last, "Init", init)]
[H: Last = setStrProp(Last, "IPs", ips)]
[H: Last = setStrProp(Last, "UseEdge", useEdge)]
[H: Last = setStrProp(Last, "InitWounds", wounds)]

<!-- Temporary hack, until this input becomes a full-fledged dialog -->
[H, SWITCH(wounds):
	case  0: woundMod = "";
	case  1: woundMod = getWoundMod(0);
	case  2: woundMod = getWoundMod(1);
]

<!-- Build the dice pool object -->
[H: dicePoolObject = "{}"]
[H: dicePoolObject = json.set(dicePoolObject, "Name", "Initiative Test")]
[H: dicePoolObject = json.set(dicePoolObject, "IPs", ips)]
[H: dicePoolObject = json.set(dicePoolObject, "UseEdge", useEdge)]
[H: dicePoolObject = json.set(dicePoolObject, "DicePool", eval(init+woundMod+""))]
[H: dicePoolObject = json.set(dicePoolObject, "DicePoolString", init)]
[H: dicePoolObject = json.set(dicePoolObject, "DicePoolMod", woundMod)]
[H: dicePoolObject = json.set(dicePoolObject, "DicePoolModString", woundMod)]
[H: dicePoolObject = json.set(dicePoolObject, "Gremlins", 0)]
[H: dicePoolObject = json.set(dicePoolObject, "MinGlitch", MINIMUM_TO_GLITCH)]
[H: dicePoolObject = json.set(dicePoolObject, "Notes", "")]

[MACRO("dice@this"):dicePoolObject]
[H: dicePoolObject = json.merge(dicePoolObject, macro.return)]
[MACRO("setupInit@this"):dicePoolObject]
The setup code.

Code: Select all

<!-- Veggiesama's setupInit macro, MapTool B55 -->

<!-- Initialize variables -->
[H: dicePoolObject = macro.args]
[H: unpackDicePoolObject(dicePoolObject)]

[H: initScore = dicePool + hits]
[H: maptoolInit = 
	if(length(initScore)==1, "0" + string(initScore), initScore)
	+ " / " + string(ips) + " IPs"]

[H: removeFromInitiative()]
[H: addToInitiative()]
[H: setInitiative(maptoolInit)]
[H: sortInitiative()]

<!-- Display the final score -->
<table><tr bgcolor="#a9b7d5"><td>
	<b> [R: getName()] = [R: maptoolInit] </b>
</td></tr></table>

Volomon
Cave Troll
Posts: 56
Joined: Fri Jul 02, 2010 4:43 am
Contact:

Re: Vegg's SR Macro

Post by Volomon »

Ok so I got it doing everything except instead of adding Reaction and Intuition as final modifiers they are adding as extra dice.


EDIT:I guess I'm not as slow as I thought finally figured it out. Now I've opened up the door to a whole bunch more that needs to be done to this macro though.

I need to add the ability to Blitz: Roll the maximum of five Initiative Dice for a single Combat Turn and Seize the Initiative: Move to the top of the initiative order, regardless of your Initiative Score. If multiple characters spend Edge to go first in the same Combat Turn, those characters go before everybody else, in order of their Initiative Scores; subsequently, the other players and NPCs take their actions according to their Initiative Scores. This move to the top of the order lasts for the entire Combat Turn (meaning multiple Initiative Passes); you return to your normal place in Initiative order at the start of the following Combat Turn.

Along with the ability to use an edge point which seems to have been broken from the original making of the macro.

User avatar
Veggiesama
Dragon
Posts: 619
Joined: Wed Aug 29, 2007 1:18 am

Re: Vegg's SR Macro

Post by Veggiesama »

Hey, just wanted to note that I posted an SR5 campaign file on the last page of my thread: http://forums.rptools.net/viewtopic.php ... 42#p245442

Going to give it a test this weekend and put up a final release copy sometime next week, but for now it's got what you need.
My D&D 4e Campaign FrameworkMy Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.

Post Reply

Return to “Macros”