Page 1 of 1

[Rumble 5.1.3]: Triggering Text posted from Effect text

Posted: Tue Nov 06, 2012 10:35 pm
by Deadolus
Hello Rumble and all those that work to maintain and improve Rumble's frameworks. I know Rumble has taken hiatus from fixing bugs, though I think this one might be minor to fix... If he or anyone savvy enough can post the fix, it would help avoid some confusion during sessions.

Here is the issue;

Some powers with "Trigger" text, post the "Effect" text in the chat in place of the trigger text. Here is an example...
Trigger Error
Wrong trigger displayed.png
Wrong trigger displayed.png (67.06 KiB) Viewed 7048 times
Because the CAMPAIGN FRAMEWORKS ‹ D&D 4E FRAMEWORKS forum is locked, I am posting here in the hopes the Admin's will move it, and/or someone will answer / provide a fix.

Thanks all!

Re: [Rumble 5.1.3]: Triggering Text posted from Effect text

Posted: Tue Nov 06, 2012 10:47 pm
by Bone White
Even if I cannot help, I wanted to congratulate you on your exemplary bug post. If every user posted bugs in this way, they'd be much easier to hunt and fix.

Re: [Rumble 5.1.3]: Triggering Text posted from Effect text

Posted: Tue Nov 06, 2012 11:29 pm
by Deadolus
Bone White wrote:Even if I cannot help, I wanted to congratulate you on your exemplary bug post. If every user posted bugs in this way, they'd be much easier to hunt and fix.
Thanks, I have become quite good and complaining.

Re: [Rumble 5.1.3]: Triggering Text posted from Effect text

Posted: Thu Nov 08, 2012 5:54 am
by Vhex
I use a modified version of this framework, but no changes in that area that I recall. However, I can't seem to reproduce this bug. Could you post the "Conditions applied to allies" subsection so I can have a look?

To be clear, you're clicking the power to trigger it, correct? Can you also post a screenshot of what the power shows when you click it?
For me the power shows
2012-11-08_0044.png
2012-11-08_0044.png (22.01 KiB) Viewed 7022 times
And the output I get is
2012-11-08_0044_001.png
2012-11-08_0044_001.png (7.68 KiB) Viewed 7022 times

Re: [Rumble 5.1.3]: Triggering Text posted from Effect text

Posted: Fri Nov 09, 2012 1:24 am
by StarMan
Fixed. Vhex, I confirmed your findings as I don't get the trigger line either. I suspect he is using a modified version too. I added this line to the beginning of AttackPost to extract the info from the "currentPowerInfo" JSON:

Code: Select all

[h:trigger=json.get(currentPowerInfo, "trigger")]
... and this one to the beginning of the "[r,if(isPC()),CODE:" block near the end:

Code: Select all

[r:if(trigger != "--none--" && trigger != 0, "<b>Trigger</b>: "+trigger+"<br>", "")]
In his modified version, I am guessing the programmer just copied and pasted the "[r:if(alwaysEff != "--none--" && alwaysEff != 0, "<b>Effect</b>: "+alwaysEff+"<br>", "")]" line but only changed the "<b>Effect</b>" part.

PS: Yes, I said I would never touch Rumble's code. Deadolus, consider this a favor for old time's sake. I leave further modifications in the capable hands of LongShot and others.

Re: [Rumble 5.1.3]: Triggering Text posted from Effect text

Posted: Fri Nov 09, 2012 12:20 pm
by Deadolus
Thanks guys!

I tried to reproduce this at home, and also could not. Must be an issue with the DM's copy of the Lib Files (which he got from me at some point).

Thanks for the time and effort (and personal policy infringement) it is appreciated.
Deadolus

Re: [Rumble 5.1.3]: Triggering Text posted from Effect text

Posted: Fri Nov 09, 2012 2:59 pm
by Vhex
StarMan -- It occurs to me that showing the trigger is probably a good idea for ease of tracking down where stuff came from. I stole your fix. Just a quick note -- in the interest of HTML compatibility <br> should be <br />. It doesn't matter right now, but it's code correct and a good habit to get into. Thanks for the code!

Deadolus -- I noticed one other minor bugs that I hadn't seen before while looking at this. When you edit a power and click on the Trigger Line, it says "Special Notes" instead of trigger. You can change that by opening the Lib:Power4e library and, under Power Selection Editors, modifying the EditTriggers macro.

Replace:

Code: Select all

"newTrig|"+trig+"|Enter special notes text for "+powerName)]
With:

Code: Select all

"newTrig|"+trig+"|Enter trigger text for "+powerName)]
There's also the issue that in order for you to get the item power to show yellow -- you made it a consumable. I think when Rumble originally coded it, he didn't really care where the item power came from if it was reusable, but I can see the appeal of knowing at a glance that it's an item power. That's a quick fix that I may do, just to give you the option to change the color without having to make it a consumable.

Re: [Rumble 5.1.3]: Triggering Text posted from Effect text

Posted: Sat Nov 10, 2012 4:32 pm
by Deadolus
Vhex wrote:There's also the issue that in order for you to get the item power to show yellow -- you made it a consumable. I think when Rumble originally coded it, he didn't really care where the item power came from if it was reusable, but I can see the appeal of knowing at a glance that it's an item power. That's a quick fix that I may do, just to give you the option to change the color without having to make it a consumable.
Thanks, the change works well for item properties and At-Will powers.... Daily powers need to be black so you know if you have used the power during your day... unless you give yourself an inventory of 1 each day... I don't bother with that though.

Thanks again for your help (both of you).