[Rumble 5.1.3]: Custom Mods

Framework(s) for D&D 4e, including Veggiesama's.

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

User avatar
Colmarr
Cave Troll
Posts: 82
Joined: Tue Dec 07, 2010 4:46 am

[Rumble 5.1.3]: Custom Mods

Post by Colmarr »

I'm very fortunate to have a coder for a player. Now that Rumble has finished developing version 5, we'll be tinkering with our copy of the framework to add functionality that we like.

I'll post the results here for those who are interested.

Caveat: I'm relaying information from my player, and it's possible I'll screw up the formatting here and there. If so, please let me know. It also goes without saying that this is a work in progress and these mods might have unintended ripples through the framework. I recommend you test them on a non-crucial spare campaign file.

The current version of the campaign file (with all of the mods from this thread) is attached to this post. I will endeavour to keep it updated as I go.

Edit 16/6/11: Updated campaign file to include High Crit Damage macros.

Edit 20/6/11: Update campaign file to include Rumble's High Crit bug fixes.

Edit 22/6/11: Update campaign file to include the AFK, Re-bloodied and Dead at Negative Bloodied mods.

Edit: 10/9/11: Update campaign file to include the Automatically remove Dying, Prone when Dying, and Death Save Tracker mods.
Attachments
Rumble 513 C7.cmpgn
(2.92 MiB) Downloaded 345 times
Last edited by Colmarr on Sat Sep 10, 2011 4:29 am, edited 9 times in total.

User avatar
Colmarr
Cave Troll
Posts: 82
Joined: Tue Dec 07, 2010 4:46 am

Re: [Rumble 5.1.3]: Custom Mods

Post by Colmarr »

NOTIFYING STRIKERS WHEN THEY CRIT

Current:
The FW notifies strikers when they hit, but does not indicate whether that hit was a crit.

Proposed improvement:
To notify strikers when they crit.

Method:
Open the token Lib:4e and look for the macro 'requestBonusDamage'

Edit that macro and find this code:

Code: Select all

<!--Request Bonus Damage-->
[h:crit = arg(0)]
[h:target = arg(1)]
[h:miss = arg(2)]
[h:powername = arg(3)]
Under it, insert this line:

Code: Select all

[h:critText=if(crit==0,""," and was a CRIT")]
Then find this line of code just below

Code: Select all

[h:status = input(".|<html>Your attack with <b>"+powername+"</b> hits "+target+"! Do you wish to apply your "+StrikeFeature+" damage?</html>||LABEL|SPAN=TRUE","apply|Yes,No|Apply Striker Damage|RADIO|SELECT=0")]
and replace it with:

Code: Select all

[h:status = input(".|<html>Your attack with <b>"+powername+"</b> hits "+target+critText+"! Do you wish to apply your "+StrikeFeature+" damage?</html>||LABEL|SPAN=TRUE","apply|Yes,No|Apply Striker Damage|RADIO|SELECT=0")]
Outcome:

The striker bonus damage prompt should now say (this example assumes the striker is a rogue, and the new text is underlined):

"Your attack with Deft Strike hits Goblin Sharpshooter 1 and was a Crit! Do you wish to apply your sneak attack damage?"

User avatar
AidyBaby
Dragon
Posts: 383
Joined: Tue Feb 07, 2006 12:55 pm
Contact:

Re: [Rumble 5.1.3]: Custom Mods

Post by AidyBaby »

Great idea for a thread.

-- AidyBaby --
D&D qualities are related inversely to those of Poker... and I love both.
http://www.yorkpoker.co.uk

User avatar
Rumble
Deity
Posts: 6235
Joined: Tue Jul 01, 2008 7:48 pm

Re: [Rumble 5.1.3]: Custom Mods

Post by Rumble »

That's...interesting. I was sure I'd put critical hit notification into that popup box.

Oh, I see what's going on. It automatically applies the proper damage (if you crit, it does the max, but there may be situations where you don't want to apply it).

User avatar
Colmarr
Cave Troll
Posts: 82
Joined: Tue Dec 07, 2010 4:46 am

Re: [Rumble 5.1.3]: Custom Mods

Post by Colmarr »

Rumble wrote:Oh, I see what's going on. It automatically applies the proper damage (if you crit, it does the max, but there may be situations where you don't want to apply it).
Correct :)

It's also for situations where you hit targets A, B, C and were planning on applying sneak attack to C. If the prompt tells you that you've crit target B, you can change your plans.

User avatar
Colmarr
Cave Troll
Posts: 82
Joined: Tue Dec 07, 2010 4:46 am

Re: [Rumble 5.1.3]: Custom Mods

Post by Colmarr »

POISED ASSAULT (ESSENTIALS KNIGHT STANCE)

Current:
Poised Assault is a stance that adds +1 to attack when using MBAs. Currently the FW does not automate the +1 attack bonus unless you use an attackbonus condition, but if you do so then changing stance does not automatically remove that condition.

Proposed improvement:
Code the +1 attack as a stance, so that activating another stance will end Poised Assault.

Method:

Create a power for the character called 'Poised Assault'. In that power, set the power type to 'Personal', tick the Essentials Stance checkbox and set the attack line to "1 vs AC". Set the Effect text to "Poised Assault: when you attack with a melee basic attack, add +1 to your attack roll". Save the power.

(Do not alter the text that is underlined. It is necessary for the stance to only apply to MBAs)

Then find the token Lib:4e.

In that token, find the macro 'showPersonalTargetDialog2'. Edit that macro.

Find the block of code which starts with:

Code: Select all

h,if(eStance),CODE:
{
and ends with:

Code: Select all

}]
Replace that block of code with:

Code: Select all

[h,if(eStance),CODE:
{
     [h:mbaTemp = json.get(Powers, "Melee Basic Attack")]
     [h:rbaTemp = json.get(Powers, "Ranged Basic Attack")]
     [h:modMissDmg = json.get(currentPowerInfo, "otherMissDmg")]
     [h:modConds = json.get(currentPowerInfo, "appStateAlways")]
     [h:modSplash = json.get(currentPowerInfo, "doesSplashDmg")]
     [h:modSplashInfo = json.get(currentPowerInfo, "splashDmgInfo")]
     [h:modEffect = json.get(currentPowerInfo, "alwaysEffect")]
     [h:modMiss = json.get(currentPowerInfo, "missEffect")]
     [h:modAttack = json.get(currentPowerInfo, "attack")]
     [h:mbamodAttack = json.get(mbaTemp, "attack")]
     [h:rbamodAttack = json.get(rbaTemp, "attack")]
     [h:mbaSTAT=substring(mbamodAttack,0,3)]
     [h:rbaSTAT=substring(rbamodAttack,0,3)]
     [h:mbamodAttack =if(modAttack != "0", mbaSTAT + " + " + modAttack,mbaSTAT)]
     [h:rbamodAttack =if(modAttack != "0", rbaSTAT + " + " + modAttack,rbaSTAT)]
     [h:modDmg = json.get(currentPowerInfo, "damage")]
     [h,if(matches(modEffect, ".*with\\sa\\smelee\\sbasic\\sattack.*")): meleeOnly = 1; meleeOnly = 0]
     [h:mbaTemp = json.set(mbaTemp, "attack", mbamodAttack, "appStateHit", modConds, "doesSplashDmg", modSplash, "splashDmgInfo", modSplashInfo, "hitEffect", modEffect, "missEffect", modMiss, "otherMissDmg", modMissDmg)]
     [h,if(meleeOnly == 0): rbaTemp = json.set(rbaTemp, "attack", rbamodAttack, "appStateHit", modConds, "doesSplashDmg", modSplash, "splashDmgInfo", modSplashInfo, "hitEffect", modEffect, "missEffect", modMiss, "otherMissDmg", modMissDmg)]
     [h:Powers = json.set(Powers, "Melee Basic Attack", mbaTemp)]
     [h,if(meleeOnly == 0): Powers = json.set(Powers, "Ranged Basic Attack", rbaTemp)]
     [h:Stance = json.get(currentPowerInfo, "powername")]
}]
Outcome:

The Poised Assault button will now enter the token into the stance. Any melee basic attacks made while in the stance will be given a +1 attack bonus. If you click on another stance, then the token will lose the Poised Assault stance and the +1 will stop applying.
Last edited by Colmarr on Tue May 31, 2011 10:17 pm, edited 1 time in total.

User avatar
Colmarr
Cave Troll
Posts: 82
Joined: Tue Dec 07, 2010 4:46 am

Re: [Rumble 5.1.3]: Custom Mods

Post by Colmarr »

ENDING ESSENTIALS STANCES AT THE END OF THE ENCOUNTER

Note: As pointed out later in the thread, at-will essentials stances do not end at the end of the encounter (Rules compendium, page 120). As such, this mod is not needed for at-will stances like the knight's (or the later beast form macro). I leave it here in case it become relevant later.

Current:

Currently, the framework does not end essentials stances at the end of the encounter. Once a token is in a stance, it stays in one. This can cause (minor) problems when, for example, a Knight gets a surprise round and is in a stance it should not be in.

Proposed improvement:

Automatically end stances when the PC takes a short or extended rest.

Method:

Find the Lib:4e.

Find the 'Short Rest' macro.

Replace this text:

Code: Select all

After a breather, [r:getName()] has recovered all Encounter powers.
with this:

Code: Select all

     [h:mbaTemp = json.get(Powers, "Melee Basic Attack")]
     [h:rbaTemp = json.get(Powers, "Ranged Basic Attack")]

     [h:mbamodAttack = json.get(mbaTemp, "attack")]
     [h:rbamodAttack = json.get(rbaTemp, "attack")]
     [h:mbaSTAT=substring(mbamodAttack,0,3)]
     [h:rbaSTAT=substring(rbamodAttack,0,3)]
     [h:mbamodAttack = mbaSTAT]
     [h:rbamodAttack = rbaSTAT]

     [h:mbaTemp = json.set(mbaTemp, "attack", mbamodAttack, "appStateHit", "", "doesSplashDmg", "", "splashDmgInfo", "", "hitEffect", "--none--", "missEffect", "--none--", "otherMissDmg", 0)]
     [h:rbaTemp = json.set(rbaTemp, "attack", rbamodAttack, "appStateHit", "", "doesSplashDmg", "", "splashDmgInfo", "", "hitEffect", "--none--", "missEffect", "--none--", "otherMissDmg", 0)]
     [h:Powers = json.set(Powers, "Melee Basic Attack", mbaTemp)]
     [h: Powers = json.set(Powers, "Ranged Basic Attack", rbaTemp)]
     [h:Stance =""]

After a breather, [r:getName()] has recovered all Encounter powers. All stances end.
Then edit the 'Extended Rest' macro by replacing this text:

Code: Select all

After an extended rest, [r:getName()] has recovered all healing surges and all Daily and Encounter powers.
with this:

Code: Select all

     [h:mbaTemp = json.get(Powers, "Melee Basic Attack")]
     [h:rbaTemp = json.get(Powers, "Ranged Basic Attack")]

     [h:mbamodAttack = json.get(mbaTemp, "attack")]
     [h:rbamodAttack = json.get(rbaTemp, "attack")]
     [h:mbaSTAT=substring(mbamodAttack,0,3)]
     [h:rbaSTAT=substring(rbamodAttack,0,3)]
     [h:mbamodAttack = mbaSTAT]
     [h:rbamodAttack = rbaSTAT]

     [h:mbaTemp = json.set(mbaTemp, "attack", mbamodAttack, "appStateHit", "", "doesSplashDmg", "", "splashDmgInfo", "", "hitEffect", "--none--", "missEffect", "--none--", "otherMissDmg", 0)]
     [h:rbaTemp = json.set(rbaTemp, "attack", rbamodAttack, "appStateHit", "", "doesSplashDmg", "", "splashDmgInfo", "", "hitEffect", "--none--", "missEffect", "--none--", "otherMissDmg", 0)]
     [h:Powers = json.set(Powers, "Melee Basic Attack", mbaTemp)]
     [h: Powers = json.set(Powers, "Ranged Basic Attack", rbaTemp)]
     [h:Stance =""]

After an extended rest, [r:getName()] has recovered all healing surges and all Daily and Encounter powers. All stances end.
Outcome:

When the PC takes a short or extended rest, all stances on the token should turn off.
Last edited by Colmarr on Thu Jun 02, 2011 6:50 am, edited 1 time in total.

User avatar
Colmarr
Cave Troll
Posts: 82
Joined: Tue Dec 07, 2010 4:46 am

Re: [Rumble 5.1.3]: Custom Mods

Post by Colmarr »

BEAST FORM/HUMANOID FORM IMAGES

Current:

Currently, a token keeps the same image continuously.

Proposed improvement:

Change a token's image depending what stance it's in. This is specifically envisioned in relation to beast form druids.

Method:

Create a token image for the Beast Form. I assume the default image is for the humanoid form.

Edit the token. In the config tab, make the Humanoid Form image the token's 'portrait'. Make the Beast Form image the token's 'handout'. You do not need to change the token's 'layout'

Create a Beast Form power for your token, as per this image. It is crucial that the power is an essentials stance and that you include the ImageSwap(2) text in the 'Special' field.
Beast Form power
Beast Form.jpg
Beast Form.jpg (138.18 KiB) Viewed 10109 times
Create a Humanoid Form power for your token as per the attached image. It is crucial that the power is an essentials stance and that you include the ImageSwap(1) text in the 'Special' field.
Humanoid Form power
Humanoid Form.jpg
Humanoid Form.jpg (130.68 KiB) Viewed 10109 times

In the Lib:4e token, find and edit the AttackPost macro:

Find this:

Code: Select all

[r,if(isNPC() && !getLibProperty("rfw.showNpcHitInfo")),CODE:
{
[g,r:if(getProperty("rfw.hitCount")>0 && hitEff !="--none--" && hitEff != 0, "<b>Hit</b>: "+hitEff+"<br>", "")] [g,r:if(getProperty("rfw.hitCount")==0 && missEff !="--none--" && missEff != 0, "<b>Miss</b>: "+missEff+"<br>", "")] [g,r:if(alwaysEff != "--none--" && alwaysEff != 0, "<b>Effect</b>:
"+alwaysEff+"<br>", "")]
[g,r:if(getProperty("rfw.hitCount")>0 && afterEff != "--none--" && afterEff != 0, "<b>AfterEffect</b>: "+afterEff+"<br>","")] [g,r:if(specialEff != "--none--" && specialEff != 0, "<b>Special</b>:
"+specialEff+"<br>","")]
};{}]
Below it add this:

Code: Select all

[h,if(indexOf(specialEff, "ImageSwap(1)")>-1),CODE:{ [h:setTokenImage(getTokenPortrait())]
};{}]
[h,if(indexOf(specialEff, "ImageSwap(2)")>-1),CODE:{ [h:setTokenImage(getTokenHandout())]
};{}]
Outcome

When you click the Beast Form power, the token image should change to the Beast Form image. When you click the Humanoid Form power, the image should change back to the humanoid image.

Note that my player considers this an 'ugly' fix, because ImageSwap(1) and Image Swap(2) will be displayed in chat when you use the respective powers. I personally consider that a price well worth paying for the functionality.
Last edited by Colmarr on Wed Jun 01, 2011 12:14 am, edited 2 times in total.

User avatar
AidyBaby
Dragon
Posts: 383
Joined: Tue Feb 07, 2006 12:55 pm
Contact:

Re: [Rumble 5.1.3]: Custom Mods

Post by AidyBaby »

Great updates. Have you thought about maintaining a 'Colmarr' version that you can keep current to include your mods along with updates by Rumble for bugs? I think Rumble has said before that he didn't mind people doing this but it's worth asking if you thought this was a good idea (maybe you could keep the campaign on the original post of the thread).

-- AidyBaby --
D&D qualities are related inversely to those of Poker... and I love both.
http://www.yorkpoker.co.uk

User avatar
Kryx
Cave Troll
Posts: 77
Joined: Wed Feb 23, 2011 1:30 am

Re: [Rumble 5.1.3]: Custom Mods

Post by Kryx »

Ya making your own compiled version(he has stopped development so why not) would be great.

If I ever get a group I'd consider porting the UI elements of Slim to it.

User avatar
Colmarr
Cave Troll
Posts: 82
Joined: Tue Dec 07, 2010 4:46 am

Re: [Rumble 5.1.3]: Custom Mods

Post by Colmarr »

AidyBaby wrote:Have you thought about maintaining a 'Colmarr' version that you can keep current to include your mods along with updates by Rumble for bugs?.
We've got one more imminent mod to post (to allow the FW to track speed changes other than Slowed), and then I'll put up a copy of the campaign file if the forums will take files that size.

I just need to think of a name for it that gives due credit to Rumble and my coder player. After all, I'm just the guy who posts the updates. They're the ones that did all the work.

PS. Do the forums support spoiler blocks of the open/close variety? If so, what's the code? sblock didn't work for me with the images.

User avatar
Kryx
Cave Troll
Posts: 77
Joined: Wed Feb 23, 2011 1:30 am

Re: [Rumble 5.1.3]: Custom Mods

Post by Kryx »

Colmarr wrote:PS. Do the forums support spoiler blocks of the open/close variety? If so, what's the code? sblock didn't work for me with the images.
This?
test
weeee
It's a button labeled "spoiler=" on the rich text editor page(when you post or edit).

User avatar
Colmarr
Cave Troll
Posts: 82
Joined: Tue Dec 07, 2010 4:46 am

Re: [Rumble 5.1.3]: Custom Mods

Post by Colmarr »

Kryx wrote:This?
I was more interested in the type that opens and closes (and thus doesn't take up screen space when closed - a neat way of controlling post size if you want to include large images such as the powers). The code for that type of spoiler is usually [sblock ] but the code isn't working here.

The type you've posted
Spoiler
covers the spoilered text/object in black but still takes up screen space. Some forums only support that type, and RPTools might be one of them. Thanks anyway.

User avatar
Kryx
Cave Troll
Posts: 77
Joined: Wed Feb 23, 2011 1:30 am

Re: [Rumble 5.1.3]: Custom Mods

Post by Kryx »

Colmarr wrote:
Kryx wrote:This?
I was more interested in the type that opens and closes (and thus doesn't take up screen space when closed - a neat way of controlling post size if you want to include large images such as the powers). The code for that type of spoiler is usually [sblock ] but the code isn't working here.

The type you've posted
Spoiler
covers the spoilered text/object in black but still takes up screen space. Some forums only support that type, and RPTools might be one of them. Thanks anyway.
Using Chrome it is exactly as you described in the first paragraph.

User avatar
Colmarr
Cave Troll
Posts: 82
Joined: Tue Dec 07, 2010 4:46 am

Re: [Rumble 5.1.3]: Custom Mods

Post by Colmarr »

Kryx wrote:Using Chrome it is exactly as you described in the first paragraph.
Huh, so it works in Chrome? Ok, must be a browser thing then.

Post Reply

Return to “D&D 4e Frameworks”