MT1.3b86.03 Campaign Framework (Old Version)

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

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

Forum rules
Discussion regarding lmarkus001's framework only. Other posts deleted without notice! :)
User avatar
lmarkus001
Great Wyrm
Posts: 1867
Joined: Sat Mar 29, 2008 12:30 am
Location: Layfayette Hill, PA

Re: MT1.3b86.03 Campaign Framework (COMING SOON)

Post by lmarkus001 »

aliasmask wrote: Here's a quick simple update to handle Invis Move. As a side note, you could keep the original image instead of copying the blank image since we now have Visible to Owners Only. The only non-functional thing about using an object and the notes for the stats is if a seen token is on top... can't click for the notes below. I haven't thought of a good solution for that though.
||| onTokenMove |||

Code: Select all

@@ @onTokenMove
@PROPS@ fontColor=white ; autoExecute=true ; fontSize=11pt ; sortBy= ; color=red ; playerEditable=true ; applyToSelected=false ; group= ; tooltip= ; minWidth= ; 
[H, token(currentToken()), if(isNPC() && getState("Invisible")), code: {
   [H, MACRO("InvisibleMove@Lib:libDnD35Pathfinder"): ""]
}; {}]

!! 
From my play test last night, I discovered that ONLY one onTokenMove macro can be active in a campaign. When I put one on my library, it was executed before Wolf42's (whose was never executed).

So I added this into Wolf42's library (making it a bit customized as I also added the following line to his teleportMap macro.)

Code: Select all

[H, IF( hasProperty( "SizeM", me ) ): setSize( "CUSTOM", me, SizeM ) ]

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: MT1.3b86.03 Campaign Framework (COMING SOON)

Post by aliasmask »

lmarkus001 wrote:
aliasmask wrote: Here's a quick simple update to handle Invis Move. As a side note, you could keep the original image instead of copying the blank image since we now have Visible to Owners Only. The only non-functional thing about using an object and the notes for the stats is if a seen token is on top... can't click for the notes below. I haven't thought of a good solution for that though.
||| onTokenMove |||

Code: Select all

@@ @onTokenMove
@PROPS@ fontColor=white ; autoExecute=true ; fontSize=11pt ; sortBy= ; color=red ; playerEditable=true ; applyToSelected=false ; group= ; tooltip= ; minWidth= ; 
[H, token(currentToken()), if(isNPC() && getState("Invisible")), code: {
   [H, MACRO("InvisibleMove@Lib:libDnD35Pathfinder"): ""]
}; {}]

!! 
From my play test last night, I discovered that ONLY one onTokenMove macro can be active in a campaign. When I put one on my library, it was executed before Wolf42's (whose was never executed).

So I added this into Wolf42's library (making it a bit customized as I also added the following line to his teleportMap macro.)

Code: Select all

[H, IF( hasProperty( "SizeM", me ) ): setSize( "CUSTOM", me, SizeM ) ]
Good to know.

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

Re: MT1.3b86.03 Campaign Framework (COMING SOON)

Post by lmarkus001 »

aliasmask wrote:Small request. Can you update the weapon default values for OHLight to 2. Many beginning players and GMs leave that value at 0 configuring the weapon incorrectly and wonder why they have a -6 to attack. This was a source of great confusion for some people in recent weeks and they assumed the macros didn't work right.
Hummm...

It defaults to Off-Hand Heavy/Monster which is the easiest setting for GMs as most creatures use Natural attacks so it manages the Primary/Secondary for the GM (0/-5).

Only players and NPCs that use weapons would use a differing setting.

If we default TWF to Single Weapon, then the Primary/Secondary choice will have differing meaning and in turn be confusing by default (especially to GMs).

As I understand the rules for TWF and Creature attacks, I have no issues setting the default to whatever, but I am not convinced this change clarifies anything...

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: MT1.3b86.03 Campaign Framework (COMING SOON)

Post by aliasmask »

Most of the creature tokens I use are from Imarv's collection and they already have the attacks programmed. From my experience TWFighters don't make up the majority of the party and unless they have the TWF feat, they don't bother with two weapons. Perhaps some check could be made for the feat when setting the value, but that seems a bit like over programming. But, it's just a request. If I feel the need, I'll just update my own campaign file.

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: MT1.3b86.03 Campaign Framework (COMING SOON)

Post by aliasmask »

I was just looking something over based on something Az mentioned. I have a super small tweak to condition report. It's funny, I thought I had already made this change. First of all, the id="..." shouldn't have a space in there and the bottom conditions, which I named states, because that's all they really are (active states) doesn't have that in the id. All the ids should be unique and I didn't really see a need to change the attribute to class since id is unsupported anyway (no javascript or domain). I use this for the sort.

Code: Select all

@@ @ConditionReport
[H: output = "[]" ]
[H: gTok = "Lib:GlobalsSRDPF" ]
[H: jTM = getLibProperty( "TempModToggleSets", gTok ) ]
[H: atms = json.get( PrivateJSON, "ActiveTempModSets" ) ]
[H, IF( json.isEmpty( atms ) ): activeMSList = ""; activeMSList = json.toList( json.unique( atms ) ) ]
[H: jPTM= json.get( PrivateJSON, "CustomModSetValues") ]

[H, FOREACH( m, activeMSList ), CODE: {
   [IF( json.isEmpty( jPTM ) ): jPM = ""; jPM = json.get( jPTM, m ) ]
   [IF( json.isEmpty( jPM ) ): tTip = json.get( json.get( jTM, m ), "tip" );tTip = json.get( jPM, "tip" ) ]
   [ tCat = json.get( json.get( jTM, m ), "cat" )]
   [ tState = json.get( json.get( jTM, m), "state")]
   [H, if(tState != "NA"), code: {
      [H: setState(tState,1)]
      [H: stateImage = strformat("<img src='%s' width=50 height=50>",getStateImage(tState))]
   };{
      [H: stateImage = " "]
   }]     
   [IF(tCat == ""): tCat = "mod"]
   [H: tTip = strformat('<span title="<html><table><tr valign=top><td>%{stateImage}</td><td>%{tTip}</td></tr></table></html>">%{m}</span>')]
   [H: output = json.append(output,strformat('<tr id="%s"><td style="padding: 0px 2px 0px 5px;text-align:right"><b>%{tCat}:</b></td><td style="padding-right: 5px">%{tTip}</td></tr>',replace(lower(tCat+m),"[^a-zA-Z0-9._]","")))]
}]
[H: aitems = json.get( PrivateJSON, "ActiveItems" ) ]
[H, IF( json.isEmpty( aitems ) ): activeMSList = ""; activeMSList = json.toList( json.unique( aitems ) ) ]

[H, FOREACH( m, activeMSList ), CODE: {
   [IF( json.isEmpty( jPTM ) ): jPM = ""; jPM = json.get( jPTM, m ) ]
   [IF( json.isEmpty( jPM ) ): tTip = json.get( json.get( BonusTypedItems, m ), "tip" );tTip = json.get( jPM, "tip" ) ]
   [ tCat = json.get( json.get( BonusTypedItems, m ), "cat" )]
   [ tState = json.get( json.get( BonusTypedItems, m), "state")]
   [H, if(tState != "NA"), code: {
      [H: setState(tState,1)]
      [H: stateImage = strformat("<img src='%s' width=50 height=50>",getStateImage(tState))]
   };{
      [H: stateImage = " "]
   }]     
   [IF(tCat == "" || tCat == "Misc"): tCat = "Item"]
   [H: tTip = strformat('<span title="<html><table><tr valign=top><td>%{stateImage}</td><td>%{tTip}</td></tr></table></html>">%{m}</span>')]
   [H: output = json.append(output,strformat('<tr id="%s"><td style="padding: 0px 2px 0px 5px;text-align:right"><b>%{tCat}:</b></td><td style="padding-right: 5px">%{tTip}</td></tr>',replace(lower(tCat+m),"[^a-zA-Z0-9._]","")))]
}]

[H: numConditions = tbl("Conditions",0)]
[H, for(i,0,numConditions), code: {
   [H: conditionStr = tbl("Conditions",i + 1)]
   [H: curState = listGet(conditionStr,0,";")]
   [H, if(getState(curState)), code: {
      [H: conditionText = replace(listGet(conditionStr,1,";"),"%","%%")]
      [H: stateImage = "'"+getStateImage(curState)+"'"]
      [H: tTip = strformat('<span title="<html><table><tr valign=top><td><img src=%{stateImage} width=50 height=50></td><td>%{conditionText}</td></tr></table></html>">%{curState}</span>')]
      [H: output = json.append(output,strformat('<tr id="state%s"><td style="padding: 0px 2px 0px 5px;text-align:right"><b>Condition:</b></td><td style="padding-right: 5px">%{tTip}</td></tr>',lower(curState)))]
   };{}]
}]

[H: output = json.sort(output,"a")]
[R,S, if(! json.isEmpty(output)): '<table style="background-color:black"><tr><td style="padding:1pt"><table style="background-color:white"><tr><th colspan=2 style="color:blue;text-align:center">Mod Report</th></tr>' + json.toList(output,"") + "</table></td></tr></table>"; "<b>Mod Report: No mods to report.</b>"]

!!  
edit: added replace for cat names.
Last edited by aliasmask on Sat Sep 17, 2011 6:54 pm, edited 2 times in total.

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

Re: MT1.3b86.03 Campaign Framework (RELEASED)

Post by lmarkus001 »

Will add to r04 :-)

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: MT1.3b86.03 Campaign Framework (RELEASED)

Post by aliasmask »

Another request for r04. Can you not add the notes to stat sheet for AC mods. It really makes the sheet way too big with any kind of descriptive note. I would rather rely on the mod report for details. Ah, seems to only be for actual shield nor armor or mods.

I added "Shield (Abjurant Champion)" to my list of mods. I just put Abjurant_Champion_Level in the globalMod and adjusted the shield formula to 4+number(replace("0"+globalMod,"^0-9","")).

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: MT1.3b86.03 Campaign Framework (RELEASED)

Post by aliasmask »

lmarkus001 wrote:

Code: Select all

[H, TOKEN(currentToken()), IF(isNPC() && getState("Invisible")), CODE: {
   [H, MACRO("InvisibleMove@Lib:libDnD35Pathfinder"): ""]
}; {}]
I know I wrote this, but I just realized that the token(currentToken()) part is not needed. I think this is an artifact of other code I was writing. I usually do this if I need to call a macro who doesn't have an id option and needs to be run against a specific token. Since the token() and if() are on the same level, token() does not affect the if(). It doesn't hurt to have it there, but it isn't adding any benefit, especially since the onTokenMove always has an impersonated token.

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: MT1.3b86.03 Campaign Framework (RELEASED)

Post by aliasmask »

Another request :) The Shoot/Throw in to melee (-4) are forms of cover, which also includes attacking around a corner in melee. It looks like you don't check this mod if the attack is for a melee weapon. I suggest renaming it to Target has Cover (-4) with maybe the examples in a note below.

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

Re: MT1.3b86.03 Campaign Framework (RELEASED)

Post by lmarkus001 »

aliasmask wrote:Another request for r04. Can you not add the notes to stat sheet for AC mods. It really makes the sheet way too big with any kind of descriptive note. I would rather rely on the mod report for details. Ah, seems to only be for actual shield nor armor or mods.

I added "Shield (Abjurant Champion)" to my list of mods. I just put Abjurant_Champion_Level in the globalMod and adjusted the shield formula to 4+number(replace("0"+globalMod,"^0-9","")).
Aye, I use this fairly extensively as a fast way to see the basic armor a person is wearing. If the mod has Armor or Shield mod and a Note, then that note is added to the statsheet so I can see it. I usually put a very minimal descriptor in (Chain, W.Shield, or the like).

But, I can probably stuff this into a different property which would allow you more control and still make me happy.

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

Re: MT1.3b86.03 Campaign Framework (RELEASED)

Post by lmarkus001 »

lmarkus001 wrote: 1.3b86_03
=========
  • Support for Hex and Gridless Maps. Previously token sizes were not managed so you could only use a Hex grid map with tokens that were Medium sized. Now sizes are managed and even gridless maps should be supported. The Black Tentacles macro will likely only work on Square grid maps.
Found a functionality issue. If you try to SetupBlank or EditCore a token on a non-Square grid map, you can run into an issue. For the near term, just edit/setup on a Square grid map. Or you can edit two macros: SetupBlank (campaign macro), editMain (library macro).

Bad code:

Code: Select all

[H: sizeList = table( "SysVars", json.get( table( "SysVars", 0 ), "sizeList" ) ) ] 
Good code:

Code: Select all

[H: tgridType = lower( json.get(json.get( getInfo("map"), "grid"), "type") )]
[H: tgridType = if( endsWith( tgridType, "hex" ), "hex", tgridType ) ]
[H: sizeList = table( "SysVars", json.get( table( "SysVars", 0 ), "sizeList" + tgridType ) ) ] 

Avotas
Cave Troll
Posts: 76
Joined: Mon Nov 22, 2010 8:42 am

Re: MT1.3b86.03 Campaign Framework (LATEST VERSION)

Post by Avotas »

Just a thumbs up for another excellent release!

User avatar
Paradox
Dragon
Posts: 724
Joined: Fri Feb 27, 2009 4:01 pm

Re: MT1.3b86.03 Campaign Framework (LATEST VERSION)

Post by Paradox »

I completely missed the updates in the new thread. What a surprise this is!

I was just about to start a new campaign file, so this is most welcome.

EDIT: if I get started with r3, will I just be able to export my maps and tokens to r4?

Or should I wait for a day or two? (though I hate to push)
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.

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

Re: MT1.3b86.03 Campaign Framework (LATEST VERSION)

Post by lmarkus001 »

The "easiest" upgrade path is to export your maps and import them into the new base framework. You will want to bring across your Lib:GlobalsSRDPF token if you have setup waypoints, and you will want to re-initialize the Wolf42 onTokenMove teleport pads. I may have the odd system property tweak in r04 but am trying to provide a macro to do a one time update for those.

r04 is becoming more involved that I first hoped so will take a while to release. A spherical AE targeting/application solution is rather complex. What I end up with will not be perfect, but it should be cool :-)

User avatar
Paradox
Dragon
Posts: 724
Joined: Fri Feb 27, 2009 4:01 pm

Re: MT1.3b86.03 Campaign Framework (LATEST VERSION)

Post by Paradox »

Cool, now I know not to be afraid to settle in with r3 for awhile.

Thanks! And thanks for your work, as always!
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.

Post Reply

Return to “D&D 3.5/Pathfinder 1e Campaign Macros”