RPTools.net

Discussion and Support

Skip to content

It is currently Thu Jul 27, 2017 7:54 am 




Forum rules


Discussion regarding lmarkus001's framework only. Other posts deleted without notice! :)



Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Great Wyrm
 
Joined: Fri Mar 28, 2008 11:30 pm
Posts: 1865
Location: Layfayette Hill, PA
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Thu Sep 08, 2016 10:23 am 
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...

Code:
[HtToken currentToken() ]
[
HTOKENtToken ): assertisOwner() || isGM(), getMacroName() + ": Not your token!" ) ]
[
Hcancel input"Warning|This will clear all Mod-Sets and temporary mods are you certain you wish to continue?||LABEL|SPAN=TRUE" )]
[
Habortcancel ) ]

[
Houtput "<br>"]

[
HstatDMGarray '["Strength Damage","Dexterity Damage","Constitution Damage","Intelligence Damage","Wisdom Damage","Charisma Damage"]']
[
HcurrAM json.removeAll(json.getPrivateJSON"ActiveTempModSets" ), statDMGarray)]

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

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

[
Hbroadcast(outputjson.union(lgm.getAllGMs(),getOwners("json",tToken)),"json")]

[
Hlgm.reloadSheet(tToken)] 

_________________
D&D3.5 / Pathfinder Framework


Top
 Profile  
 
 Offline
Giant
 
Joined: Tue Feb 05, 2008 3:39 pm
Posts: 196
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Mon Sep 12, 2016 9:54 am 
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.


Top
 Profile  
 
 Offline
Dragon
 
Joined: Sat Dec 22, 2007 5:37 pm
Posts: 356
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Wed Oct 26, 2016 2:12 pm 
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


Sanity_Maptool_MockUp.png
Sanity_Maptool_MockUp.png [ 173.17 KiB | Viewed 418 times ]
Top
 Profile  
 
 Offline
Kobold
 
Joined: Sat Nov 19, 2016 12:52 am
Posts: 18
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Sat Nov 19, 2016 1:55 am 
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


Top
 Profile  
 
 Offline
Dragon
 
Joined: Sat Dec 22, 2007 5:37 pm
Posts: 356
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Sat Nov 19, 2016 1:17 pm 
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.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sat Nov 19, 2016 12:52 am
Posts: 18
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Mon Nov 21, 2016 6:19 pm 
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


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7751
Location: Bay Area
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Mon Nov 21, 2016 7:25 pm 
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.

_________________
Downloads:


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sat Nov 19, 2016 12:52 am
Posts: 18
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Mon Nov 21, 2016 9:27 pm 
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.


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sat Nov 19, 2016 12:52 am
Posts: 18
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Wed Nov 23, 2016 10:48 am 
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


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7751
Location: Bay Area
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Wed Nov 23, 2016 11:13 am 
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.

_________________
Downloads:


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sat Nov 19, 2016 12:52 am
Posts: 18
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Wed Nov 23, 2016 3:29 pm 
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


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7751
Location: Bay Area
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Wed Nov 23, 2016 7:05 pm 
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.

_________________
Downloads:


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sat Nov 19, 2016 12:52 am
Posts: 18
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Thu Nov 24, 2016 11:31 am 
alias,

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

ralstad


Top
 Profile  
 
 Offline
Dragon
 
Joined: Sat Dec 22, 2007 5:37 pm
Posts: 356
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Sat Nov 26, 2016 5:58 pm 
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:
[H: fGMSecret = getLibProperty("fGMSecret", "Lib:GlobalsSRDPF")]
[H,MACRO("Attack@Lib:libDnD35Pathfinder"): json.set("{}", "flagSecret", fGMSecret, "numWeapChoice", 6 ) ]


Top
 Profile  
 
 Offline
Kobold
 
Joined: Sat Nov 19, 2016 12:52 am
Posts: 18
 Post subject: Re: 91.08 Pathfinder + D&D3.5 Framework NEW!
PostPosted: Sat Nov 26, 2016 7:13 pm 
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests





cron

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman