RPTools.net

Discussion and Support

Skip to content

It is currently Sun Jan 21, 2018 11:53 am 






Reply to topic  [ 1103 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 74  Next

Previous topic | Next topic 

  Print view

Author Message
 Offline
Kobold
 
Joined: Thu Jan 12, 2012 9:26 am
Posts: 19
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Thu May 03, 2012 11:03 pm 
Sorry for disappearing for a while. I've been holding off on converting everything to MPB until I was done with the module I was running. That time has come, and as I have been preparing for my game this weekend, I made a few modifications.

First a little background since I know some of what I did won't apply to everyone. I run my game in person. My players all have pencil and paper and are seated on my couch watching the 50" wall mounted plasma TV which has the player client for maptool. Everything on the screen is done by me. Players roll their own attacks and damage and I just update the display. That said, these changes can still be added by anyone and they won't hurt anything.

Firstly, I use health bars, so I added support for them.

On Damage@Lib:MacroPolicebox add the setBar line:
Code:
   [IF(NewHP>0 && getState("Dying", index)): Results=Results+evalMacro('[MACRO("Remove Effect@this"): "Effect=Dying_AC; Targets="+index]')]
   [IF(getState("Dead", index) && !isDead): Results=Results+evalMacro('[MACRO("Death@this"): index]')]
   [h:setBar("Health", getProperty("CurrHP", index)/getProperty("MaxHP", index))]
}]

On Extended Rest@Lib:MacroPolicebox add the setBar line:
Code:
[CurrHP=MaxHP]
[h:setBar("Health", 1)]
[SurgeRemaining=SurgePerDay]


Second, I have two chaos mages (one PC, one NPC) in the party. To start with I needed the d20 roll result at the token level.

On Attack @Lib:MacroPolicebox change the last line:
Code:
[h:macro.return="Hits="+Hits+"; Misses="+Misses+"; Criticals="+Criticals+"; AllHits="+AllHits+"; GCATokens="+GCATokens+"; Roll="+Roll+";"]

This will pass the roll all the way back to the original Attack Power call. With this I can now create Chaos Bolt (this is the NPC version):
Code:
[MACRO("Choose Targets@Lib:MacroPolicebox"): "Range=10; Select=Enemies"]
[h:varsFromStrProp(macro.return)]
[h:validTargets=Targets]

[MACRO("Choose From List@Lib:MacroPolicebox"): "Options="+validTargets+"; AbortMessage=; Prompt=Choose Target"]
[h:Target=macro.return]
[h:validTargets=listDelete(validTargets,listFind(validTargets,Target))]

[MACRO("Attack Power@Lib:MacroPolicebox"): "Power="+getMacroName()+"; PowerSpecs=at-will   &diams   none<br>standard,  Ranged 10; Attack=ranged vs. Reflex; Type="+Class+" Attack 1; Range="+10+"; Single=1; AttackAdjustment=16; Damage=3d6+9; Targets="+Target]
[h:varsFromStrProp(macro.return)]
[WHILE(floor( Roll / 2 )==( Roll / 2 ) && listCount(validTargets) && Misses==""), CODE:
{
   [MACRO("Choose From List@Lib:MacroPolicebox"): "Options="+validTargets+"; AbortMessage=; Prompt=Choose Target"]
   [h:Target=macro.return]
   [h:validTargets=listDelete(validTargets,listFind(validTargets,Target))]
   [MACRO("Attack Power@Lib:MacroPolicebox"): "Power="+getMacroName()+"; PowerSpecs=at-will   &diams   none<br>standard,  Ranged 10; Attack=ranged vs. Reflex; Type="+Class+" Attack 1; Range="+10+"; Single=1; AttackAdjustment=16; Damage=2d6+7; Targets="+Target]
   [h:varsFromStrProp(macro.return)]

}]


The NPC also has a Chaos Ray that swaps enemy places. I had to make one change to make that work.

On Swap Places@Lib:MacroPolicebox change the Choose Targets call to pass the Token parameter as well:
Code:
[IF(Targets==""), CODE:
{
   [h,MACRO("Choose Targets@Lib:MacroPolicebox"): "ErrorCheck=0; Single=1; Range="+Range+"; Select="+Select+"; Token="+Token]
   [varsFromStrProp(macro.return)]
}]

Then Chaos Ray just looks like this.
Code:
[MACRO("Attack Power@Lib:MacroPolicebox"): "Power="+getMacroName()+"; PowerSpecs=at-will   &diams   none<br>standard,  Ranged 10; Attack=ranged vs. Will; Type="+Class+" Attack 1; Range="+10+"; Single=1; AttackAdjustment=16; Damage=3d8+11; "]
[h:varsFromStrProp(macro.return)]

[IF(AllHits!=""), CODE: {
   [MACRO("Swap Places@Lib:MacroPolicebox"): "Token="+AllHits+"; Range=3; Select=Allies"]
};{}]


Feel free to post these as examples in your Macro Cookbook as well.
There will likely be more since I haven't even moved the PCs over yet. That should happen tomorrow.

I have some other ideas, but for now I have working on getting through Saturday. :)


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Jan 12, 2012 9:26 am
Posts: 19
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Thu May 03, 2012 11:09 pm 
Another custom example. None of the previous modifications are required for this one.

The premise of the power is: Ranged 20; +7 vs. Reflex; 2d6+6 force damage. Hit: Make a secondary attack on each enemy adjacent to the target; +7 vs. Reflex; 1d8+5 force damage.

Code:
[MACRO("Attack Power@Lib:MacroPolicebox"): "Power="+getMacroName()+"; PowerSpecs=encounter   &diams   none<br>standard,  Ranged 20; Attack=ranged vs. Reflex; Type="+Class+" Attack 1; Range="+20+"; Single=1; AttackAdjustment=7; Damage=2d6+6; DmgType=force; "]
[h:varsFromStrProp(macro.return)]

[IF(AllHits!=""), CODE: {
   [MACRO("Choose Targets@Lib:MacroPolicebox"): "Token="+AllHits+"; Select=Allies; ErrorCheck=0"]
   [h:varsFromStrProp(macro.return)]
   [IF(Targets!=""), CODE: {
      [MACRO("Attack Power@Lib:MacroPolicebox"): "Power="+getMacroName()+"-Secondary; PowerSpecs=encounter   &diams   none<br>standard,  Ranged 20; Attack=ranged vs. Reflex; Type="+Class+" Attack 1; Targets="+Targets+"; AttackAdjustment=7; Damage=1d8+5; DmgType=force; "]
   };{}]
};{}]


Edit: Something got lost in translation. Fixed.


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 18, 2011 12:10 pm
Posts: 713
Location: Toronto
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Fri May 04, 2012 3:38 pm 
Ah, you have done well, young apprentice! Master the "Hit/Hit/Grab" design pattern (which I will be publishing soon) and your journey to the Dark Side will be complete! Sorry, I'm wearing a SW shirt today and all this "May the Fourth be with you" stuff is going to my head. :twisted:

fhscholl wrote:
I run my game in person. My players all have pencil and paper and are seated on my couch watching the 50" wall mounted plasma TV which has the player client for maptool. Everything on the screen is done by me. Players roll their own attacks and damage and I just update the display.


Yeah, I used to do things this way with my old group because the cartography program we were using (called Dunjinni) back then wasn't network-enabled. I gave every two players a mouse (all attached to the Dunjinni box) so they could move their tokens how they wanted. It actually worked out quite well so you may wanna give that a shot.

Health bars were a consideration for our group but was ultimately given the thumbs-down. According to the rules, the most you are allowed to know about any combattant is whether he is bloodied or dead. My brother raised the point that there were powers out there that give you greater detail than this. These would effectively be rendered moot if health bars gave you that info for free. But hey, if you run your games otherwise then this is a great modification! If enough registered members like this mod then I will include it officially (with your permission, of course) in v2.

I don't have access to my code at the moment and I can't look up Chaos Ray but your code looks good. I was surprised to find "Swap Places" is only documented here. It will be added to my Macro Reference when I get the chance. However, if memory serves you shouldn't need to make the modification you describe. Just use both the "Token=" and "Target=" properties and you should be good to go. The former defaults to the current token for most of my macros but that can be overridden if you supply a value. I shall meditate upon this point further in the very likely event I have misunderstood the power and/or what it is you're trying to accomplish.

The problem with "Attack Power" publishing the d20 value is this is only useful for "one creature" powers. For area effects involving multiple targets, this value will only represent the last target attacked. If you want, you can somehow parse the "Results" string it creates and get the info you need that way. The problem there is that Results records total rolls (not just the d20 component) so you may want to somehow enumerate just the Roll value from the "Attack" macro. Otherwise, your mod should work just fine for "Single=1" powers.

Again, good work! Your timing for starting couldn't be better as I will be publishing v1.1 by the end of the weekend. See my "Release Notes" page for details.

_________________
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Jan 12, 2012 9:26 am
Posts: 19
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Fri May 04, 2012 4:10 pm 
Quote:
Health bars were a consideration for our group but was ultimately given the thumbs-down. According to the rules, the most you are allowed to know about any combattant is whether he is bloodied or dead.


Honestly I needed the health bar more for the PC's then anything else. Since it is on the screen, they've all agreed that me tracking it is easier as long as the cleric can see it. :)

Quote:
I don't have access to my code at the moment and I can't look up Chaos Ray but your code looks good. I was surprised to find "Swap Places" is only documented here. It will be added to my Macro Reference when I get the chance. However, if memory serves you shouldn't need to make the modification you describe. Just use both the "Token=" and "Target=" properties and you should be good to go. The former defaults to the current token for most of my macros but that can be overridden if you supply a value. I shall meditate upon this point further in the very likely event I have misunderstood the power and/or what it is you're trying to accomplish.

I think you are reading it correctly. The NPC ally can swap two NPC enemies on a successful hit. I honestly didn't try it without the modification, but I don't see how it would work without this change. Within Swap Places you weren't passing the token parameter to Choose Targets.

Quote:
The problem with "Attack Power" publishing the d20 value is this is only useful for "one creature" powers.

Yep, agreed. Anything else I would want to do with this would need a list of rolls built or something. Honestly, use of this is rare anyway and any mutli-target use of this is probably non-existent.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Jan 12, 2012 9:26 am
Posts: 19
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Fri May 04, 2012 9:19 pm 
Looking at your examples and the code, Prone does not get added as an effect when Unconscious. It should.

From the compendium:
Quote:
While a creature is unconscious, it is helpless, it can’t take actions, and it takes a -5 penalty to all defenses. It also can’t flank and is unaware of its surroundings. When a creature is subjected to this condition, it falls prone, if possible. See also helpless and prone.


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 18, 2011 12:10 pm
Posts: 713
Location: Toronto
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Sat May 05, 2012 7:26 am 
Good catch. I actually associated it as an ExtraEffect with the Dying condition in the "Register Effect" macro like so:

Code:
[SWITCH(State):
    case "None": State="NULL";
    case "Unconscious": PropList="Property=AC,Fortitude,Reflex,Will; Mod=5; Duration=Encounter"; 
    case 
"Helpless": PropList="Link=Unconscious; Duration=Encounter";
    case "Dying": PropList="Link=Unconscious; Duration=Encounter; [b]ExtraEffect=Prone[/b]";
    case "Blinded": PropList="Property=Perception; Mod=-10";
    case "Prone": PropList="EName=; Duration=Encounter";
    case "Petrified": PropList="Property=Resist; Mod=20; Duration=Encounter";
    case "Invisible": PropList="Duration=Start";
    case "OngoingUntyped": State=if(Mod<0, "Regeneration", "OngoingUntyped");
    case "Slowed": Property="Speed";
    case "Immobilized": Property="Speed";
    case "Restrained": Property="Speed";
    default: 0
] 


This scheme works well enough in practice ... but I do like to code with the rules as you suggest. As such I'll call "Fall" outside this statement.

_________________
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 18, 2011 12:10 pm
Posts: 713
Location: Toronto
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Sat May 05, 2012 8:23 am 
fhscholl wrote:
I honestly didn't try it without the modification, but I don't see how it would work without this change. Within Swap Places you weren't passing the token parameter to Choose Targets.


Just tried this without your change on Hero in the sample campaign:
Code:
[MACRO("Swap Places@Lib:MacroPolicebox"): "Token=Villain; Targets=Minion"


Again, because you are supplying a Targets value, the block inside "[IF(Targets==""), CODE:" never gets called.

_________________
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Jan 12, 2012 9:26 am
Posts: 19
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Sat May 05, 2012 8:40 am 
StarMan wrote:
Again, because you are supplying a Targets value, the block inside "[IF(Targets==""), CODE:" never gets called.


Ahh... but I'm not specifying a target. I need the choose dialog. I could do it before calling the Swap macro, but I figured since Swap will do it for me... :)

Code:
[IF(AllHits!=""), CODE: {
   [MACRO("Swap Places@Lib:MacroPolicebox"): "Token="+AllHits+"; Range=3; Select=Allies"]
};{}]


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 18, 2011 12:10 pm
Posts: 713
Location: Toronto
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Sat May 05, 2012 9:43 am 
OK I get it now. You want it to be interactive. In that case, yes I would include switchToken and Choose Targets call before the fact rather than modifying Swap Places. I might still be misunderstanding but whatever logic flow works for you is valid.

_________________
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 18, 2011 12:10 pm
Posts: 713
Location: Toronto
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Sat May 05, 2012 10:10 am 
fhscholl wrote:
Another custom example. None of the previous modifications are required for this one.

The premise of the power is: Ranged 20; +7 vs. Reflex; 2d6+6 force damage. Hit: Make a secondary attack on each enemy adjacent to the target; +7 vs. Reflex; 1d8+5 force damage.

Code:
[MACRO("Attack Power@Lib:MacroPolicebox"): "Power="+getMacroName()+"; PowerSpecs=encounter   &diams   none<br>standard,  Ranged 20; Attack=ranged vs. Reflex; Type="+Class+" Attack 1; Range="+20+"; Single=1; AttackAdjustment=7; Damage=2d6+6; DmgType=force; "]
[h:varsFromStrProp(macro.return)]

[IF(AllHits!=""), CODE: {
   [MACRO("Choose Targets@Lib:MacroPolicebox"): "Token="+AllHits+"; Select=Allies; ErrorCheck=0"]
   [h:varsFromStrProp(macro.return)]
   [IF(Targets!=""), CODE: {
      [MACRO("Attack Power@Lib:MacroPolicebox"): "Power="+getMacroName()+"-Secondary; PowerSpecs=encounter   &diams   none<br>standard,  Ranged 20; Attack=ranged vs. Reflex; Type="+Class+" Attack 1; Targets="+Targets+"; AttackAdjustment=7; Damage=1d8+5; DmgType=force; "]
   };{}]
};{}]


Edit: Something got lost in translation. Fixed.


Whoa, after sinking through the first 4 or 5 layers the brilliance of this just sunk into my tiny brain. :? You are using the "AllHits" value as the origin square of a close burst 1 attack. Dude, that is pure freaking genius!!! Although I programmed Choose Targets to accept an alternate originator in the Token prop, I never thought of using it this way. I have been programmatically moving the ABOS to the AllHits position and then calling "Attack Power" as an area burst 1 in such situations. Your way is slightly better because it doesn't include AllHits in the secondary attack.

I am so gonna steal this idea to reprogram my wizard's Acid Arrow and you can be darn sure it's going in the Cookbook some day as "fhscholl's Splash Damage pattern", or something like that. :D

_________________
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Jan 12, 2012 9:26 am
Posts: 19
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Sat May 05, 2012 12:51 pm 
Go for it. :)

This is the same thing used for splash damage instead of a Secondary Attack (basically use Register Effect instead of Attack Power). This is actually Dancing Lightning from the PHB2.

Code:
[MACRO("Attack Power@Lib:MacroPolicebox"): "Power="+getMacroName()+"; PowerSpecs=encounter   &diams   Lightning, Thunder, Arcane, Implement<br>standard,  Ranged 10; Attack=ranged vs. Reflex; Type="+Class+" Attack 3; Range="+10+"; Single=1; AttackAdjustment=Cha; Damage=2d10+Cha; "]
[h:varsFromStrProp(macro.return)]
[IF(AllHits!=""), CODE: {
   [MACRO("Choose Targets@Lib:MacroPolicebox"): "Token="+AllHits+"; Select=Allies; ErrorCheck=0"]
   [h:varsFromStrProp(macro.return)]
   [IF(Targets!=""), CODE: {
      [MACRO("Register Effect@Lib:MacroPolicebox"): "Property=CurrHP; Mod=Cha; DmgType=thunder; Duration=Perm; Token="+Targets]
   };{}]
};{}]


Edit: If you do put it in the Cookbook, just use my name: Frank. :)


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Jan 12, 2012 9:26 am
Posts: 19
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Sun May 06, 2012 10:11 pm 
StarMan:

I'm curious as to how you handle two things: immunity and half damage.

I've been dealing with immunity by just providing a high damage resistance, but other than manual intervention is there a way to programmatically handle half damage?


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 18, 2011 12:10 pm
Posts: 713
Location: Toronto
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Sun May 06, 2012 10:57 pm 
Yeah I handle immunities the same way. It saved me from coding it in given the end result is the same. As for half damage, it is documented here:

http://macropolicebox.host56.com/index.php/programmers-reference/macro-reference/attack-power wrote:
DamageOnMiss:

Optional: Yes

Values: Any formula string in Rumble notation. Can specify special keyword "Half", if desired.

Default: "0"


Note that the RACK will handle this part of Rumble's card if you set it to "Yes".

_________________
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!


Top
 Profile  
 
 Offline
Kobold
 
Joined: Thu Jan 12, 2012 9:26 am
Posts: 19
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Sun May 06, 2012 11:00 pm 
Not half damage from a miss. Takes half damage from a damage type.

Like a swarm for instance. I understand that MPB only looks at elements when doing resistance, but swarms have: Resist half damage from melee and ranged attacks; Vulnerable 5 damage from close and area attacks.

I'm trying to think of any reason you couldn't make this work, and I think I can pretty easily.


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 18, 2011 12:10 pm
Posts: 713
Location: Toronto
 Post subject: Re: The MacroPolicebox: Rumble Edition (D&D 4E Framework)
PostPosted: Mon May 07, 2012 9:18 am 
Yeah, I decided to pass on this aspect of the Rumble conversion process. As you indicated, this is documented on point 3 here. I didn't see what use the Multipliers column was given the rarity of creatures with this attribute. On the (maybe) one swarm we encounter each adventure, the DM just manually heals it back half damage for every melee or ranged hit.

The one idea I had for supporting this is to check the monster's "Race" property (for the "swarm" keyword) on a hit and then register an Insubstantial effect on it for that turn before "Damage" is called. In case I decide to add this for v2, how often does your group come across this issue? Are there any other creature types with this characteristic other than swarms?

_________________
StarMan - The MacroPolicebox D&D 4E Framework: Import ANYTHING!


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 1103 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 74  Next

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