Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
RayPrancer
Member
 
Join Date: Jun 2007
Location: United Kingdom
Posts: 80

Old October 21st, 2010, 09:55 AM
As you may remember I have been converting my homebrew world to use the "Authoring Kit Sample" system.

My current goal is that I have a type of armor called "RoboRoo Disguise" (armRoboRoo) that grants an ability "Cyborg Groin" (abGroin) when equipped. I've located the script to do this with a d20 file, but it doesn't work as the fields for armor are different.

I also have a second type of armor "Boom Boxers" (armBoomBox) that grants a +1 bonus to spellcasting skill (skSpell) but again only while equipped. The relevant unique IDs I've used are in brackets. As well as this I have two types of armor that boost health "Modern Outfit" (armTech) granting a +1 and Full Plate (armPlate) granting a +2.

I'm sure this is quite simple to do, but not sure how to do this. Can you offer some help - at least by advising the syntax to see if something is equipped or not?

Here's the current script I'm trying to use for the Boom Boxers. I'm sure at least the name of the field "gIsEquip" is incorrect. I'm sure it's almost identical for the two Health modifying armors to the correct code although the trait to be modified is of course trHealth and not skSpell. I'm a bit more confused about the adding abilities as I would think it would be a conditional bootstrap.

Code:
      if (field[gIsEquip].value <> 0) then
        #traitbonus[skSpell] += 1
        endif
RayPrancer is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 21st, 2010, 11:52 AM
Normally, you would bootstrap somethng to your item with this:

Code:
 
<bootstrap thing="abGroin"/>
Here's how to modify that so that the ability is only live while the item is equipped:

Code:
<bootstrap thing="abGroin">
  <containerreq phase="Initialize" priority="500"><![CDATA[
    fieldval:gIsEquip <> 0
    ]]></containerreq>
</bootstrap>
Could you tell me what's going wrong with the script you've given? I don't see anything that should keep it from working. That looks correct for how you can apply scripted effects only while an item is equipped.
Mathias is online now   #2 Reply With Quote
RayPrancer
Member
 
Join Date: Jun 2007
Location: United Kingdom
Posts: 80

Old October 21st, 2010, 02:25 PM
The error message is that it isn't recognising the field "gIsEquip" as valid - it says "Non-exsistant field gIsEquip used by script". However having looked through the data files properly it seems that due to the system I'm using I should set it to "Equipped" instead of "gIsEquip" but that's producing the same error message.
RayPrancer is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 21st, 2010, 02:33 PM
Oops, it looks like the field is grIsEquip for game systems derived from the skeleton files (It's gIsEquip for game systems derived from d20, and I had forgotten that there was a difference) - you can see the definition of the field on line 191 of equipment.str (or search for the Equippable component if you've made changes to equipment.str that move it around).
Mathias is online now   #4 Reply With Quote
RayPrancer
Member
 
Join Date: Jun 2007
Location: United Kingdom
Posts: 80

Old October 21st, 2010, 02:42 PM
Thanks, everything is working as intended now.
RayPrancer is offline   #5 Reply With Quote
RayPrancer
Member
 
Join Date: Jun 2007
Location: United Kingdom
Posts: 80

Old October 22nd, 2010, 10:35 AM
Following yesterday's success I was inspired to create a "Fan of Comliness +1" (wpFanCom1) - the fan counts as a knife so I started by copying the Knife (wpKnife) included in the files to a Battle Fan (wpFan) which is the mundane counterpart then copying that to actually create the item. If working correctly then when it's equipped Charisma (attrCha) goes up by 1 and Power Points (trPowerPts?) go down by 2. However I think I've set it to the wrong phase/priority combination as Power Points are actually going up by 1 instead.

I've currently got the script for Charisma running at Initilization priority 100 and working correctly and an equivelent script (reproduced below) running at Final priorty 100 for the Power Points.

Code:
if (field[grIsEquip].value <> 0) then
#traitbonus[trPowerPts] -= 2
endif
RayPrancer is offline   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 22nd, 2010, 11:00 AM
Try the Effects phase - you are applying the effects of this item to another thing in the files.

Or the Pre-Traits phase - you're making modifications to the value of a trait, so pre-traits gets the modification done before the final value of the trait is calculated in the Traits phase.

Final is too late for making modifications - it's generally only used for calculating things that apply only to the thing making the calculations - not for applying changes that other things will rely upon or that other things may want to look up.
Mathias is online now   #7 Reply With Quote
RayPrancer
Member
 
Join Date: Jun 2007
Location: United Kingdom
Posts: 80

Old October 23rd, 2010, 07:08 AM
Both of those were to early - I discovered a script that was setting it to a certain value at Traits with Priority 4000. I've now got it to work by using Traits and Priority 5000 for the Power Points element of script I want to run - and given what's neccessary need to change the penalty to -3 due to the Charisma element there as it's the addition that causes the Power Points to increase.

Last edited by RayPrancer; October 23rd, 2010 at 07:36 AM. Reason: New facts discovered
RayPrancer is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old October 23rd, 2010, 12:13 PM
I found that many of the traits in the skeleton files calculated their final values like:

@value = B + C

by changing those to:

@value += B + C

You're adding to the value that already exists, rather than replacing it - that widens the window for other things to add to the value - like you're trying to do here.
Mathias is online now   #9 Reply With Quote
RayPrancer
Member
 
Join Date: Jun 2007
Location: United Kingdom
Posts: 80

Old October 24th, 2010, 02:03 AM
I'm trying to avoid doing that because I'm working with the files in the folder labelled "Sample" which are automatically updated each time HeroLab is. Another complication is that one of the two values used for calculating Power Points is Charisma.
RayPrancer 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 04:25 PM.


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