Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Pezmerga
Senior Member
 
Join Date: Oct 2010
Location: Cincinnati, OH
Posts: 328

Old December 9th, 2010, 12:11 PM
The Tome of Secrets Swashbuckler has an ability called find the mark, which increases the threat range of a weapon finessable weapon by 1. It currently does not show up, is it possible to customly implement this? I see the Keen quality just uses a tag and so does Improved Critical..So I cannot see how the actual coding works.
Pezmerga is offline   #1 Reply With Quote
Pezmerga
Senior Member
 
Join Date: Oct 2010
Location: Cincinnati, OH
Posts: 328

Old December 9th, 2010, 12:19 PM
this is the existing code...

Code:
  ~Post-levels 10,000
~if we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)
 
foreach thing in BaseWep where "wClass.Light | Helper.Finesse"
  perform eachthing.amendthing[description,eachthing.field[descript].text & "{br}{br}{b}Addition from Find the Mark{/b}: Threat Range Increased by 1"]
  nexteach

~foreach pick in hero where "wClass.Light | Helper.Finesse"
~ each.field[wCrit].value -= 5
~perform eachpick.assign[Broadcast.ImpCrit]
~  nexteach
Pezmerga is offline   #2 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old December 9th, 2010, 01:00 PM
Its not currently possible to implement a only 1 improvement to the threat range. Or if it is I have no idea how to get it to work.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #3 Reply With Quote
Pezmerga
Senior Member
 
Join Date: Oct 2010
Location: Cincinnati, OH
Posts: 328

Old December 9th, 2010, 01:12 PM
Quote:
Originally Posted by ShadowChemosh View Post
Its not currently possible to implement a only 1 improvement to the threat range. Or if it is I have no idea how to get it to work.
Ah ok, was starting to think that was the case. I know some of my other custom classes have features that currently can not be implemented on HL!
Pezmerga is offline   #4 Reply With Quote
risner
Senior Member
Volunteer Data File Contributor
 
Join Date: Jun 2010
Posts: 623

Old December 9th, 2010, 01:34 PM
Quote:
Originally Posted by Pezmerga View Post
Ah ok, was starting to think that was the case. I know some of my other custom classes have features that currently can not be implemented on HL!
The Keep/IC scripts fiddle with tagnames[wCritMin.?] directly.

You will need to modify timing to go after Keen/IC fire off.

Something like:
Code:
  <thing id="ipwCritMin" name="wCritMin change" compset="ItemPower" uniqueness="
unique">
    <tag group="PowerType" tag="Weapon" name="Weapon" abbrev="Weapon"/>
    <eval phase="Final" priority="50000"><![CDATA[var critmin as number
critmin = container.parent.tagnames[wCritMin.?,""] -1

if (critmin = 18) then
     perform container.parent.assign[wCritMin.18]
     perform container.parent.delete[wCritMin.19]
endif]]></eval>
    </thing>
The only caveat (since I'm not sure how to assign a tag from a string) is that you will need a huge if-then-else-endif chain to do all possible things (I just coded 19->18 for a Longsword in this test)

Last edited by risner; December 9th, 2010 at 01:55 PM.
risner is offline   #5 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old December 9th, 2010, 02:24 PM
Quote:
Originally Posted by risner View Post
...
The only caveat (since I'm not sure how to assign a tag from a string) is that you will need a huge if-then-else-endif chain to do all possible things (I just coded 19->18 for a Longsword in this test)
Awesome risner. So building on that logic here is how to assign a String value. This is quick adjustment I created that can control the Crit by the counter.
Code:
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
~if nothing's been chosen, get out now
doneif (field[pChosen].ischosen = 0)
var sCrit as String
var nCrit as number
~ Remove all crit tags
perform field[pChosen].chosen.delete[wCritMin.?]
~ Calc numeric crit by taking 20 and subtracking the counter
nCrit = 20 - field[pAdjust].value
~ Create the Crit string value
sCrit = "wCritMin." & nCrit
~ Assign the string to the weapon
perform field[pChosen].chosen.assignstr[sCrit]
Here is the full XML:
Code:
  <thing id="pS2wCritRa" name="Weapon: Crit Range" compset="InPlay">
    <fieldval field="pMaximum" value="19"/>
    <fieldval field="pMinimum" value="1"/>
    <tag group="Adjustment" tag="YourWep"/>
    <eval phase="Final" priority="50000"><![CDATA[~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
~if nothing's been chosen, get out now
doneif (field[pChosen].ischosen = 0)
var sCrit as String
var nCrit as number
~ Remove all crit tags
perform field[pChosen].chosen.delete[wCritMin.?]
~ Calc numeric crit by taking 20 and subtracking the counter
nCrit = 20 - field[pAdjust].value
~ Create the Crit string value
sCrit = "wCritMin." & nCrit
~ Assign the string to the weapon
perform field[pChosen].chosen.assignstr[sCrit]]]></eval>
    </thing>
The only issue is that not all Crit ranges are in HL. Seems like only 20-18, but it looks like if you create a new weapon you can define NEW crit value tags in the editor. Yep just tested this and you can create the other tags in the editor under weapons. Then just set the weapons to not be selectable and as a helper object.

Hope that helps.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.

Last edited by ShadowChemosh; December 9th, 2010 at 02:40 PM.
ShadowChemosh is offline   #6 Reply With Quote
Pezmerga
Senior Member
 
Join Date: Oct 2010
Location: Cincinnati, OH
Posts: 328

Old December 9th, 2010, 03:46 PM
Not really sure how you guys are getting this to work (I'm not that familiar with XML)...mind posting a datafile with that code in an ability?
Pezmerga is offline   #7 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old December 9th, 2010, 04:11 PM
I have an adjustments file with this and other stuff I have plans to release to the community soon.

Otherwise the first bit of code is what goes into an Eval Scripts for a Adjustment in the editor.

In the editor go to Adjustment tab and do a New(Blank). Give it a name and unique ID. Then do the following:

* Show Menu = "Current Weapons"
* Minimum adjustment = "1"
* Maximum adjustment = "19"

For the Eval Scripts enter the following at Phase: Final Phase; Priority: 50000
Code:
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
~if nothing's been chosen, get out now
doneif (field[pChosen].ischosen = 0)
var sCrit as String
var nCrit as number
~ Remove all crit tags
perform field[pChosen].chosen.delete[wCritMin.?]
~ Calc numeric crit by taking 20 and subtracking the counter
nCrit = 20 - field[pAdjust].value
~ Create the Crit string value
sCrit = "wCritMin." & nCrit
~ Assign the string to the weapon
perform field[pChosen].chosen.assignstr[sCrit]
Though without new Tags you will only be able to set 19,18,17 crit ranges only. The .user file I release to the community will be able to do many more.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #8 Reply With Quote
Pezmerga
Senior Member
 
Join Date: Oct 2010
Location: Cincinnati, OH
Posts: 328

Old December 9th, 2010, 04:24 PM
Quote:
Originally Posted by ShadowChemosh View Post
I have an adjustments file with this and other stuff I have plans to release to the community soon.

Otherwise the first bit of code is what goes into an Eval Scripts for a Adjustment in the editor.

In the editor go to Adjustment tab and do a New(Blank). Give it a name and unique ID. Then do the following:

* Show Menu = "Current Weapons"
* Minimum adjustment = "1"
* Maximum adjustment = "19"

For the Eval Scripts enter the following at Phase: Final Phase; Priority: 50000
Code:
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
~if nothing's been chosen, get out now
doneif (field[pChosen].ischosen = 0)
var sCrit as String
var nCrit as number
~ Remove all crit tags
perform field[pChosen].chosen.delete[wCritMin.?]
~ Calc numeric crit by taking 20 and subtracking the counter
nCrit = 20 - field[pAdjust].value
~ Create the Crit string value
sCrit = "wCritMin." & nCrit
~ Assign the string to the weapon
perform field[pChosen].chosen.assignstr[sCrit]
Though without new Tags you will only be able to set 19,18,17 crit ranges only. The .user file I release to the community will be able to do many more.
So I really can't alter the class special to do this, just use an adjustment?
Either way thanks though! At least it will print out correctly now

edit: Just realized when modifying a rapier and then adding keen, it doesnt play nice. It wants to double this value too. not sure if you can do much about that.

Last edited by Pezmerga; December 9th, 2010 at 04:29 PM.
Pezmerga is offline   #9 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old December 9th, 2010, 06:27 PM
Quote:
Originally Posted by Pezmerga View Post
So I really can't alter the class special to do this, just use an adjustment?
Either way thanks though! At least it will print out correctly now

edit: Just realized when modifying a rapier and then adding keen, it doesnt play nice. It wants to double this value too. not sure if you can do much about that.
Well I scripted an adjustment to demonstrate how the script can work. To make it work specifically for your class ability you will need to modify it to figure out a weapons starting value based on the weapon instead of 20 and then lower it by one.

Hero Lab Resources:
Pathfinder - d20pfsrd and Pathfinder Pack Setup
3.5 D&D (d20) - Community Server Setup
5E D&D - Community Server Setup
Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources.
Created by the community for the community
- Realm Works kickstarter backer (Alpha Wolf) and Beta tester.
- d20 HL package volunteer editor.
ShadowChemosh is offline   #10 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 11:33 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.