Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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 Code:
Y: fieldval:hTotal = 1 Z: fieldval:hTotal = 2 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 |
#11 |
Member
Join Date: Oct 2013
Posts: 79
|
@Sendric
You said, Quote:
Sorry for the delays in replies. Very busy. |
|
#12 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
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. |
|
#13 |
Member
Join Date: Oct 2013
Posts: 79
|
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 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 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 Bootstrap cDK_01 with the condition first 10000 Code:
fieldval:hTotal=1 Code:
fieldval:hTotal=2 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? |
#14 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Sendric, are you sure it's "Value", and not "abValue"?
|
#15 |
Member
Join Date: Oct 2013
Posts: 79
|
@Mathias
I tried to put abValue on both parts that have value in them but got an error. |
#16 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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.
|
#17 |
Member
Join Date: Oct 2013
Posts: 79
|
@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'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'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'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'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'" 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> Last edited by Sevisin; March 19th, 2014 at 05:53 PM. Reason: Updated code 3/19/2014 653pm pst |
#18 |
Member
Join Date: Oct 2013
Posts: 79
|
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 |
#19 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
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.
|
#20 |
|
|