Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - User Projects

Notices

Reply
 
Thread Tools Display Modes
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 740

Old April 23rd, 2011, 10:21 AM
Hey all,
I am still working L5R (I know its taking me forever, but I am not a prgram) ok so I have this working but I have one snag.
In L5R you have two abilities that make one Ring Ie Reflexes and Awareness (the game calls these Traits, I have them as Attributes ie attrRef and attrAwa) combine and the lower of the two make the score for the Air Ring( I have the the Rings made as Traits for the program so trAir).
This all works. A player may increase a trait by spending exp/CP at the start the cost is = to the new trait level * 4 ie reflex of 2 to increase to reflex of 3 cost 12 points (3*4=12)

BUT Because it has no Traits, the Void Ring may be increased on its own. This is more expensive. Increasing a character’s Void Ring costs a number of points equal to six times the new rank. For example, increasing a character’s Void Ring from 2 to 3 would cost 18 Experience Points.
I have Void as a Trait so I am stuck on how to make only the Void cost *6 when I have the other still *4?
Here is the trait.str lines I have for trait cost:
<!-- Each attribute point above one that is allocated by the user costs 4CP * the level, per level -->
<eval index="3" phase="Traits" priority="10000">
<before name="Calc resLeft"/>
<after name="Bound trtUser"/><![CDATA[
var traitlevel as number
var traitcost as number
var finalvalue as number
traitlevel = field[trtUser].value
traitcost = 4
finalvalue = traitcost / 2 * (traitlevel * traitlevel + traitlevel)
hero.child[resCP].field[resSpent].value += finalvalue - 12
]]></eval>
Thanks for any help everyone.
Sean
SAbel is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,238

Old April 23rd, 2011, 10:31 AM
See how you have traitcost = 4 in your script?

How about storing that in a field whose value you can define in thing_attributes.dat and thing_traits.dat?

Add this to the traits component in traits.str:
Code:
 
<field
  id="trtCPCost
  name="CP Cost Multiplier"
  type="derived">
  </field>
replace this in your script:
Code:
 
traitcost = 4
with this:
Code:
 
traitcost = field[trtCPCost].value
and in each attribute and derived trait:
Code:
 
<fieldval field="trtCPCost" value="4"/>
but on the void one, instead set it equal to 6.

Last edited by Mathias; April 23rd, 2011 at 10:35 AM.
Mathias is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,238

Old April 23rd, 2011, 10:40 AM
(or, you can skip defining all those variables as intermediate steps):


Code:
 
<!-- Each attribute point above one that is allocated by the user costs 4CP * the level, per level -->
<eval index="3" phase="Traits" priority="10000">
  <before name="Calc resLeft"/>
  <after name="Bound trtUser"/><![CDATA[
  hero.child[resCP].field[resSpent].value += (field[trtCPCost].value / 2 * (field[trtUser].value ^ 2 + field[trtUser].value)) - 12
  ]]></eval>
Mathias is offline   #3 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 740

Old April 23rd, 2011, 11:56 AM
Mathias
First off thanks that is working method 1.
BUT Now my starting character points is off (it should be 40/40 but it shows 34/40).

This is my traits.str line

<!-- Each attribute point above one that is allocated by the user costs 4CP * the level, Void is *6CP, per level -->
<eval index="3" phase="Traits" priority="10000">
<before name="Calc resLeft"/>
<after name="Bound trtUser"/><![CDATA[
var traitlevel as number
var traitcost as number
var finalvalue as number
traitlevel = field[trtUser].value
traitcost = field[trtCPCost].value
finalvalue = traitcost / 2 * (traitlevel * traitlevel + traitlevel)
hero.child[resCP].field[resSpent].value += finalvalue - 12
]]></eval>
I am guessing its in here some place?
SAbel is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,238

Old April 23rd, 2011, 04:42 PM
Can you give me the breakdown of what goes into the 34/40?

How many things are being added into that? What are their trtUser values and trtCPCost values?
Mathias is offline   #5 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 740

Old April 24th, 2011, 03:18 PM
Hey Happy Easter Mathias and all,
I have included examples of the files and what I am pulling them out of I hope this is not to long but I do not want to leave something out, I hope this covers the "bases"

Sean

From the actor.str

<!-- Starting character points to allocate -->
<field
id="acStartCP"
name="Character Points"
type="user"
defvalue="40">
</field>
from my thing_traits.dat file an example of
<!-- Water Trait -->
<thing
id="trWater"
name="Water"
compset="Trait"
isunique="yes"
description="Water is the least static element, ever changing. It is the element of strength and clarity. Water is represented by the twin Traits of Perception and Strength.">
<fieldval field="trtAbbrev" value="Water"/>
<tag group="explicit" tag="2"/>
<eval index="1" phase="Traits" priority="4000">
<before name="Derived trtFinal"/>
<after name="Calc trtFinal"/><![CDATA[
~Water is the lower of the character's Perception and Strength.
field[trtBonus].value += minimum(hero.child[attrPerc].field[trtFinal].value, hero.child[attrStr].field[trtFinal].value)
]]></eval>

</thing>

<!-- Void Trait -->
<thing
id="trVoid"
name="Void"
compset="Attribute"
isunique="yes"
description="Void is poorly understood by mortals, who seek quantify all things. It is everything and nothing and it binds the four rings together.">
<fieldval field="trtAbbrev" value="Void"/>
<fieldval field="trtUser" value="2"/>
<fieldval field="trtCPCost" value="6"/>
<tag group="explicit" tag="9"/>
<tag group="AllowAttri" tag="Attribute"/>
<eval index="1" phase="Traits" priority="4000">
<before name="Derived trtFinal"/>
<after name="Calc trtFinal"/><![CDATA[
~ field[trtBonus].value = 0
~Void does not have traits associated with it. Instead, a character gains a number of Void points per day equal to his Void Ring.
]]></eval>

</thing>

AND then from the thing_attributes.dat example:
<!-- Reflexes Attribute
-->
<thing
id="attrRef"
name="Reflexes"
compset="Attribute"
isunique="yes"
description="measures how quickly characters can react to events unfolding around them.">
<fieldval field="trtAbbrev" value="Ref"/>
<fieldval field="trtUser" value="2"/>
<fieldval field="trtCPCost" value="4"/>
<tag group="explicit" tag="7"/>
<tag group="AllowAttri" tag="Attribute"/>
</thing>
SAbel is offline   #6 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 740

Old April 24th, 2011, 03:21 PM
I have an attached file too from the traits.str which is what I think you are asking me about the info.
Attached Files
File Type: pdf NOW from the traits.pdf (34.7 KB, 1 views)
SAbel is offline   #7 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 740

Old April 24th, 2011, 03:28 PM
For charater creation CP starts at 40, then the player can use it to
1. raise traits (which I have as attributes in the programing, two per Ring) or void
2. buy skills
3.buy advantages (still working on making this happen)
4. increase starting CP by taking disadvantages (still working on making this happen)
End character CP points.
SAbel is offline   #8 Reply With Quote
Reply

Thread Tools
Display Modes

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 12:50 PM.


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