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
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old February 26th, 2013, 11:06 AM
Hmmm. I'm going to have to look at this some more. I do see how timing caused the xp cost to fail.

The problem I see is that cost is going to vary based on which attribute is chosen. However, as soon as they pick "Increase Attribute" though, Increase Attribute runs its evals and applies a cost, before they pick which ability! So, is that timing as well? Or do I need to run the cost script on the tab instead?

Or should I just make twelve advances for attributes, two for each one, and put them all under Gain a New Ability choices?
evildmguy is offline   #101 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,214

Old February 26th, 2013, 12:14 PM
In Shadowrun, I had to move the calculation of advCost into the same script in the CanAdvance component that handles adding the trtBonus for advancements. I also had to re-construct trtFinal within that script, so that I could use the un-modified value to calculate the cost of that advancement:


Code:
 
~increase and decrease advancements often need to look up the base value of the thing they're working with
if (origin.parent.tagis[Advance.Increase] + origin.parent.tagis[Advance.Decrease] <> 0) then
  if (tagis[component.SkillIndiv] <> 0) then
    basevalue = maximum(linkage[basis].field[trtUser].value, linkage[basis].field[sklGroup].value) + linkage[basis].field[trtAdvMod].value + linkage[basis].field[trtBase].value + linkage[basis].field[trtBonus].value
  else
    basevalue = linkage[basis].field[trtUser].value + linkage[basis].field[trtAdvMod].value + linkage[basis].field[trtBase].value + linkage[basis].field[trtBonus].value
    endif
I also had to move that script to the traits phase, inbetween "Bound trtUser" and "Calc trtFinal #1"

The way it ends up happening is that each item on the advances table runs that script - they calculate their own advCost, and then they add +1 to trtBonus. Then, the next item on the advances table runs its script. Since the trtBonus from the last one has been added, when this one calculates its advCost, a different result is generated, and then this one adds +1 to trtBonus, and so on.

Oh, and the way you get at advCost has to change if you do that:

Code:
 
origin.parent.field[advCost].value += linkage[basis].field[trtAdvCost].value
Mathias is offline   #102 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old February 28th, 2013, 11:58 AM
Thanks! Looking into making that work!

edg
evildmguy is offline   #103 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old March 4th, 2013, 10:58 AM
Okay, my mind is mush but I'm asking several questions anyway.

1 - I have created an ability thing that's an advancement.

Code:
<thing
    id="abexMortal"
    name="Extra Mortal"
    compset="Ability"
    isunique="yes"
    description="One extra mortal durability">
	<fieldval field="xpCost" value="20"/>
	
    <!-- handle costs for different professions -->
	<eval value="1" phase="Traits" priority="5000"><![CDATA[
	  if (hero.tagis[Profession.CombatSpec] <> 0) then
		field[xpCost].value = 8
	  endif
	  if (hero.tagis[Profession.Diplomat] <> 0) then
		field[xpCost].value = 10
	  endif
	  if (hero.tagis[Profession.Mindwalker] <> 0) then
		field[xpCost].value = 12
	  endif
	  ]]></eval>
	  
    <!-- Define any script needed to apply changes to other traits -->
    <eval value="2" phase="Traits" priority="8000"><![CDATA[
	  ~if we haven't been activated, just get out (only needed for user-activated abilities)
	  ~doneif (field[abilActive].value = 0)
	  
      ~apply whatever adjustment(s) are needed here
	  if (container.ishero <> 0) then
		#traitbonus[trDMor] += 1
	  endif
      ]]></eval>

    </thing>
The xp cost is set properly. I have given a character 60 xp. If I select this (as a mindwalker, since costs are different), the Advances line is updated and says "12 of 60" but the rest of it is wrong. Instead of "(48 left)" it says "(60 left)". Basically, the resSummary is wrong but the spent is okay. This happens on any similar abilities that I have created. I'm not sure why.

2- In form_advance.dat, the advBoost chooser. How do I limit what is displayed based on tags? I have tried several variations with the candidatefield but can't get it to work.

3 - I bootstrap some skills automatically. They work fine during character creation for any prereqs. In advance mode, skills that require them are showing up fine in the pick list but then showing as validation errors, giving the error that the prereq isn't selected. I assume it's because of the context but how do I override it to check the correct context?

I think that's enough for now.

Thanks!

edg
evildmguy is offline   #104 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,214

Old March 4th, 2013, 12:59 PM
I need to know the phase & priority of your various Calc trtFinal scripts.

I also need to know when the script that turns xpCost into something that gets subtracted from the resources happens, and what it's doing.

2 & 3) http://hlkitwiki.wolflair.com/index....ements_(Savage) - the skill sections.
Mathias is offline   #105 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old March 5th, 2013, 04:33 PM
Thanks, Mathias. I needed a push to get going on it. Haven't figured out the other timings but I did get several other things to work.

edg
evildmguy is offline   #106 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old March 7th, 2013, 06:40 AM
I'm trying to advance a skill. Again, skills come in two types, Broad and Specialty. Broad skills are only a have or don't, they don't have ranks. Specialty skills can have up to 12 ranks.

In advances, they add the broad skill and that works. They add the first rank of the specialty skill under the broad skill and that works. It is added and I set it's trtBonus field. However, when I go to advance it again, it doesn't work. I am not sure why.

So, my solution to this was to count up the number of times that skill has been added via tagcount and put that value into trtBonus. So, how do I find the tag of the skill that they are advancing and then put that in a tagcount[IsAdvance.xxxx] at the xxxx's so that I only count that skill's advances?

Or, am I doing this wrong and I should be doing something else?

Thanks!

edg
evildmguy is offline   #107 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,214

Old March 7th, 2013, 07:40 AM
If it's not working, show me the code, so I can look at it. Also, please be more specific than "it doesn't work" - how is it failing?
Mathias is offline   #108 Reply With Quote
evildmguy
Senior Member
 
Join Date: Nov 2007
Location: Des Moines, IA
Posts: 349

Old March 7th, 2013, 08:53 AM
Sorry for not being more specific.

In advancement.core, under component CanAdvance, I have this:

Code:
<!-- If this is an increase, add one to the trait, and subtract one for a decrease -->
    <eval index="4" phase="Traits" priority="9000"><![CDATA[
      doneif (tagis[Advance.Gizmo] = 0)

	  if (container.ishero = 0) then
		  if (tagis[Skills.Specialty] = 1) then
			field[trtBonus].value += 1    <== Right here I want tagcount[IsAdvance.(CurrentSkillBeingAdvanced)] instead of 1.  That would seem to fix my issue.
		  endif
		hero.child[resXP].field[resSpent].value += linkage[basis].field[baseCost].value + linkage[basis].field[trtBonus].value  
	  else
Do you need more code than that?

Thanks!

edg

Last edited by evildmguy; March 7th, 2013 at 08:55 AM.
evildmguy is offline   #109 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,214

Old March 7th, 2013, 09:12 AM
I also need the phase & priority of Bound trtUser, Calc trtFinal, and any Calc trtFinal #2, #3, Final, etc. scripts you've added.

Like I said, that script needs to go inbetween Bound trtUser and the first Calc trtFinal, and Traits/9000 would be well after all those, unless you've changed their priorities from the priorities that are used in the skeleton files for those scripts.

I'll also need to see the script that's calculating field[baseCost].value.
Mathias is offline   #110 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 09:33 PM.


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