Area of Effect Macros

Discussion concerning lmarkus' campaign framework for D&D3.x and Pathfinder.

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

Forum rules
Discussion regarding lmarkus001's framework only. Other posts deleted without notice! :)
Jazlizard
Kobold
Posts: 22
Joined: Sun Jun 15, 2008 11:28 pm

Area of Effect Macros

Post by Jazlizard »

Any chance someone has developed some AOE macros? Specifically looking for something that does Inspire Courage on all nearby PCs (or better yet, visible PCs). Also things like Channel Positive Energy (I play Pathfinder).

Mass selecting PCs and toggling their modset seems to take a LONG time to process and often asks me each time for each PC about a variable (like bard level). Any help is appreciated as my coding skills are primitive at best.

User avatar
Azhrei
Site Admin
Posts: 12050
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Area of Effect Macros

Post by Azhrei »

Jazlizard wrote:Any chance someone has developed some AOE macros? Specifically looking for something that does Inspire Courage on all nearby PCs (or better yet, visible PCs). Also things like Channel Positive Energy (I play Pathfinder).

I don't know of any. Wrathgon is planning to add some type of template system to his spell manager, but that will merely choose which tokens should have the modsets applied; it won't be anything that constantly monitors the distance from token A to token B and takes action based on the result.

Mass selecting PCs and toggling their modset seems to take a LONG time to process and often asks me each time for each PC about a variable (like bard level). Any help is appreciated as my coding skills are primitive at best.

It's best to have each player update their own modsets. That way the execution time is spread out over the entire group. And if you're changing them on a half-dozen tokens and a player is editing a token, your change may be lost when they save their changes.

Jazlizard
Kobold
Posts: 22
Joined: Sun Jun 15, 2008 11:28 pm

Re: Area of Effect Macros

Post by Jazlizard »

Yup, that's probably what I'll do.

Is there anyway to have it look at a certain token for the bard level instead of having to input it all the time? That would speed things up a bit.

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

Re: Area of Effect Macros

Post by neofax »

It wouldn't know unless the framework added in a property to hold all of the characters classes and foreach thru each token looking for a Bard. Problem with that is that if there are multiple Bards it would not know. Or, the Spell Manager could automatically apply these types of things. Personally, I like having the ability to control what tokens receive the mods and which ones do not.

User avatar
Azhrei
Site Admin
Posts: 12050
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Area of Effect Macros

Post by Azhrei »

Jazlizard wrote:Is there any way to have it look at a certain token for the bard level instead of having to input it all the time?

Yes, but you'd have to modify the predefined modset. Basically, the modset uses a variable, Bard_Level I think, that is undefined hence the popup dialog asking for the value.

But you could change the modset so instead of using Bard_Level it used getProperty("Level", tokenID). But I don't know what to put in for tokenID and you wouldn't want to hard-code it or it wouldn't work for other bards. So the popup is probably the best way to handle it.

(I suppose you could assume that the bard's ability is also going to affect the bard. In which case you could make a list of all selected tokens and check each one to see what classes they have and then take the one that's a bard. But now it doesn't work if there's more than one bard selected, nor does it work in this FW since the FW doesn't keep track of classes, only CR.)

User avatar
skester
Giant
Posts: 213
Joined: Mon May 04, 2009 3:44 pm

Re: Area of Effect Macros

Post by skester »

The area area of effect thing is easy enough, but I don't use lmarkus' framework so I was trying to figure out with Jaz on how to do this. What I'm not sure is where the bonus would be applied.

I tried looking through to figure it out, but Linday's code is way over my head.

If someone could point out to me what to add a value to so the bonuses work properly, then I can help with the rest.

Skester.

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

Re: Area of Effect Macros

Post by neofax »

It is all stored on the property ActiveMods JSON on the token. Look thru the macros for applying the ActiveMod and that is where you can see how the JSON is applied. I am not that good with coding JSON, so can't really help. You can also take a look at Wrathgons old 11g version of his Spell Manager as IIRC it has a way to add Active Mods based on the spell being cast.

User avatar
lmarkus001
Great Wyrm
Posts: 1862
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: Area of Effect Macros

Post by lmarkus001 »

Jazlizard wrote:Any chance someone has developed some AOE macros? Specifically looking for something that does Inspire Courage on all nearby PCs (or better yet, visible PCs).
Also things like Channel Positive Energy (I play Pathfinder).

Mass selecting PCs and toggling their modset seems to take a LONG time to process and often asks me each time for each PC about a variable (like bard level). Any help is appreciated as my coding skills are primitive at best.


Fundamental approach
. Try to never modify a token that someone else could modify. So, GMs should modify NPCs, and Players should modify their own tokens. The primary reason is if two of you modify at the same time, one of your changes will not occur (and this conflict is really easy to encounter, for example if a player selects their token and starts to move but does not drop it, then anything you do to it will not take hold).

Channel Energy: This exists in the framework, if you choose to channel positive energy to living creatures, all players that have a token in range get a pop-up dialog that they can use to apply healing to the tokens they select (there has to be some human interaction here to make appropriate choices).

Mass application of a mod-set. If you have a mod-set you apply frequently, and the "variable" amount is actually stable (like bard level), then just create a new mod-set that hard codes the bard level. The really easy way to do that for the Bard Inspire Courage is to Edit the version in my framework and rename it to "CharacterNames Inspire Courage" and then change the variable Bard_Level to a fixed integer. When you save, you will now have a new mod-set (it becomes new because you gave it a new name/identifier). Now when you apply that to multiple tokens, you won't be prompted and the application will go faster (although not as fast as having all the players apply it themself... plus this keeps them engaged and knowing what is going on).

User avatar
lmarkus001
Great Wyrm
Posts: 1862
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: Area of Effect Macros

Post by lmarkus001 »

Coming soon...

An AE targeting macro that can apply damage and/or apply active-mods!

User avatar
Azhrei
Site Admin
Posts: 12050
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Area of Effect Macros

Post by Azhrei »

Ooo, cool idea!

So are you planning on a list of dropdowns with "typical" damage types (like 5d6 or 3d8?) and then a separate dropdown that lists active mods? That could be really handy for spells that include both (such as Unholy Blight) or swarm creatures (those that have both hp damage and poison come to mind).

I'm not sure how to make this really flexible though. You'll want to be able to allow a save so that damage isn't applied, only half is applied, or full is applied. And it might need to take Evasion into account if it's a Reflex save.

The active mods are similar because I can see needing only a single mod in most cases, but some might require more (such as the blasphemy or color spray spells, which have varying effects depending on the HD of the target).

It'll be interesting to see what you come up with. I've thought about this before and decided it was a pretty big project... :)

User avatar
aliasmask
Deity
Posts: 8579
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Area of Effect Macros

Post by aliasmask »

I would create the spell effects like your EBT and use the summon button to call them in. Seems like the simplest integration with what you have right now.

User avatar
lmarkus001
Great Wyrm
Posts: 1862
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: Area of Effect Macros

Post by lmarkus001 »

I just wanted to whine a bit...

Building HTML Frames is WAY more time consuming than the simple Wiki: input ()dialog! On the plus side, The HTML Frame is cleaner looking and can float so can stay up all the time.

Meanwhile, back to the grind, ick. A VERY PRELIMINARY teaser...

ImageImage
Last edited by lmarkus001 on Thu Sep 22, 2011 11:42 pm, edited 1 time in total.

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

Re: Area of Effect Macros

Post by neofax »

Looks great! Is there any way you can use JSON for the passing variable? This way I can work out a way to tie Wrathgon's Spell Manager to this?
Image
Time-Zone information UTC -5

User avatar
lmarkus001
Great Wyrm
Posts: 1862
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: Area of Effect Macros

Post by lmarkus001 »

You mean like:

Code: Select all

{
    
"processTarget""Fire in the Hole",
    
"range""20",
    
"difficulty""10",
    
"caster_level""1",
    
"cl_bonus""0",
    
"save1""reflex",
    
"sr""1",
    
"saveresult1""halfdmg",
    
"modset1""",
    
"ms_save1""na",
    
"modset2""",
    
"ms_save2""na",
    
"save2""reflex",
    
"saveresult2""halfdmg",
    
"id""C0A801076801D181B023000080800100"


8)

User avatar
Azhrei
Site Admin
Posts: 12050
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Area of Effect Macros

Post by Azhrei »

lmarkus001 wrote:You mean like:

Heh-heh, yeah. ;)

You might consider requiring that the incoming data already be properly structured for your use. For example, the incoming JSON could contain an object that has the range and other fields set up as necessary for use in the getTokens function.

And any field which might even remotely be used to hold more than one value should be an array. From the sample you posted I'm thinking of the "save1" actually being "saves" and the "id" field being an array of IDs, for example.

I'm thinking something like:

Code: Select all

{
    
"processTarget""Fire in the Hole",
    
"range": { range20metric"ONE_ONE_ONE", ... },
    
"difficulty""10",
    
"caster_level""1",
    
"cl_bonus""0",
    
"sr""1",
    
"saves": [
        [ 
"reflex"1"halfdmg" ],
        [ 
"will"1"sickened" ]
    ],
    
"id": [ "C0A801076801D181B023000080800100" ]

I'm thinking that the saves entry would be one array for each possible save. Prior to rolling the saves invoke a "hook" UDF (that runs in the same scope) that normally does nothing. For some spells it might want/need to do extra processing. For example, spells like Unholy Blight need to know a creature's alignment and whether they are outsiders.

Each row in the save array is one save type. The second value is 0="no new roll" and 1="new roll". This allows a single Will save roll to be used multiple times because the third field is a macro that is called to process the saving throw. So the "halfdmg" macro would be passed true/false whether the save succeeded and the token ID of the current token. It applies damage as appropriate based on Evasion and similar feats. The second one makes a new roll (the second element == 1) and passes the true/false of that roll and the token IDs to the "sickened" macro (which applies the states as needed). If the second parameter == 0, it means the same d20 roll of the previous save gets used again. This allows a single Will save to be checked multiple times to see what affect it has. (Hm, maybe overkill. Maybe the roll result and the calculated DC would be enough if passed to the macro? The macro could process the incoming data however it wants.)

By using macros for those fields instead of modsets, more complex work can be done. (Although your modsets can do an awful lot as it is, so maybe just turning a modset on/off would be enough?)

Well, maybe that save stuff is overkill. But it'd be cool for it to be extensible by simply defining new macros when a new spell effect came along...

Post Reply

Return to “[D&D3.5 + Pathfinder] Campaign Macros”