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
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old July 7th, 2009, 11:05 AM
I am attempting to make the L5r system for HL I have made it to the point were the Rings (derived traits of the abilities) come into play but I can not make the traits work right I have the code at this point which results in a value of 0 for the trait when it should be the lower of the two abilities it is tied to; my example is the Air Ring (trait) which pulls from the abilities Awareness and Reflexes (which the system refers to as traits) ie Rings and traits.


<!-- Air Trait -->
<thing
id="trAir"
name="Air"
compset="Trait"
isunique="yes"
description="Air is mercurial and enigmaticm the element of intuition and understanding. Air is represented y the twin Traits of Awareness and Reflexes.">
<fieldval field="trtAbbrev" value="Air"/>
<eval index="1" phase="Traits" priority="4000">
<before name="Derived trtFinal"/>
<after name="Calc trtFinal"/><![CDATA[
~Air is the lower of the character's Awareness and Reflexes.
~minimum(field[attrAwa].value, field[attrRef].value)
]]></eval>

</thing>
SAbel is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 7th, 2009, 11:24 AM
Here's a script that should work:

Code:
 
~Air is the lower of the character's Awareness and Reflexes. 
field[trtBonus].value += minimum(#trait[attrAwa], #trait[attrRef])
Note that I've used macros, to make this simpler to write. In case you need it elsewhere, that statement, written out in full, without any simplifications (this version would work, too - it would do exactly the same things as the simpler version):

this.field[trtBonus].value += minimum(hero.child[attrAwa].field[trtFinal].value, hero.child[attrRef].field[trtFinal].value)

I presume the active line of the script was commented out because it didn't have an equals sign yet, and your code wouldn't have compiled without it? Remember, in scripts in HeroLab, EVERY line must be either flow control (like an if statement), a perform statement, or set something equal to something else.
Mathias is offline   #2 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old July 7th, 2009, 02:09 PM
Thank you mgehl, This stuff is just above my head and I am not doing well but this should help me out. I used the full statement b/c it must do this for 4 derived ablities.
Thank you for that help it makes the differance in everything.
If I go out and get a XML for dumies book would that help b/c I am having a hard time getting this to work correct. Like adding tabs, I could not make it work with the replacement from the wiki, or adding areas to skills other than what is presented in the wiki basics. I am still trying mind you just its much harder than what I had hoped.
SAbel is offline   #3 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old July 7th, 2009, 02:11 PM
Do you do most of your working in an XML editor (I am using XML Marker ver 1.1) or do you use the Authoring Kit?
SAbel is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 7th, 2009, 02:51 PM
I do everything in an XML editor. Remember that the editor that's available within each game system needs to be defined, by writing it in XML, before you can use it.

Don't worry about learning XML - XML is a very broad classification of things, and you don't need to know about every posible thing XML could be defined to do - you need to know what it has been defined to do in HeroLab.

What I would suggest is learning more about HeroLab's scripting language. If you already use any of the games that exist for HL (d20, M&M, etc.), pick up a book that hasn't been entered, and try entering a few things using the editor. You want to get experience and practice working with the scripting language before you try to learn both the scripting langauge AND the XML at the same time. If you have a couple of these games, Savage Worlds, 4ed, and Cortex (once it's released), would be the most informative, since they're all derived from the same skeleton files you're deriving L5R from (d20, M&M, and WoD were all written before the Skeleton files, so they'll be doing the same things, but they'll have different names for everything). After you've gotten practice entering these things using the editor, try entering a few things in XML.
Mathias is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 7th, 2009, 02:53 PM
All you would do for the other 4 versions is change the names of the attributes it references. So, for strength (id: attrStr) and willpower (ID: attrWil) (or whatever the attributes are called - I don't know L5R), you would use:

field[trtBonus].value += minimum(#trait[attrStr], #trait[attrWil])
Mathias is offline   #6 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old July 8th, 2009, 07:17 PM
I used your long forumal method and it works great for setting up the derived traits. Thank you.

Okay New one for this, the base for an trait is 2 max is 10 (this represents the amount of D10s one rolls when using the correct Trait), but there is a way to gain more character points when starting by dropping a trait to a value of 1. I did have the traits all starting at 2 but I could not use the up down arrows to drop down to 1 it was locked at low end of 2. So what must I do to have the Traits start (defult) at 2 but still be able if a person wanted to drop then down to a value of 1?
Ie in D&D the defult is 10 but a person could drop abilities lower if they wanted to have more points to spend.
I have not even started to tackle the level system in L5R nor am I worried about the points at this time. I am just not sure where I should start looking into this setting the ability defults (since I have them all in now.)
SAbel is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 8th, 2009, 09:32 PM
A creation script on the component.

Here's an example from Cortex that sets the initial value of a component to 3:

<!-- The default value of an attribute when creating a new character is d6, rather than the minimum of d4 -->
<creation><![CDATA[
field[trtUser].value = 3
]]></creation>


This page from the wiki:

http://hlkitwiki.wolflair.com/index...._Element_(Data)

tells you the order to place all the various things in a component, so, the creation script belongs after the field definitions and the identity definitions, and before the tag definitions.
Mathias is offline   #8 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old July 9th, 2009, 01:34 PM
I did this line <fieldval field="trtUser" value="2"/> (I got the idea outta 4E files)
it works

<!-- Awareness Attribute
-->
<thing
id="attrAwa"
name="Awareness"
compset="Attribute"
isunique="yes"
description="is a representation of a characteer's intuition, and empathy.">
<fieldval field="trtAbbrev" value="Awa"/>
<fieldval field="trtUser" value="2"/>
<tag group="explicit" tag="1"/>
</thing>
SAbel is offline   #9 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 9th, 2009, 01:43 PM
Either way works. They both end up doing the same thing, the creation script, however, doesn't need to be repeated for every version of a thing (which is important if you need it for all 100 skills and skill specialties in your game.
Mathias 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 03:56 AM.


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