RPTools.net

Discussion and Support

Skip to content

It is currently Fri May 26, 2017 9:51 am 




Forum rules


PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)



Reply to topic  [ 6 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Giant
 
Joined: Tue Dec 16, 2008 9:09 am
Posts: 145
Location: Torino (Italy)
 Post subject: skill macro
PostPosted: Sat Jan 24, 2009 9:26 am 
Ok here is an hack of the skill macro from pathfinder campaign.
My goal is to add the list of DC for the various skills for usually do not like to search through pages for the DC of a particular action and have no mind to remember them.
Now after having asked you for the skill another dialog appear to ask you for which balance skill (the example is for Balance, but will add more actions for other skills) are you using.
For now it print the DC for the chosen action, but I'm still working on some other stuff.
I'd like to keep the data outside the macro, but how could it be done?
Note that this is to be used with the PC imported from PCgen since it ask for a number in the StatBonus.
Here is the first draft:
Code:
[H: action1Balance = "desc=7-12 inches wide;dc=10;critfail=0;critsuc=0"]
[H: action2Balance = "desc=2-6 inches wide;dc=15;critfail=0;critsuc=0"]
[H: action3Balance = "desc=Less than 2 inches wide;dc=20;critfail=0;critsuc=0"]
[H: action4Balance = "desc=Uneven flagstone;dc=10;critfail=0;critsuc=0"]
[H: action5Balance = "desc=Hewn stone floor;dc=10;critfail=0;critsuc=0"]
[H: action6Balance = "desc=Sloped or angled floor;dc=10;critfail=0;critsuc=0"]

[H: skillAction1= ";"]
[H: skillAction1 = setStrProp(skillAction1, "1", encode(action1Balance))]
[H: skillAction1 = setStrProp(skillAction1, "2", encode(action2Balance))]
[H: skillAction1 = setStrProp(skillAction1, "3", encode(action3Balance))]
[H: skillAction1 = setStrProp(skillAction1, "4", encode(action4Balance))]
[H: skillAction1 = setStrProp(skillAction1, "5", encode(action5Balance))]
[H: skillAction1 = setStrProp(skillAction1, "6", encode(action6Balance))]
[H: skillActions = ";"]
[H: skillActions = setStrProp(skillAction1, "Balance", encode(skillAction1))]

[H: numSkills = countStrProp(Skills)]
[H: skillList = ""]
[H, C(numskills, ""): skillList = skillList + indexKeyStrProp(Skills, roll.count) + ", "]
[H: secret = getStrProp(Private, "SecretSkill")]
[H: secret = if(secret == "", 0, secret)]

[H: success = input(
   "tempSkill | " + skillList + " | Select a skill | LIST | VALUE=STRING SELECT=" + listFind(skillList, getStrProp(Private, "LastSkill")),
   "tempBonus | 0 | Temporary bonus",
   "secret|Public, Secret|Secret?|RADIO|ORIENT=H SELECT=" + secret
)]
[H: abort(success)]

[H: tSkill = getStrProp(Skills, tempSkill)]
[H: tStatB = getStrProp(SkillStat, tempSkill)]
[H: tACP = ArmorCheckPenalty * getStrProp(SkillArmor, tempSkill)]

[H: tActions = getStrProp(skillActions,tempSkill)]
[H: tActions = decode(tActions)]
[H: numActions = countStrProp(tActions)]
[H: actionList = ""]

[COUNT(numActions, ""), CODE: {
  [H: anAction = decode(indexValueStrProp(tActions, roll.count))]
  [H: actionList = actionList + getStrProp(anAction,"desc") + ", "]
}]

[H: success1 = input(
   "tempAction | " + actionList + " | Select an action for " + tempSkill + " | LIST | VALUE=NUMBER"
)]
[H: abort(success1)]

[H: theAction = decode(indexValueStrProp(tActions, tempAction))]
[H: actionDesc = getStrProp(theAction,"desc")]
[H: actionDC = getStrProp(theAction,"dc")]

[H: Private = setStrProp(Private, "LastSkill", tempSkill)]
[H: Private = setStrProp(Private, "SecretSkill", secret)]

[H: dieroll = 1d20]
[H: sCheck = dieroll + tSkill + tStatB + tACP + SkillMisc + tempBonus]
[IF(secret == 1 && isGM()), CODE:
  {
    [H: success = input(
       "junk|" + sCheck + "|" + tempSkill + "Check|LABEL",
       "junk2|DieRoll=" + dieroll + " Skill=" + tSkill + " StatBonus=" + tStatB +" ACP=" + tACP +" SkillMisc=" + SkillMisc +" temp=" + tempBonus +"|Details|LABEL"
    )]
    [H: abort(0)]
  };
  {
    <b> [R: tempSkill] Check: </b> [T(sCheck):  dieroll + tSkill + tStatB + tACP + SkillMisc + tempBonus]<br/>[R:actionDesc] (DC[R:actionDC])
  }
]


Top
 Profile  
 
User avatar  Offline
Giant
 
Joined: Tue Dec 16, 2008 9:09 am
Posts: 145
Location: Torino (Italy)
 Post subject: Re: skill macro
PostPosted: Sat Jan 24, 2009 3:31 pm 
OK here is an update of the macro.
It check actions for skill, check for critical faliure and critical success, and calculate time needed to use skill.
For now just two skill, but is possible to add all the actions for all the skill ... just need time :lol:
In any case any advie is well accepted.
Luca
Code:
[H: action1Balance = "desc=7-12 inches wide;dc=10;critfail=5;critsuc=0;time=1d4;failT=you cannot move for 1 round;critfT=you fall"]
[H: action2Balance = "desc=2-6 inches wide;dc=15;critfail=5;critsuc=0;time=1d4;failT=you cannot move for 1 round;critfT=you fall"]
[H: action3Balance = "desc=Less than 2 inches wide;dc=20;critfail=5;critsuc=0;time=1d4;failT=you cannot move for 1 round;critfT=you fall"]
[H: action4Balance = "desc=Uneven flagstone;dc=10;critfail=5;critsuc=0;time=1d4;failT=you cannot move for 1 round;critfT=you fall"]
[H: action5Balance = "desc=Hewn stone floor;dc=10;critfail=5;critsuc=0;time=1d4;failT=you cannot move for 1 round;critfT=you fall"]
[H: action6Balance = "desc=Sloped or angled floor;dc=10;critfail=5;critsuc=0;time=1d4;failT=you cannot move for 1 round;critfT=you fall"]
[H: skillAction1= ";"]
[H: skillAction1 = setStrProp(skillAction1, "1", encode(action1Balance))]
[H: skillAction1 = setStrProp(skillAction1, "2", encode(action2Balance))]
[H: skillAction1 = setStrProp(skillAction1, "3", encode(action3Balance))]
[H: skillAction1 = setStrProp(skillAction1, "4", encode(action4Balance))]
[H: skillAction1 = setStrProp(skillAction1, "5", encode(action5Balance))]
[H: skillAction1 = setStrProp(skillAction1, "6", encode(action6Balance))]

[H: action1DD = "desc=Simple;dc=10;critfail=5;critsuc=10;time=1;failT=you can try again;critfT=Activates;critsT=you can bypass without disarm"]
[H: action2DD = "desc=Triky;dc=15;critfail=5;critsuc=10;time=1d4;failT=you can try again;critfT=Activates;critsT=you can bypass without disarm"]
[H: action3DD = "desc=Difficult;dc=20;critfail=5;critsuc=10;time=2d4;failT=you can try again;critfT=Activates;critsT=you can bypass without disarm"]
[H: action4DD = "desc=Wicked;dc=25;critfail=5;critsuc=10;time=2d4;failT=you can try again;critfT=Activates;critsT=you can bypass without disarm"]
[H: skillAction2= ";"]
[H: skillAction2 = setStrProp(skillAction2, "1", encode(action1DD))]
[H: skillAction2 = setStrProp(skillAction2, "2", encode(action2DD))]
[H: skillAction2 = setStrProp(skillAction2, "3", encode(action3DD))]
[H: skillAction2 = setStrProp(skillAction2, "4", encode(action4DD))]

[H: skillActions= ";"]
[H: skillActions = setStrProp(skillActions, "Balance", encode(skillAction1))]
[H: skillActions = setStrProp(skillActions, "DisableDevice", encode(skillAction2))]

[H: numSkills = countStrProp(Skills)]
[H: skillList = ""]
[H, C(numskills, ""): skillList = skillList + indexKeyStrProp(Skills, roll.count) + ", "]
[H: secret = getStrProp(Private, "SecretSkill")]
[H: secret = if(secret == "", 0, secret)]

[H: success = input(
   "tempSkill | " + skillList + " | Select a skill | LIST | VALUE=STRING SELECT=" + listFind(skillList, getStrProp(Private, "LastSkill")),
   "tempBonus | 0 | Temporary bonus",
   "secret|Public, Secret|Secret?|RADIO|ORIENT=H SELECT=" + secret
)]
[H: abort(success)]

[H: tSkill = getStrProp(Skills, tempSkill)]
[H: tStatB = getStrProp(SkillStat, tempSkill)]
[H: tACP = ArmorCheckPenalty * getStrProp(SkillArmor, tempSkill)]

[H: tActions = getStrProp(skillActions,tempSkill)]
[H: tActions = decode(tActions)]
[H: numActions = countStrProp(tActions)]
[H: actionList = ""]

[COUNT(numActions, ""), CODE: {
  [H: anAction = decode(indexValueStrProp(tActions, roll.count))]
  [H: actionList = actionList + getStrProp(anAction,"desc") + ", "]
}]

[H: success1 = input(
   "tempAction | " + actionList + " | Select an action for " + tempSkill + " | LIST | VALUE=NUMBER"
)]
[H: abort(success1)]

[H: theAction = decode(indexValueStrProp(tActions, tempAction))]
[H: actionDesc = getStrProp(theAction,"desc")]
[H: actionDC = getStrProp(theAction,"dc")]
[H: actionDCcf = getStrProp(theAction,"critfail")]
[H: actionDCcs = getStrProp(theAction,"critsuc")]
[H: actionTime = getStrProp(theAction,"time")]
[H: actionft = getStrProp(theAction,"failT")]
[H: actioncft = getStrProp(theAction,"critfT")]

[H: Private = setStrProp(Private, "LastSkill", tempSkill)]
[H: Private = setStrProp(Private, "SecretSkill", secret)]

[H: dieroll = 1d20]
[H: sCheck = dieroll + tSkill + tStatB + tACP + SkillMisc + tempBonus]
[H: resStr = ""]
[IF(sCheck>=actionDC), CODE:
{
  [IF(actionDCcs!=0 && sCheck>(actionDC+actionDCcs)),CODE:
  {
   [H:resStr ="High Success: It takes " +eval(actionTime)+" rounds"]
  };
  {
   [H:resStr ="Success: It takes " +eval(actionTime)+" rounds"]
  }
  ]
};
{
  [IF(actionDCcf!=0 && sCheck<(actionDC-actionDCcf)),CODE:
  {
   [H:resStr ="Critical Faliure: " +actioncft]
  };
  {
   [H:resStr="Faliure: " +actionft]
  }
  ]
}
]

[IF(secret == 1 && isGM()), CODE:
  {
    [H: success = input(
       "junk|" + sCheck + "|" + tempSkill + "Check|LABEL",
       "junk2|DieRoll=" + dieroll + " Skill=" + tSkill + " StatBonus=" + tStatB +" ACP=" + tACP +" SkillMisc=" + SkillMisc +" temp=" + tempBonus +"|Details|LABEL",
       "junk3|"+actionDesc+" (DC="+")"+"|Action|LABEL"
    )]
    [H: abort(0)]
  };
  {
    <b> [R: tempSkill] Check: </b> [T(sCheck):  dieroll + tSkill + tStatB + tACP + SkillMisc + tempBonus]<br/>[R:resStr]<br/>[R:actionDesc] (DC[R:actionDC])<br/>
  }
]


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12065
Location: Tampa, FL
 Post subject: Re: skill macro
PostPosted: Sat Jan 24, 2009 6:43 pm 
gioppo wrote:
OK here is an update of the macro.
It check actions for skill, check for critical faliure and critical success, and calculate time needed to use skill.

This is very cool and I appreciate you sharing the code, but... There are no critical successes or failures for skills. At least, not in the PF Beta nor the SRD.


Top
 Profile  
 
User avatar  Offline
Giant
 
Joined: Tue Dec 16, 2008 9:09 am
Posts: 145
Location: Torino (Italy)
 Post subject: Re: skill macro
PostPosted: Sun Jan 25, 2009 4:34 am 
not so sure.
Take for example Disable Device
If you roll 10 higher you manage to bypass without disarming the device
and if you fail by more than 5 you activat the device.
Not all have this behaviour and this is taken into account (if you set 0 to the crit props)
Luca


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 12065
Location: Tampa, FL
 Post subject: Re: skill macro
PostPosted: Sun Jan 25, 2009 11:38 am 
gioppo wrote:
If you roll 10 higher you manage to bypass without disarming the device
and if you fail by more than 5 you activat the device.
Not all have this behaviour and this is taken into account (if you set 0 to the crit props)
Luca

True. But those are not "critical successes or failures", those are just successes or failures. ;) The phrase "critical success" in the SRD, IIRC, means a "roll that always succeeds". The obvious cases being a 20 on an attack roll.


Top
 Profile  
 
User avatar  Offline
Giant
 
Joined: Tue Dec 16, 2008 9:09 am
Posts: 145
Location: Torino (Italy)
 Post subject: Re: skill macro
PostPosted: Sun Jan 25, 2009 12:56 pm 
I just needed something to distinguish simple faliure or success from something that is a bit higher faliure and success.
Since there is not a definition around we can invent something for our own we can say BIG :D
Luca


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 6 posts ] 

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 4 users online :: 1 registered, 0 hidden and 3 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: Yahoo [Bot] and 3 guests





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

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman