Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

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

Old July 14th, 2009, 10:25 PM
On the other side I am using EditPad Lite now, it has better abilities but I miss the the color from XML maker.
SAbel is offline   #21 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old July 14th, 2009, 10:29 PM
okay I think I have it I removed the , skil it entirely
if (origin.ishero=0) then
so now looks like this and works w/out error

<!-- Each skill point that is allocated by the user costs the next rank in CP-->

<eval index="2" phase="Traits" priority="10000">
<before name="Calc resLeft"/>
<after name="Bound trtUser"/><![CDATA[
~if this skill is not added directly to the hero (i.e. an advance)
var traitlevel as number
var traitcost as number
var finalvalue as number

traitlevel = field[trtUser].value
traitcost = 1

finalvalue = traitcost / 2 * (traitlevel * traitlevel + traitlevel)

hero.child[resCP].field[resSpent].value += finalvalue
]]></eval>
SAbel is offline   #22 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 14th, 2009, 11:09 PM
4 lines total in that section - you got 2.
Mathias is online now   #23 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old July 15th, 2009, 07:13 AM
I am not sure that I follow, here is the entire trait.str for skills I have the panellink="skills"> blocked because I am still getting an error with it that keeps me from starting the rule set. I noticed that in the section above the calcuations is also mentions something about advancement so could I be doubling up info?

<!-- Skill component
Each skill derives from this component
-->
<component
id="Skill"
name="Skill"
autocompset="no">
<!-- panellink="skills"> -->

<!-- Net final roll that includes the value of the linked attribute -->
<field
id="sklRoll"
name="Net Skill Roll"
type="derived">
<calculate phase="Final" priority="5000">
<after name="Calc trtFinal"/><![CDATA[
~only access the linkage if the skill is directly on the hero; if not, it is
~likely within an advancement gizmo and no linkage will exist there
if (container.ishero <> 0) then
@value = field[trtFinal].value + linkage[attribute].field[trtFinal].value
endif
]]></calculate>
</field>

<!-- Each skill is associated with a specific attribute that must be identified -->
<linkage linkage="attribute" optional="no"/>

<!-- Each skill needs its own identity tag so existing skills can be identified during advancement -->
<identity group="Skill"/>

<!-- Every skill is shown on the "Rolls" mouse-over on the Dashboard/TacCon -->
<tag group="DashTacCon" tag="Rolls"/>

<!-- Track the skill on the actor -->
<eval index="1" phase="Setup" priority="5000"><![CDATA[
perform forward[Skill.?]
]]></eval>

<!-- Each skill point that is allocated by the user costs the next rank in CP-->

<eval index="2" phase="Traits" priority="10000">
<before name="Calc resLeft"/>
<after name="Bound trtUser"/><![CDATA[
~if this skill is not added directly to the hero (i.e. an advance)
var traitlevel as number
var traitcost as number
var finalvalue as number

traitlevel = field[trtUser].value
traitcost = 1

finalvalue = traitcost / 2 * (traitlevel * traitlevel + traitlevel)

hero.child[resCP].field[resSpent].value += finalvalue
]]></eval>
</component>
SAbel is offline   #24 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 15th, 2009, 07:57 AM
Instead of this:
Code:
 
<eval index="2" phase="Traits" priority="10000">
<before name="Calc resLeft"/>
<after name="Bound trtUser"/><![CDATA[
~if this skill is not added directly to the hero (i.e. an advance), skip it entirely
if (origin.ishero = 0) then
var traitlevel as number
var traitcost as number
var finalvalue as number
 
traitlevel = field[trtUser].value
traitcost = 1
 
finalvalue = traitcost / 2 * (traitlevel * traitlevel + traitlevel)
 
hero.child[resCP].field[resSpent].value += finalvalue 
 
]]></eval>
You need this:

Code:
 
<eval index="2" phase="Traits" priority="10000">
<before name="Calc resLeft"/>
<after name="Bound trtUser"/><![CDATA[
~if this skill is not added directly to the hero (i.e. an advance), skip it entirely
if (origin.ishero = 0) then
done
endif
 
var traitlevel as number
var traitcost as number
var finalvalue as number
 
traitlevel = field[trtUser].value
traitcost = 1
 
finalvalue = traitcost / 2 * (traitlevel * traitlevel + traitlevel)
 
hero.child[resCP].field[resSpent].value += finalvalue 
 
]]></eval>
The underlines and bold of course don't go into the final code, they're just highlighting what should be changed.

See what that section is doing?
the first line is a comment, describing what will happen.
the second line, the if statement, asks whether the skill it's adding originated on the hero (which is the case for anything the user added).

Now if it did not originate on the hero (=0), the next line executes:
Code:
 
done
Which says to leave the script.

and because you have an if statement, you need to match that with an
Code:
 
endif
Mathias is online now   #25 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old July 15th, 2009, 09:16 AM
Ok that makes more sense for the if then statement, thank you.

I have this question for this code area
I have an error when I add this into the code
panellink="skills">

The data files could not be loaded due to the following errors:

File: traits.str (line 157) - Encountered PCDATA for element 'component' proscribed against PCDATA
One or more timing errors were identified. Please review the timing report and correct the errors. You can access the report under the 'Develop' menu or by clicking this link.

It keeps the file from loading so I am not sure what is wrong with this line, it is used the same way in the following with out any adverse effects?

<!-- Ability component
Each special ability derives from this component
-->
<component
id="Ability"
name="Ability"
autocompset="no"
panellink="abilities">
SAbel is offline   #26 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old July 15th, 2009, 10:22 AM
when you add
panellink="skills">

is your previous line still:
autocompset="no">

or any other line ending in a closed angle bracket: >?

If so, delete the > from the previous line.
Mathias is online now   #27 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old July 15th, 2009, 11:34 AM
Again you rock my world!
I did not see that little > just hanging there

you are very correct it is now working okay

I still get this after the data set loads

Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
- - -
Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
SAbel is offline   #28 Reply With Quote
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old July 15th, 2009, 04:19 PM
Quote:
Originally Posted by SAbel View Post
I still get this after the data set loads

Attempt to use an 'additem' script within a table with no valid 'addthing' for portal '_tableadd_'
I have some theories about this, but I honestly can't be sure without seeing your data files. This means you're doing something you're not supposed to, and the compiler probably should be yelling at you about it - but isn't.

Could you please send me your complete set of data files? Then I can reproduce the problem on this end and add appropriate checks to the compiler. Send them to me at helpdesk at wolflair.com.

To package up your data files for sending to me, please use the HLExport tool that is installed with HL. You'll find it under the Start menu, next to HL. This will put the data files into a single, compressed file that I can simply drop into place on my end.
rob is offline   #29 Reply With Quote
SAbel
Senior Member
 
Join Date: Jul 2007
Location: Walbridge, Ohio
Posts: 767

Old July 15th, 2009, 06:40 PM
Quote:
Originally Posted by rob View Post
I have some theories about this, but I honestly can't be sure without seeing your data files. This means you're doing something you're not supposed to, and the compiler probably should be yelling at you about it - but isn't.
it sends me headacks ! in the mega ton range of pain does that count

But in my other post area you have answer what I was doing wrong I left out a set from the thing_miscellaneous.dat

<thing
id="resSkill"
name="Skill Slots"
compset="Resource">
<fieldval field="resObject" value="Skill"/>
<!-- Automatically add the resource to every actor -->
<tag group="Helper" tag="Bootstrap"/>

<!-- Use the starting ability slots as our initial maximum -->
<eval index="1" phase="Setup" priority="1000"><![CDATA[
field[resMax].value = herofield[acStartAbi].value
]]></eval>
</thing>

once I found that (I looked through the wiki under resources and were it states that Savage worlds uses fixed attirbutes and skill points) I looked at how it have handled resAbility and adapted that into this script

<thing
id="resSkill"
name="Skill Slots"
compset="Resource">
<fieldval field="resObject" value="Skill"/>
<!-- Automatically add the resource to every actor -->
<tag group="Helper" tag="Bootstrap"/>

<!-- Use the starting ability slots as our initial maximum -->
<eval index="1" phase="Setup" priority="1000"><![CDATA[
field[resMax].value = herofield[acStartAbi].value
]]></eval>
</thing>
I had to polish up the tab_skill.dat files (I had endif statements that did not need to be in there) and loaded my data set everything is working (for the base part

If you would like I can still send the data set to you, I would be happy to let you see how I have been butchering your program ... er I mean working it over LOL

You know I am an Art Teacher by trade and I like the aesthetics of character sheet layouts ect so this is a jump into the ocean for me with heavy weights on!

Thank you all for your time and tolerance with me.
SAbel is offline   #30 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 10:34 AM.


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