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
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.
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 (173.17 KiB) Viewed 8338 times
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.
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.
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,
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.
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.
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: {
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 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.
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.
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.
[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.