Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old March 12th, 2014, 06:15 AM
Well, that's the trick. When you have a drop-down menu for a feat, selecting something doesn't necessarily do anything unless there's a script on the feat itself that does something based on the selection. For example, take a look at Weapon Focus. When you select a weapon with that feat, the feat itself has a script that looks at what you chose and assigns a Weapon Focus tag to that weapon(s) in your portfolio. This is fairly simple. If you have something more complicated, this is what I've done.

Feat X has two drop down menu items that are special abilities Y and Z. Special abilities have a value field called "Value". Set Y's Value = 1, and Z's Value = 2. Use a script in Feat X to set its field hTotal = the value of the chosen item. This will need to be set early because you are going to use this value as your condition on the bootstrap. Here's what I did recently with this exact scenario:

Script on Feat X run at First/9500:
Code:
doneif (field[fChosen].ischosen = 0)

~set hTotal field for bootstrapping purposes
var tribe as number
tribe = field[fChosen].chosen.field[Value].value
field[hTotal].value = tribe
Bootstrap Specials Y and Z with the following conditionals running at First/10000:
Code:
Y: fieldval:hTotal = 1
Z: fieldval:hTotal = 2
Of course, you can't use the Value and hTotal fields for anything else (hTotal is usually used for charges, so if your feat has charges, this would not work). Your specials can then have any script they want, as long as they run after First/10000, it will work.

There are other ways, but this might give you some ideas of some of the things you can do.

BTW, you can use thingid for your custom expression. For the feat above, I used this as my custom expression:

Code:
thingid.xRvnHVCanj | thingid.xRvnHVCorv | thingid.xRvnHVEqua | thingid.xRvnHVKami | thingid.xRvnHVNaia | thingid.xRvnHVVatm | thingid.xRvnHVZaro
Sendric is offline   #11 Reply With Quote
Sevisin
Member
 
Join Date: Oct 2013
Posts: 79

Old March 17th, 2014, 12:37 PM
@Sendric
You said,
Quote:
Special abilities have a value field called "Value". Set Y's Value = 1, and Z's Value = 2.
. When I looked into the field, I tried to set Field ID as value, but that came up with an error. Tried names I thought would work, but got more errors. Where can I add a new ID or where can I get a list of IDs I can work with?

Sorry for the delays in replies. Very busy.
Sevisin is offline   #12 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old March 18th, 2014, 05:03 AM
Quote:
Originally Posted by Sevisin View Post
@Sendric
You said, . When I looked into the field, I tried to set Field ID as value, but that came up with an error. Tried names I thought would work, but got more errors. Where can I add a new ID or where can I get a list of IDs I can work with?

Sorry for the delays in replies. Very busy.
The field is "Value" with a capital "V". It's cap-sensitive. You can see what fields any one thing has in HL using two ways. Either way, you'll need to make sure Enable Data File Debugging is checked in the Develop menu.

The first way is easier. Some things you can get to by right-clicking on them in your portfolio. For example, if you have your character loaded up, and the special appears in the special tab or class tab, you can right-click on it and select "Show Debug Fields". This will bring up a window that shows every field your special has. The field "Value" is found at the bottom. Most fields, like Value, are number-based. Some fields, though, are text-based or are arrays. You may also see some that are matrix-based. These are a bit tricky to deal with, so I recommend avoiding them.

The other way takes longer but gives you access to everything on your character:

Let's say you want to see what fields your class has. To do this, do the following:

First, select a class. I'll use Fighter as an example.

Second, go to Develop --> Floating Info Windows --> Show Selection Fields

This brings up a list of options. You can select more than one, but for this exercise, simply select "Fighter (cHelpFtr)" and hit ok.

You will get a window that shows all of the fields for your Fighter class. Every class has the same fields, but of course the values of these fields change.
Sendric is offline   #13 Reply With Quote
Sevisin
Member
 
Join Date: Oct 2013
Posts: 79

Old March 18th, 2014, 12:13 PM
Okay, here is what I have so far... Feat X and two special abilities A and B.

Feat X has the following...
Eval Script Pre-levels @9500
Code:
~ If we're disabled, do nothing
  doneif (tagis[Helper.FtDisable] <> 0)

~ If we haven't chosen anything, get out now
  doneif (field[fChosen].ischosen = 0)

~ If something has been chosen
~ "Dragon Bloodline" has to do with the name of the feat for Dragonwrought
if (field[fChosen].ischosen <> 0) then
  field[fShortName].text = "Dragon Bloodline: " & field[fChosen].chosen.field[name].text
endif
This block works.

Eval Script First @9500
Code:
doneif (field[fChosen].ischosen = 0)

var tribe as number
tribe = field[fChosen].chosen.field[Value].value
field[hTotal].value = tribe
On testing, I get an error...
Code:
Attempt to access field 'Value' that does not exist for thing 'cDK_01'
Location: 'eval' script for Thing 'fDrgWrgt' (Eval Script '#2') near line 4
cDK_01 is the dragon bloodline for the feat and will be numbered sequentially (cDK_02, cDK_03, ect). This line comes up no matter which I pick with the cDK properly incriminating.

Bootstrap
cDK_01 with the condition first 10000
Code:
fieldval:hTotal=1
and cDK_02 with the condition First 10000
Code:
fieldval:hTotal=2
The two custom abilities, A (with the unique ID cDK_01) and B (with the unique ID cDK_02) have the following...
Field
Field Id: hTotal ~ got an error if left blank or named it something else
Value: 1 ~ or 2 respectively for cDK_02

A majority of the code was either translated and written from the Weapon Focus feat or the blocks of code given from above. I put the priority from 9500 to 11000 and still got the same error. What am I missing?
Sevisin is offline   #14 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 18th, 2014, 12:17 PM
Sendric, are you sure it's "Value", and not "abValue"?
Mathias is online now   #15 Reply With Quote
Sevisin
Member
 
Join Date: Oct 2013
Posts: 79

Old March 18th, 2014, 01:21 PM
@Mathias
I tried to put abValue on both parts that have value in them but got an error.
Sevisin is offline   #16 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old March 19th, 2014, 06:13 AM
Special abilities use the field "Value". Of that, I am certain. Custom abilities do not, though, I don't think. Can you attach the .user file? It might be easier if I take a look at it rather than trying to go back and forth so I can get a better understanding of what exactly is going on.
Sendric is offline   #17 Reply With Quote
Sevisin
Member
 
Join Date: Oct 2013
Posts: 79

Old March 19th, 2014, 05:27 PM
@Sendric
Sure. Prepare to me "amazed" at my awesome skillz (< notice the z?).

Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<document signature="Hero Lab Data">
  <thing id="rDsrtKbld" name="_Desert Kobold" description="Desert kobolds live like scaly, intelligent rats, hiding in forgotten corners of settlements, living just over the dunes from trading posts, and always reappearing right after the residents think they&apos;ve finally been killed off.\n\nDesert kobolds claim they were among the first to settle the deserts, and that gnomes threw them out into the wilderness. Though their survival relies on goods available at oasis settlements and trading posts, desert kobolds hate the gnomes who often build and run such settlements.\n\nThe life of a desert kobold is one of constant fear, which motivates them to build traps and fortifications and to ambush intruders. Some few kobolds, however, seek peace of mind through personal power and boon companions. These rare individuals become adventurers.\n\nRacial Traits: Desert kobolds have the following racial traits.\n\n+2 Dexterity, -4 Strength, -2 Wisdom: Desert kobolds are hardier than other kobolds, but are weak-willed.\n\nNo light sensitivity unlike other Kobolds.\n\nHumanoid (Reptilian).\n\nSmall size: +1 bonus to Armor Class, +1 bonus on attack rolls, +4 bonus on Hide checks, -4 penalty on grapple checks, lifting and carrying limits 3/4 of those of Medium characters.\n\nA desert kobold&apos;s base land speed is 30 feet.\n\nDarkvision out to 60 feet.\n\n+1 natural armor bonus.\n\nHeat Endurance: Desert kobolds gain a +4 racial bonus on Fortitude saves made to resist the effects of hot weather.\n\n+2 racial bonus on Craft (trapmaking), Search, and Survival checks.\n\nAutomatic Language: Draconic. Bonus Languages: Common, Undercommon.\n\nFavored Class: Rogue. A multiclass desert kobold&apos;s rogue class does not count when determining whether he takes an experience point penalty for multiclassing.\n\nLevel Adjustment: +0." compset="Race" summary="Desert Kobold">
    <fieldval field="rSTR" value="-4"/>
    <fieldval field="rDEX" value="2"/>
    <fieldval field="rInfFavor" value="Rogue"/>
    <fieldval field="rInfAutoLn" value="Draconic"/>
    <fieldval field="rCR" value="1/4"/>
    <fieldval field="rWIS" value="-2"/>
    <fieldval field="rHeightMnF" value="20"/>
    <fieldval field="rHeightMnM" value="20"/>
    <fieldval field="rWeightMnF" value="20"/>
    <fieldval field="rWeightMnM" value="25"/>
    <fieldval field="rAgeMin" value="30"/>
    <tag group="Language" tag="lDraconic" name="Draconic" abbrev="Draconic"/>
    <tag group="Language" tag="lUndercomm" name="Undercommon" abbrev="Undercommon"/>
    <tag group="RaceSize" tag="Small11" name="Small" abbrev="Small"/>
    <tag group="RaceType" tag="Normal"/>
    <tag group="Language" tag="lCommonND" name="Common" abbrev="Common"/>
    <tag group="HeightDice" tag="1"/>
    <tag group="HeightSize" tag="6"/>
    <tag group="WeightDice" tag="1"/>
    <tag group="WeightSize" tag="6"/>
    <tag group="Hero" tag="NoDefComm"/>
    <tag group="Race" tag="typHumanoi"/>
    <tag group="Race" tag="Kobold"/>
    <bootstrap thing="xDkVsnKbld"></bootstrap>
    <bootstrap thing="lDraconic"></bootstrap>
    <eval phase="PreLevel">~ +2 to Craft (Trapmaking), Profession (Miner), and Search
      #skillbonus[kCrafTrap] += 2
      #skillbonus[kSearch] += 2
      #skillbonus[kSurvival] += 2</eval>
    <eval phase="First" index="2"><![CDATA[      var result as number

      ~ We don't know Common by default!
      result = hero.assign[Hero.NoDefComm]]]></eval>
    </thing>
  <thing id="fDrgwrgt" name="_Dragonwrought" description="You were born a Dragonwrought Kobold, proof of your race&apos;s innate connection to dragons.\n\nPrerequisites: Kobold, 1st level only.\n\nBenefit: You are a Dragonwrought Kobold. Your type is dragon rather than humanoid, and you lose the dragonblood subtype. You retain all your other subtypes and your kobold racial traits. Your scales become tinted with a color that matches that of your draconic heritage. As a dragon, you are immune to magic sleep and paralysis effects. You have darkvision out to 60 feet and low-light vision. You gain a +2 racial bonus on the skill indicated for your draconic heritage on the table on page 103 in Races of the Dragon. \n\nSpecial: Unlike most feats, this feat must be taken at 1st level, during character creation. Having this feat allows you to take the Dragon Wings feat at 3rd level." compset="Feat" summary="Kobold Dragon ancestry">
    <fieldval field="ftCandExpr" value="User.DragonKind"/>
    <usesource source="RoD"/>
    <tag group="fCategory" tag="Racial"/>
    <bootstrap thing="xImmParaly"></bootstrap>
    <bootstrap thing="rLowLight"></bootstrap>
    <bootstrap thing="cDK_01">
      <containerreq phase="First" priority="10000">fieldval:hTotal = 1</containerreq>
      </bootstrap>
    <bootstrap thing="cDK_02">
      <containerreq phase="First" priority="10000">fieldval:hTotal = 2</containerreq>
      </bootstrap>
    <bootstrap thing="xImmSleep"></bootstrap>
    <eval phase="PreLevel" priority="5000"><![CDATA[doneif (tagis[Helper.FtDisable] <> 0)
doneif (field[fChosen].ischosen = 0)

~ If something has been chosen
if (field[fChosen].ischosen <> 0) then
  field[fShortName].text = "Dragon Bloodline: " & field[fChosen].chosen.field[name].text
endif]]></eval>
    <eval phase="First" priority="9500" index="2">doneif (field[fChosen].ischosen = 0)

var tribe as number
~tribe = field[fChosen].chosen.field[abValue].value
~field[hTotal].value = tribe</eval>
    <eval phase="First" priority="20000" index="3">perform hero.delete[Race.typHumanoi]
perform hero.assign[Race.typDragon]</eval>
    <exprreq message=""><![CDATA[hero.tagis[Race.Kobold] <> 0]]></exprreq>
    </thing>
  <thing id="cDK_01" name="Amethyst" description="Used for the feat Dragonwrought\nAmethyst Dragon Blood (MM2)\n\nDescriptor or Subschool:\nForce\n\nClass Skill:\nDiplomacy\n\nSpells Known:\nDelay Poison, Invisibility, Suggestion" compset="CustomSpec">
    <fieldval field="hTotal" value="1"/>
    <tag group="User" tag="DragonKind"/>
    <eval phase="PostLevel">~ +2 to Diplomacy
      #skillbonus[kDiplomacy] += 2</eval>
    </thing>
  <thing id="xDkVsnKbld" name="Darkvision" description="You can see in the dark (black and white vision only)." compset="Special" summary="Darkvision 60&apos;" uniqueness="unique">
    <fieldval field="Value" value="60"/>
    <tag group="SpecType" tag="Sense" name="Sense" abbrev="Sense"/>
    <tag group="Helper" tag="ShowSpec" name="ShowSpec" abbrev="ShowSpec"/>
    <tag group="SpecSource" tag="rKobold2"/>
    <eval phase="Final" priority="10000"><![CDATA[
      call CalcValue

      ~ Use our value field as the range of our darkvision.
      field[livename].text = field[name].text & " (" & field[Value].value & " feet)"]]></eval>
    </thing>
  <thing id="cDK_02" name="Battle" description="Used for the feat Dragonwrought\nBattle Dragon Blood (Dr)\n\nDescriptor or Subschool:\nSonic\n\nClass Skill:\nPerform\n\nSpells Known:\nAid, Heroism, Protection from Evil" compset="CustomSpec">
    <fieldval field="hTotal" value="2"/>
    <tag group="User" tag="DragonKind"/>
    <eval phase="PostLevel">~ +2 to Perform 
      #skillbonus[kPerfAct] += 2
      #skillbonus[kPerfCom] += 2
      #skillbonus[kPerfDance] += 2
      #skillbonus[kPerfKey] += 2
      #skillbonus[kPerfOrat] += 2
      #skillbonus[kPerfOther] += 2
      #skillbonus[kPerfPerc] += 2
      #skillbonus[kPerfSing] += 2
      #skillbonus[kPerfStrng] += 2
      #skillbonus[kPerfWind] += 2</eval>
    </thing>
  <thing id="cDK_03" name="Black" description="Used for the feat Dragonwrought\nBlack Dragon Blood (MM)\n\nDescriptor or Subschool:\nAcid\n\nClass Skill:\nHide\n\nSpells Known:\nCharm Animal (Snakes and Lizards only), Deeper Darkness, Insect Plague" compset="CustomSpec">
    <tag group="User" tag="DragonKind"/>
    <eval phase="PostLevel">~ +2 to Hide
      #skillbonus[kHide] += 2</eval>
    </thing>
  <thing id="cDK_04" name="Blue" description="Used for the feat Dragonwrought\nBlue Dragon Blood (MM)\n\nDescriptor or Subschool:\nElectricity\n\nClass Skill:\nHide\n\nSpells Known:\nMajor Image, Mirage Arcana, Ventriliquism" compset="CustomSpec">
    <tag group="User" tag="DragonKind"/>
    <eval phase="PostLevel">~ +2 to Hide
      #skillbonus[kHide] += 2</eval>
    </thing>
  <thing id="fDrgTail" name="_Dragon Tail" description="Your draconic ancestry manifests as a muscular tail you can use in combat.\n\n{b}Prerequisites:{/b} Dragonblood subtype, 1st level only.\n\n{b}Benefit:{/b} You have a tail that you can use to make a\nsecondary natural attack in combat. This attack deals\nbludgeoning damage according to your size, as shown\non the table below. If you already have a tail slap attack\nwhen you take this feat, use the value from the table or\nyour existing damage value, whichever is greater.\n\nSize, Tail Slap Damage\nFine, 1\nDiminutive, 1d2\nTiny, 1d3\nSmall, 1d4\nMedium, 1d6\nLarge, 1d8\nHuge, 2d6\nGargantuan, 2d8\nColossal, 4d6\n\n{b}Special:{/b} Unlike most feats, this feat must be taken at\n1st level, during character creation." compset="Feat" summary="Your draconic ancestry manifests as a muscular tail you can use in combat.">
    <tag group="fCategory" tag="General"/>
    </thing>
  </document>
Please see following post for details.

Last edited by Sevisin; March 19th, 2014 at 05:53 PM. Reason: Updated code 3/19/2014 653pm pst
Sevisin is offline   #18 Reply With Quote
Sevisin
Member
 
Join Date: Oct 2013
Posts: 79

Old March 19th, 2014, 05:28 PM
I'm working on two incomplete tasks for That Damned Kobold build. One is the Dragonwrought feat but I'm stuck on the +2 skill bonus the selection of dragon gives (and other benefits, but the +2 skill bonus is a good stepping stone in my opinion). The second incomplete task is the Dragon Tail feat. I'm stuck on the changing out of the Race tag (Race.hypHumanoi to Race.DragonKind). The forum post for the Dragon Tail roadblock is found here. By the way, thank you for replying to that too. I'll look into that shortly. The checklist of all feats for The Damn Kobold build is as follows...

Dragonwrought (Races of the Dragon pg 100) - In Progress
Dragon Tail (Races of the Dragon pg 98) - In Progress
Multiattack (Monster Manual pg 304) - Already Implemented (in my version of HL)
Improved Multiattack (Savage Species pg 36) - Already Implemented (in my version of HL)
Daring Outlaw (Complete Scoundrel pg 76) - Already Implemented (in my version of HL)
Craven (Champion of Ruin pg 17) - Next Task
Rapidstrike (Dracinomicon pg 73) - Already Implemented (in my version of HL)
Improved Rapidstrike (Draconomicon pg 70) - Already Implemented (in my version of HL)

Once I'm done, I do plan on posting this into the community repository. Maybe it can be implemented into a greater file for ease of download..?

Again, thanks for looking into it. I hope I gave enough information on where I'm at with the project. Though I'm posting for help, I would like to finish it on my own so that I can learn how to do certain tasks in the Hero Lab Editor.

Update: Second task done. Apparently, was just a timing issue. Check it out here if you're interested.

Last edited by Sevisin; March 19th, 2014 at 05:51 PM. Reason: Updated to-do list. No strikethrough? Q.Q
Sevisin is offline   #19 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old March 20th, 2014, 05:02 AM
Ah. Ok, now I see what's going on. The abilities "Amethyst, Battle, Black, Blue" should be put in as Specials instead of Custom Abilities. Custom Abilities do not use the Value field, which is why you are getting the error.
Sendric is offline   #20 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 02:19 PM.


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