RPTools.net

Discussion and Support

Skip to content

It is currently Wed May 22, 2013 10:29 pm 




Forum rules


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



Reply to topic  [ 174 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 12  Next

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Kobold
 
Joined: Tue Mar 29, 2011 7:27 am
Posts: 10
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sat Apr 02, 2011 12:18 pm 
Threeshades wrote:
Ah wait I got it now. I forgot to hit config spell library for the AliasSpellLib.


Thanks everyone for your help I think I've got it working now.

Edit: Oh dear, now I noticed I dont seem to have access to the APG caster classes... But I think that's for the spell manager thread since it also doesn't seem to work in the original campaign file.

EDIT 2
Here is something I noticed. The framework doesn't seem to be able to handle the sizemod of a colossal creature.
Here is what it says if i try to open either the skill editor or the character sheet:
Quote:
java.lang.IndexOutOfBoundsException: Index: 8, Size: 8 Fehler beim Ausführen des Ausdrucks skSize = json.get(json.get(cSkill, "sizemod"), sizeID).

That's what it says in German anyhow, i can't seem to change the language to english anymore unfortunately. But I think its easy enough to understand the german part translates to
"error when executing the expression skSize..."

I would like to expand on this: I tried with different size mods and all of them work, even diminutive which has an equally extreme sizemod value, so I guess it isnt the sheer number that throws maptool off.
I could imagine that you would just need to set the index in question to above 8, but I dont know anything about the maptool macro code. So even if that would be correct I wouldn't know how or where to change it.

Any help?


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 5305
Location: Bay Area
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sat Apr 02, 2011 1:05 pm 
On lib:Global in the property skillsSys all the sizemod arrays only have 8 fields when they should have 9 fields. I don't know if this will effect anything else, but I change all the arrays to 9 elements. Before I couldn't open the character sheet, but now I can.

Code:
{"D&D3.5":{"tokSkillTemplate":{"name":"","subcat":"","rank":0,"classskill":0,"racialmod":0,"synergy":0,"feats":0,"equip":0,"misc":0,"altstat":"","speedmod":0,"notes":""},"sysSkillTemplate":{"locID":153,"name":"","ability":"IntB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":""},"sysSkills":[{"locID":100,"name":"Appraise","ability":"IntB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":1},{"locID":101,"name":"Balance","ability":"DexB","untrain":1,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"2"},{"locID":102,"name":"Bluff","ability":"ChaB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"3"},{"locID":103,"name":"Climb","ability":"StrB","untrain":1,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"4"},{"locID":148,"name":"Craft","ability":"IntB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Craft","desc":"5"},{"locID":104,"name":"Concentration","ability":"ConB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"6"},{"locID":105,"name":"Decipher Script","ability":"IntB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"7"},{"locID":106,"name":"Diplomacy","ability":"ChaB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"8"},{"locID":107,"name":"Disable Device","ability":"IntB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"9"},{"locID":108,"name":"Disguise","ability":"ChaB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"10"},{"locID":109,"name":"Escape Artist","ability":"DexB","untrain":1,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"11"},{"locID":110,"name":"Forgery","ability":"IntB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"12"},{"locID":111,"name":"Gather Information","ability":"ChaB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"13"},{"locID":112,"name":"Handle Animal","ability":"ChaB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"14"},{"locID":113,"name":"Heal","ability":"WisB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"15"},{"locID":114,"name":"Hide","ability":"DexB","untrain":1,"armorpenalty":1,"sizemod":[16,12,8,4,0,-4,-8,-12,-16],"type":"Physical","desc":"16"},{"locID":115,"name":"Intimidate","ability":"ChaB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"17"},{"locID":116,"name":"Jump","ability":"StrB","untrain":1,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"18"},{"locID":117,"name":"Knowledge","ability":"IntB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Knowledge","desc":"19"},{"locID":127,"name":"Listen","ability":"WisB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"20"},{"locID":128,"name":"Move Silently","ability":"DexB","untrain":1,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"21"},{"locID":129,"name":"Open Lock","ability":"DexB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"22"},{"locID":146,"name":"Perform","ability":"ChaB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Perform","desc":"23"},{"locID":150,"name":"Profession","ability":"WisB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Profession","desc":"24"},{"locID":131,"name":"Ride","ability":"DexB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"25"},{"locID":132,"name":"Search","ability":"IntB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"26"},{"locID":133,"name":"Sense Motive","ability":"WisB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"27"},{"locID":134,"name":"Sleight of Hand","ability":"DexB","untrain":0,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"28"},{"locID":154,"name":"Speak Language","ability":"IntB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Language","desc":29},{"locID":135,"name":"Spellcraft","ability":"IntB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"30"},{"locID":136,"name":"Spot","ability":"WisB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"31"},{"locID":137,"name":"Survival","ability":"WisB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"32"},{"locID":138,"name":"Swim","ability":"StrB","untrain":1,"armorpenalty":2,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"33"},{"locID":139,"name":"Tumble","ability":"DexB","untrain":0,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"34"},{"locID":140,"name":"Use Magic Device","ability":"ChaB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"35"},{"locID":141,"name":"Use Rope","ability":"DexB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":"36"},{"locID":155,"name":"Control Shape","ability":"WisB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Creature","desc":37},{"locID":156,"name":"Autohypnosis","ability":"WisB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Psionic","desc":38},{"locID":157,"name":"Psicraft","ability":"IntB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Psionic","desc":39},{"locID":158,"name":"Use Psionic Device","ability":"ChaB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Psionic","desc":40}]},"Pathfinder":{"tokSkillTemplate":{"name":"","subcat":"","rank":0,"classskill":0,"racialmod":0,"synergy":0,"feats":0,"equip":0,"misc":0,"altstat":"","speedmod":0,"notes":""},"sysSkillTemplate":{"locID":153,"name":"","ability":"IntB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":""},"sysSkills":[{"locID":142,"name":"Acrobatics","ability":"DexB","untrain":1,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":50},{"locID":100,"name":"Appraise","ability":"IntB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":51},{"locID":102,"name":"Bluff","ability":"ChaB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":52},{"locID":103,"name":"Climb","ability":"StrB","untrain":1,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":53},{"locID":148,"name":"Craft","ability":"IntB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Craft","desc":54},{"locID":106,"name":"Diplomacy","ability":"ChaB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":55},{"locID":107,"name":"Disable Device","ability":"DexB","untrain":0,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":56},{"locID":108,"name":"Disguise","ability":"ChaB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":57},{"locID":109,"name":"Escape Artist","ability":"DexB","untrain":1,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":58},{"locID":143,"name":"Fly","ability":"DexB","untrain":1,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":59},{"locID":112,"name":"Handle Animal","ability":"ChaB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":60},{"locID":113,"name":"Heal","ability":"WisB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":61},{"locID":115,"name":"Intimidate","ability":"ChaB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":62},{"locID":117,"name":"Knowledge","ability":"IntB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Knowledge","desc":63},{"locID":152,"name":"Linguistics","ability":"IntB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Language","desc":64},{"locID":144,"name":"Perception","ability":"WisB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":65},{"locID":146,"name":"Perform","ability":"ChaB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Perform","desc":66},{"locID":150,"name":"Profession","ability":"WisB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Profession","desc":67},{"locID":131,"name":"Ride","ability":"DexB","untrain":1,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":68},{"locID":133,"name":"Sense Motive","ability":"WisB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":69},{"locID":134,"name":"Sleight of Hand","ability":"DexB","untrain":0,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":70},{"locID":135,"name":"Spellcraft","ability":"IntB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":71},{"locID":145,"name":"Stealth","ability":"DexB","untrain":1,"armorpenalty":1,"sizemod":[16,12,8,4,0,-4,-8,-12,-16],"type":"Physical","desc":72},{"locID":137,"name":"Survival","ability":"WisB","untrain":1,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":73},{"locID":138,"name":"Swim","ability":"StrB","untrain":1,"armorpenalty":1,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":74},{"locID":140,"name":"Use Magic Device","ability":"ChaB","untrain":0,"armorpenalty":0,"sizemod":[0,0,0,0,0,0,0,0,0],"type":"Physical","desc":75}]}}


If you copy the above in the that property, it should work.

_________________
Downloads:


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Mon Nov 22, 2010 8:42 am
Posts: 85
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sat Apr 02, 2011 11:06 pm 
When it comes to critical attacks, some of my players let me know that the output text was difficult to discern with a single glance. To address that I modified the LibAttack macro, under libD&D35Pathfinder pog on the Libraries & Utils map. I have enclosed the code behind a spoiler button below. I hope it is useful to other GM’s.

Sample Output:

HIT: 16, 23 . . . Critical Check (swing# 2: 19) ( Lance +1 )
DMG: 7, 4 . . . Critical Damage (swing# 2) If successful add 6 point(s) of damage

Code:
[H, IF( json.type( macro.args ) == "UNKNOWN" ), CODE: {
   [ varsFromStrProp(eval(macro.args))]
   [ fullRound = 1 ]
   [ flanking = 0 ]
   [ higherGround = 0 ]
   [ rangeIncrement = 0 ]
   [ isPointBlank = 0 ]
   [ fireIntoMelee = 0 ]
   [ sneak = "0d6" ]
   [ isSneak = 0 ]
   [ sneakDMG = 0 ]
   [ favEnemy = 0 ]
   [ flurryRapid = 1 ]
   [ target1Name = "" ]
   [ target1ID = "" ]
   [ target2Name = "" ]
   [ target2ID = "" ]
   [ flagSecret = 0 ]
   [ tempATK = 0 ]
   [ tempDMG = 0 ]
};{
   [ tWeapon = json.get( macro.args, "weapon" ) ]
   [ varsFromStrProp(eval(tWeapon))]
   [ fullRound = json.get( macro.args, "fullRound" ) ]
   [IF( json.isEmpty( fullRound ) ): fullRound = 1 ]
   [ flanking = json.get( macro.args, "flanking" ) ]
   [IF( json.isEmpty( flanking ) ): flanking = 0 ]
   [ higherGround = json.get( macro.args, "higherGround" ) ]
   [IF( json.isEmpty( higherGround ) ): higherGround = 0 ]
   [ rangeIncrement = json.get( macro.args, "rangeIncrement" ) ]
   [IF( json.isEmpty( rangeIncrement ) ): rangeIncrement = 0 ]
   [ isPointBlank = json.get( macro.args, "pointBlank" ) ]
   [IF( json.isEmpty( isPointBlank ) ): isPointBlank = 0 ]
   [ fireIntoMelee = json.get( macro.args, "fireIntoMelee" ) ]
   [IF( json.isEmpty( fireIntoMelee ) ): fireIntoMelee = 0; fireIntoMelee = -4 * fireIntoMelee ]
   [ sneak = json.get( macro.args, "sneak" ) ]
   [IF( json.isEmpty( sneak ) ): sneak = "0d6" ]
   [ isSneak = if( sneak == "0d6" || sneak == 0, 0, 1 ) ]
   [ favEnemy = json.get( macro.args, "favEnemy" ) ]
   [IF( json.isEmpty( favEnemy ) ): favEnemy = 0 ]
   [ flurryRapid = json.get( macro.args, "flurryRapid" ) ]
   [IF( json.isEmpty( flurryRapid ) ): flurryRapid = 1 ]
   [ target1Name = json.get( macro.args, "target1Name" ) ]
   [IF( json.isEmpty( target1Name ) ): target1Name = "" ]
   [ target1ID = json.get( macro.args, "target1ID" ) ]
   [IF( json.isEmpty( target1ID ) ): target1ID = "" ]
   [ target2Name = json.get( macro.args, "target2Name" ) ]
   [IF( json.isEmpty( target2Name ) ): target2Name = "" ]
   [ target2ID = json.get( macro.args, "target2ID" ) ]
   [IF( json.isEmpty( target2ID ) ): target2ID = "" ]
   [ flagSecret = json.get( macro.args, "flagSecret" ) ]
   [IF( json.isEmpty( flagSecret ) ): flagSecret = 0 ]
   [ tempATK = json.get( macro.args, "tempATK" ) ]
   [IF( json.isEmpty( tempATK ) ): tempATK = 0 ]
   [ tempDMG = json.get( macro.args, "tempDMG" ) ]
   [IF( json.isEmpty( tempDMG ) ): tempDMG = 0 ]
}]

[H: gTok = "Lib:GlobalsSRDPF" ]
[H: system = getLibProperty("System", gTok)]
[H, SWITCH(system), CODE:
   case "Pathfinder": {
      [ padaID = "Power Attack/Deadly Aim" ]
      [ pa2H = 1.5 ]
      [ paMultiplier = 2 ]
      [ paOffhand = 0.5 ]
   };
   case "D&D3.5": {
      [ padaID = "Power Attack" ]
      [ pa2H = 2 ]
      [ paMultiplier = 1 ]
      [ paOffhand = 0 ]     
   };
   default: {
      [ padaID = "Power Attack" ]
      [ pa2H = 2 ]
      [ paMultiplier = 1 ]
      [ paOffhand = 0 ]
   }
]

[H: aTMS = json.get( PrivateJSON, "ActiveTempModSets" ) ]
[H, IF( json.type( aTMS ) == "UNKNOWN" ), CODE: {
   [ PrivateJSON = json.set( PrivateJSON, "ActiveTempModSets", "[]" ) ]
   [ aTMS = "[]" ]
}]
[H: paON = if( json.contains( aTMS, padaID ) > 0, 1, 0 ) ]
[H, IF( paON ): paDMG = floor( paMultiplier * json.get( json.get( json.get( json.get( json.get( PrivateJSON, "CustomModSetValues" ), padaID ), "mods" ), "globalMod" ), "v" ) ); paDMG = 0 ]

[H: tWeaponFinesse = getStrProp(Feats, "WeaponFinesse")]
[H: tWeaponFinesse = if(tWeaponFinesse == "", 0, tWeaponFinesse)]
[H: tTwoWeaponFighting = getStrProp(Feats, "TwoWeaponFighting")]
[H: tTwoWeaponFighting = if(tTwoWeaponFighting == "", 0, tTwoWeaponFighting)]
[H: tImprovedTwoWeaponFighting = getStrProp(Feats, "ImprovedTwoWeaponFighting")]
[H: tImprovedTwoWeaponFighting = if(tImprovedTwoWeaponFighting == "", 0, tImprovedTwoWeaponFighting)]
[H: tGreaterTwoWeaponFighting = getStrProp(Feats, "GreaterTwoWeaponFighting")]
[H: tGreaterTwoWeaponFighting = if(tGreaterTwoWeaponFighting == "", 0, tGreaterTwoWeaponFighting)]
[H: tMultiAttack = getStrProp(Feats, "MultiAttack")]
[H: tMultiAttack = if(tMultiAttack == "", 0, tMultiAttack)]
[H: tPointBlankShot = getStrProp(Feats, "PointBlankShot")]
[H: tPointBlankShot = if(tPointBlankShot == "", 0, tPointBlankShot)]
[H: tManyShot = getStrProp(Feats, "ManyShot")]
[H: tManyShot = if(tManyShot == "", 0, tManyShot)]
[H: tCriticalFocus = getStrProp(Feats, "CriticalFocus")]
[H: tCriticalFocus = if(tCriticalFocus == "", 0, tCriticalFocus)]
[H: jCombat = json.get(PrivateJSON, "Combat")]
[H, IF( json.isEmpty( jCombat ) ): tMagicExtraAttack = 0; tMagicExtraAttack = json.get( jCombat, "magicExtraAttack" ) ]
[H, IF( !isNumber( tMagicExtraAttack ) ): tMagicExtraAttack = 0 ]

[H: rangeMod = if( rangeIncrement == 0, if( tPointBlankShot && isPointBlank, 1, 0 ), -2 * ( rangeIncrement ) ) ]

[H: FAN = max( 1, floor((BAB - 1) / 5) + 1 ) ]
[H: tHaste = if((Primary == 1) && (state.Haste || tMagicExtraAttack == 1 ), 1, 0)]
[H: isFlurryRapid = if( flurryRapid <= 0 && Manufactured == 1, 1, 0 ) ]

[H: MultAtkMP = if(Manufactured == 1, -6 + (tTwoWeaponFighting * 2), 0)]
[H: MultAtkM = if(Manufactured == 1, -10 + (tTwoWeaponFighting * 6), -5 + (tMultiAttack * 3))]

[H: temp1 = ""]
[H: temp2 = ""]
[H: temp3 = ""]
[H: temp4 = ""]
[H: temp5 = ""]
[H: atkDecay = if((Primary == 1 || ( Primary == 2 && ( tImprovedTwoWeaponFighting || tGreaterTwoWeaponFighting))) && (Manufactured == 1) && fullRound, 1, 0)]
[H: numAtk = if(atkDecay && fullRound, FAN + tHaste + isFlurryRapid, if( !fullRound, 1, Quantity + tHaste + isFlurryRapid ) )]
[H, IF( Primary == 2 && atkDecay ): numAtk = min( FAN, if( tGreaterTwoWeaponFighting, 3, 2 ) ) ]
[H: atkMult = if(OHLight == 2, 0, If(Primary == 1, min(0, max(MultAtkMP, MultAtkMP+(OHLight*2))), min(0, max(MultAtkM, MultAtkM+(OHLight*2)))))]
[H: atkMult = if( fullRound, atkMult, 0 ) ]
[H: atkStatB = if(Ranged == 1, DexB, if(tWeaponFinesse == 1 && Finesse == 1, max(StrB, DexB), StrB))]
[H: dmgStatB = min(DmgBonusCap, if(TwoHanded == 1, Str2hB + if( Ranged == 1, 0, floor(paDMG*pa2H)), if(Primary == 2,floor(StrSecB + if( Ranged == 1, 0,(paDMG*paOffhand))),StrB + if( Ranged == 1, 0, paDMG))))]
[H, C(numAtk, ""): eval("result1" + roll.count + "= 1d20")]
[H, C(numAtk, ""): eval("result1c" + roll.count + "= 1d20")]
[H, C(numAtk, ""): eval("damage1" + roll.count + "= " + Damage)]
[H, C(numAtk, ""): eval("damage1c" + roll.count + "= " + Damage)]
[H, C(numAtk, ""): eval("damage2c" + roll.count + "= " + Damage)]
[H, C(numAtk, ""): eval("damage3c" + roll.count + "= " + Damage)]

[H, C(numAtk, ""): temp1 = temp1
   + eval("eval('result1' + roll.count) + BAB -(atkDecay*5*max(0,(roll.count - if(tHaste && fullRound,1,0) - if(isFlurryRapid && fullRound, 1, 0)))) + atkMult + SizeM + atkStatB + eval('0 + ' + AtkBonus) + MiscATK + tempATK + if( Ranged, rangeMod + fireIntoMelee, 0 ) + if( isflurryRapid && fullRound, flurryRapid, 0 ) + if( system == 'Pathfinder', favEnemy, 0 ) + higherGround + ( flanking * 2 )")
   + if(tHaste && fullRound && roll.count == 0," <i><font color='red'>(Haste)</font></i>","")
   + if(isFlurryRapid && fullRound && ((tHaste && roll.count == 1) || (!tHaste && roll.count == 0)), if( Ranged, " <i><font color=black>(Rapid Shot)</font></i>", " <i><font color=black>(Flurry of Blows)</font></i>" ), "")
   + if(numAtk != roll.count + 1, ",&nbsp;", "")
]
[H, C(numAtk, ""): temp2 = temp2 + if( AtkBonus != "*" && eval("result1" + roll.count) >= CritRange,
   "  <i>. . .  Critical Check " + if( numAtk > 0, "(swing# " + (roll.count + 1) + ": " + eval("eval('result1c' + roll.count)+BAB-(atkDecay*5*max(0,(roll.count - if(tHaste && fullRound,1,0) - if(isFlurryRapid && fullRound, 1, 0))))+atkMult+SizeM+atkStatB+ eval('0 + ' + AtkBonus) +MiscATK + if( Ranged, rangeMod + fireIntoMelee, 0 ) + if( isflurryRapid && fullRound, flurryRapid, 0 ) + if( system == 'Pathfinder', favEnemy, 0 ) + higherGround + ( flanking * 2 )") + ") ", "") + "</i>",
   if(eval("result1" + roll.count) == 1, "  <i>. . .  FUMBLE! " + if(numAtk > 1, "(swing# " + (roll.count + 1) + ") ", "") + "</i>", "")))
]
 
[H, C(numAtk, ""): temp3 = temp3
   + eval("max(1, eval('damage1' + roll.count) + dmgStatB + MiscDMG + tempDMG + if( Ranged, max( 0, rangeMod ) + if( system == 'Pathfinder', paDMG, 0 ), 0 ))")
   + if( DmgExtra == "0d6" || DmgExtra == "" || DmgExtra == "0", "", " + " + eval("0 + " + DmgExtra) + "&nbsp;<i>" + DmgExtraName + "</i>")
   + if( favEnemy > 0, " + " + favEnemy + "&nbsp;<font size=2>Favored Enemy</font>", "" )
   + if( isSneak && ( ( Ranged && isPointBlank ) || !Ranged ), " + " + eval( "" + sneak ) + "&nbsp;<font size=2>Sneak (" + sneak + ")</font>", "" )
   + if( numAtk != roll.count+1, ",&nbsp;", "")
]
[H, C(numAtk, ""): temp4 = temp4
   + if( AtkBonus != "*" && eval("result1" + roll.count) >= CritRange, "  <i>. . .  Critical Damage " + if(numAtk > 1, "(swing# " + (roll.count + 1) + ") ", "") + "</i> If successful add "
   + eval("eval(Damage) + dmgStatB + MiscDMG + if( Ranged, max( 0, rangeMod ) + if( system == 'Pathfinder', paDMG, 0 ), 0 )")
   + if(CritMult > 2,  " + " + eval("eval(Damage) + dmgStatB + MiscDMG"),"") 
   + if(CritMult > 3,  " + " + eval("eval(Damage) + dmgStatB + MiscDMG"),"") 
   + if(DmgExtraCrit == "0d10" || DmgExtraCrit == "" || DmgExtraCrit == "0", "", " + " + eval("0 + " + DmgExtraCrit) * (CritMult - 1) + "&nbsp;<i>" + DmgExtraName + "</i>")+" point(s) of damage"
, "")]
[H, C(1, ""): temp5 = temp5
   + if( tManyShot, "  <b>Many Shot DMG: </b>"
   + eval("eval(Damage) + dmgStatB + MiscDMG + tempDMG + if( Ranged, max( 0, rangeMod ) + if( system == 'Pathfinder', paDMG, 0 ), 0 )")
   + if( favEnemy > 0, " + " + favEnemy + "&nbsp;<font size=2>Favored Enemy</font>", "" )
, "")]

[H: AtkString1 = "<b>HIT:</b> "+ if(AtkBonus == "*","",temp1 + temp2 + " ") + "  (<i> " + Name + " </i>)<br/><b>DMG:</b>  " + temp3 + temp4 + "<br />" + temp5]

[H: atkList = ""]
[H,C(numAtk, ""): atkList = atkList + if(roll.count != 0, ",", "") + eval("result1" + roll.count)]
[H: critList = ""]
[H,C(numAtk, ""): critList = critList + if(roll.count != 0, ",", "") + eval("result1c" + roll.count)]
[H: atkList = "<font size= 3>ATK Rolls:<b> " + atkList + " </b>BAB:<b> " + BAB + " </b>MultiAtk:<b> " + atkMult + " </b>Size:<b> " + SizeM + " </b>StatBonus:<b> " + atkStatB + " </b>AtkBonus:<b> " + AtkBonus + " </b>CritThreat:<b> " + CritRange + " </b>Misc:<b> " + MiscATK + " </b>Temp:<b> " + tempATK + if( Ranged, " </b>RangeMod:<b> " + rangeMod + if( fireIntoMelee != 0, " </b>ShootIntoMelee:<b> " + fireIntoMelee, ""), "" ) + if( isFlurryRapid && fullRound, " </b>" + if(Ranged, "Rapid Shot", "Flurry of Blows") + ":<b> " + flurryRapid, "" ) + if( flanking, " </b>Flanking:<b> 2", "" ) + if( higherGround, " </b>Higher Ground:<b> 1", "" ) + if( system == 'Pathfinder' && favEnemy > 0, " </b>FavoredEnemy:<b> " + favEnemy, "" ) + "</b></font><br />"]
[H: atkList = atkList + "<font size= 3>CritRolls:<b> " + critList + "</b></font><br />" ]

[H: dmgList = ""]
[H,C(numAtk, ""): dmgList = dmgList + if(roll.count != 0, ",", "") + eval("damage1" + roll.count)]
[H: dmgList = "<font size= 3>DMG Rolls:<b> " + dmgList + " </b>DamageDice:<b> " + Damage
   + " </b>StatBonus" + if( Ranged != 1 && paON, '<i><font color="red">+PowerAttack</font></i>', "" ) + ":<b> " + dmgStatB
   + if( Ranged && paON && system == "Pathfinder", ' <i><font color="red">DeadlyAim</font>:</i> ' + paDMG, "" )
   + " </b>MiscDMG:<b> " + MiscDMG + " </b>TempDMG:<b> " + tempDMG
   + if(DmgExtra == "0d6" || DmgExtra == "" || DmgExtra == "0", "", " </b>ExtraDMG:<b> " + DmgExtra + " </b>ExtraDMGType: <b>" + DmgExtraName )
   + if(DmgExtraCrit == "0d10" || DmgExtraCrit == "" || DmgExtraCrit == "0", "", " </b>CritDMG:<b> " + DmgExtraCrit )
   + " </b>CritMultiplier:<b> " + CritMult
   + if( Ranged, " </b>RangeMod:<b> " + max( 0, rangeMod ), "" )
   + "</b></font><br />"
]

[H: targString = "" ]
[H: targString = if( target1Name == "", "", "<b>Primary Target: </b>" + target1Name ) ]
[H: targString = targString + if( target2Name == "", "", " -- <b>Secondary Target: </b>" + target2Name ) ]
[H: targString = targString + if( target1Name == "", "", "<br>" ) ]

[H, IF( target1ID != "" ), TOKEN( target1ID ): targ1Image = '<img src="' + getTokenImage() + '" width="50" height="50">'; targ1Image = "" ]
[H, IF( target2ID != "" ), TOKEN( target2ID ): targ2Image = '<img src="' + getTokenImage() + '" width="50" height="50">'; targ2Image = "" ]

[H: output = if( Primary != 0, targString + AtkString1, "" ) ]
[H: outputwTip = "<span title='<html>" + targ1Image +  targ2Image + if(  target1ID != "" || target2ID != "" , "<br> ", " " ) + atkList + " " + dmgList + " </html>'>" + output + "</span>"]

[H, MACRO( "subGetAllOtherPCPlayers@this" ): "" ]
[H: allOtherPC = macro.return ]


[IF( flagSecret && isGM() ), CODE:
  {
      [R, G: outputwTip ]
  };{}
]
[IF( flagSecret && !isGM() ), CODE: {
      [R, S, G: outputwTip ]
    };{}
]
[IF( !flagSecret ), CODE: {
      [R, W( allOtherPC ): output ]
      [R, S, G: outputwTip ]
   };{}
]


-Avotas


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 11622
Location: Tampa, FL
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sun Apr 03, 2011 2:36 am 
Avotas wrote:
Sample Output:

HIT: 16, 23 . . . Critical Check (swing# 2: 19) ( Lance +1 )
DMG: 7, 4 . . . Critical Damage (swing# 2) If successful add 6 point(s) of damage

Hm, that seems like a good way to handle it.

I've been wanting to clean up the attack output but I'm not sure what I want to see. I like the current tooltip approach because it hides the details when I don't care about them. But I think the part NOT in the tooltips could be cleaned up somehow, I just don't know how. Maybe a two-row table with hit rolls on the first row and damage rolls on the second? And if the user selected a target on the tabs then maybe a determination of which ones hit and a total amount of damage done?

I'm curious to see what aliasmask will come up with though, so I don't want to spend too much time on this right now. Besides, I have a build to prep. ;)

_________________
Interested in Time Magazine's Best Invention of 2008 Unix-powered laptop? No crashes or lockups. In fact, that series of articles has two such machines. The other is a Dell netbook. :)


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 5305
Location: Bay Area
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sun Apr 03, 2011 3:39 am 
Azhrei wrote:
I'm curious to see what aliasmask will come up with though, so I don't want to spend too much time on this right now. Besides, I have a build to prep. ;)

Lol. Yeah, I'm working on Lindsay's framework getting it in to a state I like. I'm still organizing and consolidating some of the macros. Here's an example of the button reorganization:

Attachment:
example.jpg
example.jpg [ 120.58 KiB | Viewed 510 times ]


I've done some recent fixes and modifications to Channel Energy and Stat Damage. I'm also working on Wrathgon's spell manager making a couple of tweaks and fixes and trying to integrate some of my changes from a previous version for both the core lib and wrathgon's magic token.

Yeah, I've done some work with the attack macro but I may rethink some stuff just to get it working in a short period of time. I just looked up some of my brainstorming notes and what do you think about this:

Quote:
Holy Avenger: Primary, Haste, Smite, Power Attack
HIT #1: 40 (CRIT:36) DMG: 36 (CRIT:+16+11)
HIT #2: 28 DMG: 25

The links would apply damage to selected token and the HIT and DMG will be aligned and there will be detail info in the tooltips. The format may change slightly, but this is the general idea.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Fri Feb 27, 2009 4:01 pm
Posts: 754
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sun Apr 03, 2011 8:59 am 
I think they look great guys. In fact, I implemented Avotas change last night for this afternoon's game. Even after doing this for well over a year I have to slow down and read the attack output carefully.

Aliasmak. all of that looks awesome. Can't wait to see it when you're done. Though when you provide code, I do implement the smaller changes. I'd like to see the alterations to channel energy.

_________________
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Fri Feb 27, 2009 4:01 pm
Posts: 754
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sun Apr 03, 2011 9:03 am 
aliasmask wrote:
Well, whatever is happening is happening here:
Code:
   [IF( !isNumber( v ) && ( activeTM || active ) ), CODE: {
      [ jPMS = json.get( jPTM, ms ) ]
      [ tjPMods = json.get( jPMS, "mods" ) ]
      [ v = json.get( json.get( tjPMods, param ), "v" ) ]
      [IF( !isNumber( v ) ): v = 0 ]
     
      [IF( ms == modSet ): jPTM = json.set( jPTM, ms, json.set( jPMS, "f", 0 ) ) ]

      [IF( ms == modSet ): PrivateJSON = json.set( PrivateJSON, "CustomModSetValues", jPTM ) ]
   }]

Basically, before going in to if, v is a formula "-abs(Strength_Damage)" and when the mod is active it grabs the existing value of v in the mod (-2) and overwrites the formula.

What do you suggest I do so the value passed is the value set in the mod? I was wondering why you called the subModToggle twice. It just seems faster if the above can be corrected.

Anyway, this is my rewrite of StatDamage:
Code:
@@ @StatDamage
@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=13;color=red;playerEditable=false;applyToSelected=true;group=Utility Mods;tooltip=Assign Stat Damage mods;minWidth=
[H: tToken = currentToken() ]
[H: statMods = json.set("{}","damage.StrMod","Strength Damage","damage.DexMod","Dexterity Damage","damage.ConMod","Constitution Damage","damage.IntMod","Intelligence Damage","damage.WisMod","Wisdom Damage","damage.ChaMod","Charisma Damage")]
[H: aTMS = json.get( PrivateJSON, "ActiveTempModSets" ) ]
[H, IF( json.type( aTMS ) == "UNKNOWN" ), CODE: {
   [H: PrivateJSON = json.set( PrivateJSON, "ActiveTempModSets", "[]" ) ]
   [H: aTMS = "[]" ]
};{}]
[H: jPTM = json.get( PrivateJSON, "CustomModSetValues" ) ]
[H: jMMFields = json.fields( statMods, "json" ) ]
[H: inputStr = "" ]
[H: modString = "%{p} | %{v} | %{n} | %{t} | %{o}" ]
[H: activeCurrent = "{}"]

[H, FOREACH( p, jMMFields ), CODE: {
   [H: modName = json.get( statMods, p ) ]
   [H: propName = listGet(p,1,".")]
   [H, if( json.contains( aTMS, modName )): v = abs(json.get(json.get( json.get( json.get( jPTM, modName ), "mods" ), propName) , "v" )); v = 0  ]
   [H: n = "<html><b>" + modName + "</b></html>" ]
   [H: t = "TEXT" ]
   [H: o = "WIDTH=3" ]
   [H: inputStr = listAppend( inputStr, strformat( modString ), "##" ) ]
   [H: activeCurrent = json.set(activeCurrent,p,v)]
}]

[H: abort(input("info|<html></i>Stat Damage</i>: Set to 0 to clear, or enter an integer for total damage.</html>||LABEL|SPAN=TRUE",inputStr))]
[H: output = "" ]

[H, FOREACH( p, activeCurrent), CODE: {
   [H: modName = json.get(statMods,p)]
   [H: propName = replace(modName," ","_")]
   [H: oldValue = json.get(activeCurrent,p)]
   [H: newValue = eval(p)]
   [H, if(oldValue != newValue && oldValue != 0 && newValue != 0), code: {
      [MACRO( "subModToggle@this" ): json.set( "{}", "tokenID", tToken, "setID", modName, "setType", 0) ]
      [MACRO( "subModToggle@this" ): json.set( "{}", "tokenID", tToken, "setID", modName, "setType", 0, "presetVars", json.set("{}" ,propName,newValue)) ]
   }]
   [H, if(oldValue != newValue && oldValue == 0), code: {
      [MACRO( "subModToggle@this" ): json.set( "{}", "tokenID", tToken, "setID", modName, "setType", 0, "presetVars", json.set("{}" ,propName,newValue)) ]
      [H: output = output + macro.return ]
   }]
   [H, if(oldValue != newValue && newValue == 0), code: {
      [MACRO( "subModToggle@this" ): json.set( "{}", "tokenID", tToken, "setID", modName, "setType", 0) ]
      [H: output = output + macro.return ]
   }]
}]
[R, S, G: output ]

!!


Here is the old code for comparison:
Code:
@@ @StatDamage
@PROPS@ fontColor=black;autoExecute=true;fontSize=1.00em;sortBy=13;color=red;playerEditable=false;applyToSelected=true;group=Utility Mods;tooltip=Assign Stat Damage mods;minWidth=
[H: tToken = currentToken() ]

[H: statMods = '{"Strength Damage":{"Strength Damage":"Strength_Damage"}, "Dexterity Damage":{"Dexterity Damage":"Dexterity_Damage"}, "Constitution Damage":{"Constitution Damage":"Constitution_Damage"}, "Intelligence Damage":{"Intelligence Damage":"Intelligence_Damage"}, "Wisdom Damage":{"Wisdom Damage":"Wisdom_Damage"}, "Charisma Damage":{"Charisma Damage":"Charisma_Damage"}}' ]

[H: aTMS = json.get( PrivateJSON, "ActiveTempModSets" ) ]
[H, IF( json.type( aTMS ) == "UNKNOWN" ), CODE: {
   [ PrivateJSON = json.set( PrivateJSON, "ActiveTempModSets", "[]" ) ]
   [ aTMS = "[]" ]
};{}]
[H: jPTM = json.get( PrivateJSON, "CustomModSetValues" ) ]

[H: jMMFields = json.fields( statMods, "json" ) ]
[H: inMods = "" ]
[H: modString = "%{p} | %{v} | %{n} | %{t} | %{o}" ]

[H, FOREACH( m, jMMFields ), CODE: {
   [ active = if( json.contains( aTMS, m ), 1, 0 ) ]
   [ jMM = json.get( statMods, m ) ]

   [ p = replace( replace( m, " ", "_" ), "/", "." ) ]
   [IF( active ): v = json.get( json.get( json.get( json.get( jPTM, m ), "mods" ), "globalMod" ), "v" ); v = 0  ]
   [ n = "<html><b>" + m + "</b></html>" ]
   [ t = "TEXT" ]
   [ o = "WIDTH=3" ]
   [ inMods = listAppend( inMods, strformat( modString ), "##" ) ]
}]

[H: cancel = input(
   "info|<html></i>Stat Damage</i>: Set to 0 to clear, or enter an integer for total damage.</html>||LABEL|SPAN=TRUE",
   inMods
)]
[H: abort(cancel)]

[H: output = "" ]

[H, FOREACH( m, jMMFields, "" ), CODE: {
   [H: changed = 0 ]
   [H: disable = 1 ]
   [H: active = if( json.contains( aTMS, m ), 1, 0 ) ]
   [H: jMM = json.get( statMods, m ) ]
   [H: presetVars = "" ]

   [H, FOREACH( n, json.fields( jMM, "json" ) ), CODE: {
      [ isJObj = if( json.type( jMM ) == "OBJECT", 1, 0 ) ]
      [IF( isJObj && active ): v = json.get( json.get( json.get( json.get( jPTM, m ), "mods" ), "globalMod" ), "v" ); v = 0  ]
      [IF( isJObj ): tmv = eval( "" + json.get( jMM, n ) ); tmv = eval( "" + replace( replace( m, " ", "_" ), "/", "." ) ) ]     
     
      [IF( isJObj ): disable = if( tmv != 0, 0, disable ); disable = 1 ]
      [IF( isJObj ): changed = if( v != tmv, 1, changed ); changed = if( active != tmv, 1, changed ) ]
      [IF( changed && isJObj ): presetVars = json.set( presetVars, json.get( jMM, n ), tmv ); "" ]
   }]

   
   [IF( changed && active ), CODE: {
      [MACRO( "subModToggle@this" ): json.set( "{}", "tokenID", tToken, "setID", m, "setType", 0 ) ]
      [IF( disable ): output = output + macro.return; "" ]
   };{}]
   [IF( changed && ( !disable || !active ) ), CODE: {
      [MACRO( "subModToggle@this" ): json.set( "{}", "tokenID", tToken, "setID", m, "setType", 0, "presetVars", presetVars ) ]
      [ output = output + macro.return ]
   };{}]
}]
[R, S, G: output ]

!!


The error I was getting was because when the old value was trying to be retrieved, it was using globalMod, but the value was held in StrMod, DexMod or whatever stat was being effected.

PS. I know this works for my 3.5 campaign, but I have no idea if pathfinder values are different, for example, with the sysvars.



Sorry to copy so much of the previous message. I just wanted to comment that the bug wasn't repeatable for me on the Pathfinder side. Seemed to work fine, and I applied multiple stat damages and removed them, or just increased them on the same token with no problems.

_________________
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 11622
Location: Tampa, FL
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sun Apr 03, 2011 11:21 am 
aliasmask wrote:
Yeah, I've done some work with the attack macro but I may rethink some stuff just to get it working in a short period of time. I just looked up some of my brainstorming notes and what do you think about this:

Quote:
Holy Avenger: Primary, Haste, Smite, Power Attack
HIT #1: 40 (CRIT:36) DMG: 36 (CRIT:+16+11)
HIT #2: 28 DMG: 25

The links would apply damage to selected token and the HIT and DMG will be aligned and there will be detail info in the tooltips. The format may change slightly, but this is the general idea.

I like the idea of using links to apply the damage. Of course, they would need to simply fill in the fields without actually applying the data for those times when I need to modify them (because some BBEG has a feature that the FW doesn't implement).

I'm going to try to find some time to redo the statblock2token macro. I've got a regex that covers the first part of what I want to do as a proof-of-concept and it looks promising. My big thing is the weapons and skills. I've noticed that unused weapon slots are filled with "slam" attacks and I want that removed (that's easy to do), but the bigger issue is that skill names aren't handled properly for subskills or skills with more than one word in their name. We'll see how far I get with it. :|

_________________
Interested in Time Magazine's Best Invention of 2008 Unix-powered laptop? No crashes or lockups. In fact, that series of articles has two such machines. The other is a Dell netbook. :)


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 5305
Location: Bay Area
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sun Apr 03, 2011 11:34 am 
Paradox wrote:
Sorry to copy so much of the previous message. I just wanted to comment that the bug wasn't repeatable for me on the Pathfinder side. Seemed to work fine, and I applied multiple stat damages and removed them, or just increased them on the same token with no problems.

Then that may be due to the difference in sysvars template used for pathfinder over 3.5, because in 3.5 the variable was definitely saved in StrMod:{"v":-2} type format and the code said "globalmod". So, I suspect my code will not be compatible with Pathfinder code. I'll have to check that out.

As for the ChannelEnergy, I don't play pathfinder and there is a pathfinder specific TurnUndeadPF macro which I did not change. I don't even know if there is a need for it to tell you the truth. Does pathfinder have feats that use multiple channels at once? Anyway, you can find the 3.5 change here:

http://forums.rptools.net/viewtopic.php?f=53&t=18371

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 5305
Location: Bay Area
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sun Apr 03, 2011 12:42 pm 
I just verified my code is compatible with the pathfinder code (for Stat Damage) and that the templates are different. Actually, using globalMod is easier to implement, but it only adds one line to my code. The original code was fine, it just boiled down to the mod for 3.5 not being set up correctly.

There is also a really minor fix relating to 3.5 skills and pathfinder skills and the "subRecalcMovement" macro. The error I mentioned earlier was that tskId was not defined. That's because the skills are different(?) and tskID is never set during that macro.

Just putting near the top [H: tskID = 0] fixes that compatibility problem when the skills aren't set up for that system.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 5305
Location: Bay Area
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sun Apr 03, 2011 4:12 pm 
Here's a new state for Stat Damage:

Attachment:
Stat Damage.png
Stat Damage.png [ 4.7 KiB | Viewed 485 times ]

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Fri Mar 28, 2008 11:30 pm
Posts: 1586
Location: Layfayette Hill, PA
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Thu Apr 07, 2011 8:35 pm 
Threeshades wrote:
EDIT 2
Here is something I noticed. The framework doesn't seem to be able to handle the sizemod of a colossal creature.
Here is what it says if i try to open either the skill editor or the character sheet:
Quote:
java.lang.IndexOutOfBoundsException: Index: 8, Size: 8 Fehler beim Ausführen des Ausdrucks skSize = json.get(json.get(cSkill, "sizemod"), sizeID).

That's what it says in German anyhow, i can't seem to change the language to english anymore unfortunately. But I think its easy enough to understand the german part translates to
"error when executing the expression skSize..."


I am going to guess you are using a Hex grid map. The token sizes in Maptools are hard coded and a known issue area. My framework (because I was unaware of this issue at the time) is based on the square grid.

Square sizes =
Native Size, Fine, Diminutive, Tiny, Small, Medium, Large, Huge, Gargantuan, Colossal
Hex sizes = Native Size, 1/6, 1/4, 1/3, 1/2, 2/3, Medium, Large, Huge, Humongous

Those are hard coded sizes. I have considered making a translation routine that supports the framework on different grids, but for now if you want to use Hex you need to limit your tokens to sizes Medium ... Huge.


EDIT: No wait. I see what you are talking about. I will fix that!

Follow up. Well silly me put all 9 sizes in the array for the skills that have size modifiers, but the huge majority of skills do not and those arrays only have 8 elements, so the code barfs. Changing the sizemod array to [0,0,0,0,0,0,0,0,0] resolves the issue.

_________________
Whisper Frame, Map Move-To Points, Handouts | D&D3.5 / Pathfinder Framework


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 5305
Location: Bay Area
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Thu Apr 07, 2011 10:37 pm 
lmarkus001 wrote:
EDIT: No wait. I see what you are talking about. I will fix that!

Follow up. Well silly me put all 9 sizes in the array for the skills that have size modifiers, but the huge majority of skills do not and those arrays only have 8 elements, so the code barfs. Changing the sizemod array to [0,0,0,0,0,0,0,0,0] resolves the issue.

I posted a fix to the property here:

http://forums.rptools.net/viewtopic.php?f=53&t=17706&p=195065&sid=049be757f7972f5e171c6465ba55ceac#p194608

It just changes all the arrays to 9 items.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Fri Mar 28, 2008 11:30 pm
Posts: 1586
Location: Layfayette Hill, PA
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Fri Apr 08, 2011 2:28 pm 
Paradox wrote:
aliasmask wrote:
Well, whatever is happening is happening here:
...

The error I was getting was because when the old value was trying to be retrieved, it was using globalMod, but the value was held in StrMod, DexMod or whatever stat was being effected.

PS. I know this works for my 3.5 campaign, but I have no idea if pathfinder values are different, for example, with the sysvars.



Sorry to copy so much of the previous message. I just wanted to comment that the bug wasn't repeatable for me on the Pathfinder side. Seemed to work fine, and I applied multiple stat damages and removed them, or just increased them on the same token with no problems.


Hummm... yeah I guess I had corrected this for PF but forgot to propagate the correction to 3.5. Applying patch as I type...

_________________
Whisper Frame, Map Move-To Points, Handouts | D&D3.5 / Pathfinder Framework


Top
 Profile  
 
User avatar  Offline
Kobold
 
Joined: Tue Mar 29, 2011 7:27 am
Posts: 10
 Post subject: Re: [D&D3.5 + Pathfinder] MT1.3b82 Campaign Macros r01
PostPosted: Sat Apr 09, 2011 3:36 pm 
aliasmask wrote:
lmarkus001 wrote:
EDIT: No wait. I see what you are talking about. I will fix that!

Follow up. Well silly me put all 9 sizes in the array for the skills that have size modifiers, but the huge majority of skills do not and those arrays only have 8 elements, so the code barfs. Changing the sizemod array to [0,0,0,0,0,0,0,0,0] resolves the issue.

I posted a fix to the property here:

http://forums.rptools.net/viewtopic.php?f=53&t=17706&p=195065&sid=049be757f7972f5e171c6465ba55ceac#p194608

It just changes all the arrays to 9 items.

Thanks, that did it :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 174 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 12  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





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

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman