91.08 Pathfinder + D&D3.5 Framework

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: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by lmarkus001 »

jsharen wrote:Lindsay,
How hard would it be to add a clear mod's button? That just simply removes all active mods.

We find ourselves doing this regularly, and a simple button would be a lot smoother than having to uncheck every mod individually. Usually when we end a combat, and go into resting.

Cheers,
Jared
I will add this in. As Aliasmask mentions, there is an option under Edit Character to remove ALL mods, but this also removes equipment (I use it when things get confused to return the token to a clean slate). But what you want is a way to remove all Active-mods but keep equipment on.

EDIT: Ok this is not as trivial as I initial thought. The remove all can be very fast as it strips out all mod info without having to undo individual mods, so a global delete is possible. Removing just the active-mods (and not items or stat damage) means I need to undo just the mods that are related to the active-mods. So while I can do this, it will be a slow macro (but still faster than individually clicking off all the mods on the character sheet, or opening the active-mods dialog then deselecting the desired mods).

EDIT2: Here is not thoroughly tested code that will do what you are asking. I will work the kinks out later if any...
RemoveAllActiveMods

Code: Select all

[H: tToken = currentToken() ]
[H, TOKEN( tToken ): assert( isOwner() || isGM(), getMacroName() + ": Not your token!" ) ]
[H: cancel = input( "Warning|This will clear all Mod-Sets and temporary mods are you certain you wish to continue?||LABEL|SPAN=TRUE" )]
[H: abort( cancel ) ]

[H: output = "<br>"]

[H: statDMGarray = '["Strength Damage","Dexterity Damage","Constitution Damage","Intelligence Damage","Wisdom Damage","Charisma Damage"]']
[H: currAM = json.removeAll(json.get( PrivateJSON, "ActiveTempModSets" ), statDMGarray)]

[H, FOREACH(tmID, currAM), CODE: {
   [MACRO("subModToggle@Lib:libDnD35Pathfinder"): json.set( "{}", "tokenID", tToken, "setID", tmID, "setType", 0 ) ]
   [H: output = output + macro.return ]
}]

[H: output = "<b>" + token.name + "</b>:  All temporary mods (but not Stat Damage) have been cleared."+output ]

[H: broadcast(output, json.union(lgm.getAllGMs(),getOwners("json",tToken)),"json")]

[H: lgm.reloadSheet(tToken)] 

jsharen
Giant
Posts: 196
Joined: Tue Feb 05, 2008 3:39 pm

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by jsharen »

Thanks Lindsay, I'll give this a try. I was coming here today to mention we tried it during last nights game, and stumbled upon the wiping of everything :)

The other issue is that I was hoping for the ability to run it on multiple tokens which the Edit Char is not ideal for.

Elorebaen
Dragon
Posts: 365
Joined: Sat Dec 22, 2007 5:37 pm

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by Elorebaen »

Heya LM (or any other kick-butt framework coder),

I would like to integrate the new Sanity mechanic. I was thinking of something like the AC approach (see attached image). Any tips for getting started? Thanks!

Best,
E
Attachments
Sanity_Maptool_MockUp.png
Sanity_Maptool_MockUp.png (173.17 KiB) Viewed 8308 times

ralstad
Cave Troll
Posts: 54
Joined: Sat Nov 19, 2016 12:52 am

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by ralstad »

Hello

First I would like to say thank you for creating this, it is great. Everything is so useful at least as far as I have got.
Now a question, is there a way to add a skill that is not a craft, knowledge, language, perform, profession skill. My group plays D&D 3.5 and importing a stat block works wonders but it doesn't have skills like spot, notice, etc.

I also just noticed when I set up a token then try to use the attack it gives me an error.

Error in body of roll
Statement options (If any): H,FOREACH(m,jMMFields,""), CODE
Statement Body (first 200 characters) {[H: changed=0][H: disable=1](H: active=if(json.contains( aTMS, m), 1, 0)](H: jMM=json.get(meleemods,m)](H: presetVars =""](H:tjfjMM=json.fields(jmm,

that is as much as it shows in the chat window. I checked the error logs but couldn't find anything there to post. Hope that helps you.

Again this framework is great.

ralstad

Elorebaen
Dragon
Posts: 365
Joined: Sat Dec 22, 2007 5:37 pm

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by Elorebaen »

ralstad wrote:Hello

First I would like to say thank you for creating this, it is great. Everything is so useful at least as far as I have got.
Now a question, is there a way to add a skill that is not a craft, knowledge, language, perform, profession skill. My group plays D&D 3.5 and importing a stat block works wonders but it doesn't have skills like spot, notice, etc.

I also just noticed when I set up a token then try to use the attack it gives me an error.

Error in body of roll
Statement options (If any): H,FOREACH(m,jMMFields,""), CODE
Statement Body (first 200 characters) {[H: changed=0][H: disable=1](H: active=if(json.contains( aTMS, m), 1, 0)](H: jMM=json.get(meleemods,m)](H: presetVars =""](H:tjfjMM=json.fields(jmm,

that is as much as it shows in the chat window. I checked the error logs but couldn't find anything there to post. Hope that helps you.

Again this framework is great.

ralstad
R,

I'm not at my computer, but I believe you can set the camaign properties to use 3.5.

ralstad
Cave Troll
Posts: 54
Joined: Sat Nov 19, 2016 12:52 am

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by ralstad »

Thanks,

You don't happen to know why I would get this error when trying to use the attack macro

Error in body of roll
Statement options (If any): H,FOREACH(m,jMMFields,""), CODE
Statement Body (first 200 characters) {[H: changed=0][H: disable=1](H: active=if(json.contains( aTMS, m), 1, 0)](H: jMM=json.get(meleemods,m)](H: presetVars =""](H:tjfjMM=json.fields(jmm,

Any help would be appreciated.

ralstad

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

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by aliasmask »

Could be related to your active mods. I suggest clearing all mods. I don't know the name of macro but mine is called Edit Char. Select the clear mods option.

ralstad
Cave Troll
Posts: 54
Joined: Sat Nov 19, 2016 12:52 am

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by ralstad »

The only mod I have on any figure at the moment is Natural Armor. I removed the natural armor mod and tied it and gave me the same error.

I just downloaded the framework and loaded it and put 2 default tokens in and went through the setup with both of them and then tried attacking and got the same error as before.

ralstad
Cave Troll
Posts: 54
Joined: Sat Nov 19, 2016 12:52 am

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by ralstad »

ok, well first thanks alias for the attempt to help. I figured out what was going on. I referenced the previous version after finding the command the error was talking about after comparing the two I found 3 lines of code was changed 2 were not there before so I removed the 2 line of code and corrected the one line and ran it and it works perfectly.

I don't know if the 2 lines of code are for something but it actually does what it is suppose to do. So hopefully if the code is suppose to be there what it referenced isn't important.

If lmarkus001 checks and sees this the problem is in the prosessAttack macro about half way down. Here is the code that is causing the error.

[H: tjfjMM = json.fields( jMM, "json")] --------remove this
[H: tjfjMM = if(tjfjMM == "", 0, tjfjMM)] --------remove this

[H, FOREACH( n, tjfjMM ), CODE: { --------change this to {H, FOREACH(n, json.fields( jMM, "json" ) ), CODE: {

Hope this helps

ralstad

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

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by aliasmask »

ralstad wrote:If lmarkus001 checks and sees this the problem is in the prosessAttack macro about half way down. Here is the code that is causing the error.

[H: tjfjMM = json.fields( jMM, "json")] --------remove this
[H: tjfjMM = if(tjfjMM == "", 0, tjfjMM)] --------remove this

[H, FOREACH( n, tjfjMM ), CODE: { --------change this to {H, FOREACH(n, json.fields( jMM, "json" ) ), CODE: {

Hope this helps

ralstad
Or you could just removed the 2nd and not the first line. Setting the value to 0 will cause an error when it hits the foreach loop since it's not blank. Foreach will not loop through a blank string or empty json so there is no need for that kind of check there.

ralstad
Cave Troll
Posts: 54
Joined: Sat Nov 19, 2016 12:52 am

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by ralstad »

aliasmask wrote:
ralstad wrote:If lmarkus001 checks and sees this the problem is in the prosessAttack macro about half way down. Here is the code that is causing the error.

[H: tjfjMM = json.fields( jMM, "json")] --------remove this
[H: tjfjMM = if(tjfjMM == "", 0, tjfjMM)] --------remove this

[H, FOREACH( n, tjfjMM ), CODE: { --------change this to {H, FOREACH(n, json.fields( jMM, "json" ) ), CODE: {

Hope this helps

ralstad
Or you could just removed the 2nd and not the first line. Setting the value to 0 will cause an error when it hits the foreach loop since it's not blank. Foreach will not loop through a blank string or empty json so there is no need for that kind of check there.
Alias,

Do you know if that variable is needed, I don't see it anywhere else in the code.


[H: tjfjMM = json.fields( jMM, "json")]
[H: tjfjMM = if(tjfjMM == "", "", tjfjMM)] -------so change 0 to ""

[H, FOREACH( n, tjfjMM ), CODE: {

Is that what your talking about. I don't read this code but know VB pretty good so some of this makes sense, just starting to learn this coding, as in this week.

ralstad

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

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by aliasmask »

You could make that change, but it doesn't do anything, ie if a then a else a. Lindsay has his own way of doing his code. tj probably means temp json so it's only for that loop. Your original fix is just fine.

ralstad
Cave Troll
Posts: 54
Joined: Sat Nov 19, 2016 12:52 am

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by ralstad »

alias,

Thanks, just trying to make sure I didn't mess anything important up.

ralstad

Elorebaen
Dragon
Posts: 365
Joined: Sat Dec 22, 2007 5:37 pm

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by Elorebaen »

How do you remove the GM-only option from the Attack dialog? Our group likes this attack macro better than the Attack Frame. Thank you!!

Code: Select all

[H: fGMSecret = getLibProperty("fGMSecret", "Lib:GlobalsSRDPF")]
[H,MACRO("Attack@Lib:libDnD35Pathfinder"): json.set("{}", "flagSecret", fGMSecret, "numWeapChoice", 6 ) ]

ralstad
Cave Troll
Posts: 54
Joined: Sat Nov 19, 2016 12:52 am

Re: 91.08 Pathfinder + D&D3.5 Framework NEW!

Post by ralstad »

Hello all,

Could someone explain this function to me.

[H: GenderEtcSearch = strfind(statblock, "(?i)XP [0-9,]+ ([a-z ,0-9]*)( LG | LN | LE | NG | N | NE | CG | CN | CE )")]

Now for what I understand.

I understand that "GenderEtcSearch = strfind(statblock," this part looks in statblock to find a string of letters and set it to variable "GenderEtcSearch".
What I don't understand is " "(?i)XP [0-9,]+ ([a-z ,0-9]*)( LG | LN | LE | NG | N | NE | CG | CN | CE )")] this part of the variable.

Any help would be greatly appreciated.

ralstad

Post Reply

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