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

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! :)
neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

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

Post by neofax »

aethirshero wrote:I'm still fairly new to using MapTool, so this might be a problem on my part, but I'm getting the same error as Elorebaen when trying to edit a token's skills. Also though, when trying to edit a token's weapons, I get this error:

Undefined function: outputTo

Can anyone help me out with either of these problems?

Two posts above I explain how to fix this. You need to manually edit the macro onCampaignLoad on the token Lib:libDnD35Pathfinder. If you edit it you need to change the @this to @Lib:libDnD35Pathfinder. If you still need help contact me offline and I can send you the updated macro or token. My email is neofax99 <AT> gmail dot com.
Image
Time-Zone information UTC -5

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

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

Post by Elorebaen »

aethirshero wrote:I'm still fairly new to using MapTool, so this might be a problem on my part, but I'm getting the same error as Elorebaen when trying to edit a token's skills. Also though, when trying to edit a token's weapons, I get this error:

Undefined function: outputTo

Can anyone help me out with either of these problems?


Neo's solution worked for me. Try that and see if you are still receiving those errors.

User avatar
patnodewf
Cave Troll
Posts: 97
Joined: Sun Jan 15, 2012 3:44 am

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

Post by patnodewf »

Is it possible to change the "deathpoint" for NPCs to 0, as a global option?

I'm not a fan of forcing my players to deal with "dying" monsters, I'd rather just have them marked as "dead" and be done with it.

EDIT: I just added this line to the [email protected]:libDnD35Pathfinder macro...

Code: Select all

[h, if(isNPC()): deathpoint = -1]


It seems to be working, setting it as 0 marks it as both dead & disabled though...
My form-fillable PDF Character Sheet for Pathfinder can be found here.

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

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

Post by aliasmask »

patnodewf wrote:Is it possible to change the "deathpoint" for NPCs to 0, as a global option?

I'm not a fan of forcing my players to deal with "dying" monsters, I'd rather just have them marked as "dead" and be done with it.

EDIT: I just added this line to the [email protected]:libDnD35Pathfinder macro...

Code: Select all

[h, if(isNPC()): deathpoint = -1]


It seems to be working, setting it as 0 marks it as both dead & disabled though...


Just add the bottom line in this section:

Code: Select all

[H, IF(state.Dead), CODE: {
  [H: if(isNPC(), setLayer("object"), '0')]
  [H: state.Dying = 0]
  [H: state.Unconscious = 0]
  [H: state.Prone = 0]
  [H: state.StableHP = 0]
  [H: state.Disabled = 0]
};{}]

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

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

Post by neofax »

The easiest way to handle this is to add all of the types and subtypes to deathpoint in the table. This does not affect any code at all in it was designed to do this. You can see how undead is done and add the other types/subtypes.
Image
Time-Zone information UTC -5

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

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

Post by aliasmask »

neofax wrote:The easiest way to handle this is to add all of the types and subtypes to deathpoint in the table. This does not affect any code at all in it was designed to do this. You can see how undead is done and add the other types/subtypes.

I think his solution was good too, just set deathpoint = 0 if NPC. I was thinking up an update where it changes the image to a random blood splatter and saves the old image in the portrait. I think it will make the field look less confusing for the players. Get rid of dead state image. (set to transparent image)

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'm teaching a friend to use Maptools so I can actually play!

But he's running into an error that doesn't happen for me.

When he goes to Edit Globals to use the handout configuration he gets an error:

Code: Select all

 Error processing "FOREACH" option: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 error executing expression json.get(arHandouts, 0)..       Statement options (if any): R, FOREACH(p, json.get(arHandouts, 0), "")       Statement Body : "
"+p


This doesn't happen with me. He's tried to export his maps and tokens and import them in a clean campaign file, and still gets this error.

Any ideas?
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.

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

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

Post by aliasmask »

Here's the original code (my version):

Code: Select all

@@ @buildHandoutsDialog
&nbsp; 
[H: gHandouts = getLibProperty("Handouts", "Lib:GlobalsSRDPF")]
[
H: arHandouts = json.get(gHandouts, "handouts")]
[
H: tTable = json.get(gHandouts, "table")]
[
H: hCount = 0]

<
html><body>
<
table border=1>
  <tr>
    <td><a href= [R: macroLinkText("[email protected]"+getMacroLocation(), "gm", "")] >Add Handout</a></td>
    <td><b>Handout Table Name:</b> <a href= [R: macroLinkText("[email protected]"+getMacroLocation(), "gm", "")] >[R: tTable]</a></td>
  </tr>
</
table>
<
table>
<
tr>[R, FOREACH(p, json.get(arHandouts, 0), "</th>"): "<th>"+p]</tr>
[
R, FOREACH(p, arHandouts, "</tr>"), CODE: {
  [H: count = 1]
  <tr>[R, FOREACH(v, p, "</td>"), CODE: {
    <td [R, IF(count > 4 && count < 9): "align='center'"]>[R, IF(count == 2): "<a href='" + macroLinkText("[email protected]"+getMacroLocation(), "gm", hCount) + "' >"][R: json.get(p,v)][R, IF(count == 2): "</a>"]
    [H: count = count + 1]
  }]
  [H: hCount = hCount + 1]
}]
</
table>
</
body></html>&nbsp;

!!
 

I would add the pList line and update the loop with this:

Code: Select all

<!-- OLD -->
<
tr>[R, FOREACH(p, json.get(arHandouts, 0), "</th>"): "<th>"+p]</tr>

<!--
 NEW -->
[
H, if(! json.isEmpty(arHandouts)): pList = json.get(arHandouts, 0); pList = ""]
<
tr>[R, FOREACH(p, pList, "</th>"): "<th>"+p]</tr> 

The error is caused by arHandouts being empty.

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 »

THANK YOU!
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.

IntlCron
Kobold
Posts: 1
Joined: Sun Feb 12, 2012 11:01 am

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

Post by IntlCron »

neofax wrote:
aethirshero wrote:I'm still fairly new to using MapTool, so this might be a problem on my part, but I'm getting the same error as Elorebaen when trying to edit a token's skills. Also though, when trying to edit a token's weapons, I get this error:

Undefined function: outputTo

Can anyone help me out with either of these problems?

Two posts above I explain how to fix this. You need to manually edit the macro onCampaignLoad on the token Lib:libDnD35Pathfinder. If you edit it you need to change the @this to @Lib:libDnD35Pathfinder. If you still need help contact me offline and I can send you the updated macro or token. My email is neofax99 <AT> gmail dot com.


I just went and followed your advice to the letter, but still get the exact same error when trying to edit a token's skills. I'm not sure what to do from here.

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

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

Post by neofax »

You check to make sure every input box on the skill dialog has a number or zero in it? If so, post the token here and I will take a look at it.
Image
Time-Zone information UTC -5

User avatar
patnodewf
Cave Troll
Posts: 97
Joined: Sun Jan 15, 2012 3:44 am

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

Post by patnodewf »

aliasmask wrote:
neofax wrote:The easiest way to handle this is to add all of the types and subtypes to deathpoint in the table. This does not affect any code at all in it was designed to do this. You can see how undead is done and add the other types/subtypes.

I think his solution was good too, just set deathpoint = 0 if NPC. I was thinking up an update where it changes the image to a random blood splatter and saves the old image in the portrait. I think it will make the field look less confusing for the players. Get rid of dead state image. (set to transparent image)


This is the Dead state image I'm using, I found it somewhere on these forums:

Dead_bloody.png
Dead_bloody.png (61.81 KiB) Viewed 1546 times


As a full-token-size state image, there definitely is no question if something is dead on the field - especially with it moved to the object layer.
My form-fillable PDF Character Sheet for Pathfinder can be found here.

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

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

Post by Elorebaen »

Does anyone know why this random error shows up "Unknown JSON type "" in function "json.get"." ?
I am receiving that error when trying to run Mod report on a token.

Thanks.

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

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

Post by neofax »

Elorebaen wrote:Does anyone know why this random error shows up "Unknown JSON type "" in function "json.get"." ?
I am receiving that error when trying to run Mod report on a token.

Thanks.

You may have a corrupt JSON in the ActiveMod section of your character properties. E-mail the token and I will check it out. Probably won't get to it today as I am sick, but I will try.
Image
Time-Zone information UTC -5

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

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

Post by aliasmask »

Elorebaen wrote:Does anyone know why this random error shows up "Unknown JSON type "" in function "json.get"." ?
I am receiving that error when trying to run Mod report on a token.

Thanks.

I actually ran in to that problem recently myself. It could be a couple of things. The one thing it was for me was I had some active mods on from another campaign for mods that didn't exist in this campaign file. Manually removing the items in in PrivateJSON like this: "ActiveTempModSets":[] fixed it for me, but there should be a coded solution. Since I'm familiar with the code, I may just do a rewrite with some error checking.

Post Reply

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