• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Variable CP based on race

Icehawke

Member
In the game I am attempting to create in HL, each race has a differing number of CP. I set the starting CP to zero in actor.str (along with Abilities which also are variable based on race).

Now I am attempting to determine how/where in thing_races.dat I can modify the CP and ability count for the selected race.

Here is what I have which does not work.
Code:
	<thing
	  id="racTerran"
	  name="Terran Human"
	  compset="Race"
	  isunique="yes"
	  description="These humans originate from the home world of humans, Terra. They gain +1 APP, +1 LUK, and -1 WIL. Terran Humans have 3 variance points and gain two Talents.">
	  <eval value="1" phase="PreTraits" priority="5000">
		<before name="Calc trtFinal"/><![CDATA[
		#traitbonus[attrApp] += 1
		#traitbonus[attrLuk] += 1
		#traitbonus[attrWil] -= 1
		~#acVariance = 3
		~#acTalents = 2
		]]></eval>
	</thing>

acVariance is the renamed acStartCP and acTalents is acStartAbi. Any guidance in this area would be appreciated.
 
Code:
herofield[acVariance].value = 3
herofield[acTalents].value = 2

Or, to show the full path to that field:
Code:
hero.child[actor].field[acVariance].value = 3
hero.child[actor].field[acTalents].value = 3

Here's an article that discusses what the dots and the elements between the dots mean: http://forums.wolflair.com/showthread.php?t=21663
 
Would this also work for modifying starting cash via a talent/ability such as a "Wealthy" that gives some multiple of starting cash? I expect it would.
 
Code:
herofield[acVariance].value = 3
herofield[acTalents].value = 2

Or, to show the full path to that field:
Code:
hero.child[actor].field[acVariance].value = 3
hero.child[actor].field[acTalents].value = 3

Here's an article that discusses what the dots and the elements between the dots mean: http://forums.wolflair.com/showthread.php?t=21663


This compiled and loaded with no errors, but it does not seem to affect the values. CP remains at 0 in the header, and abilities/talents show 0/0. Selecting a talent triggers the overspending validation error.
 
As an update, it works in the ability to modify starting cash. But it does not seem to affect acVariance and acTalents.

I had to set them to "derived" rather than "user".
 
Back
Top