![]() |
Senior Member
Join Date: Nov 2009
Posts: 891
|
Sometimes it is desirable to have a value show up with a given Edge or racial ability.
At this time it does not appear that Savage Worlds has access to Pathfinder's abValue field, which is a value that can be added to by other sources (such as other edges). So far I have only tested it with the Traits 5000, in anticipation to potentially linking it to attribute values, and it works. Here is what I did to a replaced version of the Command edge. Code:
var CommRad as number CommRad = 5 if (hero.tagis[Edge.edgComPres] = 1) then CommRad += 5 endif field[livename].text = field[thingname].text & " (Radius: " & CommRad & ")" Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
![]() |
![]() |
Senior Member
Join Date: Nov 2009
Posts: 891
|
Some settings and/or house rules might want a more fluid amount of Major and Minor Hindrances. Instead of requiring a set number you can base it on a targeted maximum Reward Point value.
To get this to work I used a replace Thing ID for valHinders, which is a Simple called Hindrances. In the first Eval Rule script, I changed the equations for the ~RDS SWD Max Major and Max Minor are now dynamic values In this example I decided on a maximum of 10, which can be 5 Major Hindrances, 10 Minor Hindrances, or any combination that equals 10 Reward Points. Code:
var major as number var minor as number ~iterate through all hindrances and tally up the number of majors and minors ~Note: We must only tally hindrances that are user added and not an advance. foreach pick in hero from Hindrance if (eachpick.isuser + !eachpick.tagis[Advance.?] >= 2) then if (eachpick.field[hinMajor].value = 0) then minor += 1 else major += 2 endif endif nexteach ~determine our maximum number of major and minor hindrances var max_major as number var max_minor as number ~RDS SWD Max Major and Max Minor are now dynamic values max_major = minimum(major, 10) max_minor = minimum(minor, 10 - max_major) ~if we have no more than our maximum major and minor hindrances, we're good if (major <= max_major) then validif (minor <= max_minor) endif ~synthesize our validation message appropriately @message="Maximum of " & max_major & " points worth of major and " & max_minor & " points worth of minor hindrances allowed" ~mark associated tabs as invalid container.panelvalid[edges] = 0 ~assign a tag to the hero to indicate the invalid state ~Note: This is used to color highlight the title above hindrances on the tab. perform hero.assign[Hero.BadHinders] Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
![]() |
![]() |
Senior Member
Join Date: Feb 2010
Posts: 874
|
From Caped Crusader, a note about how to make sure someone can take a normal amount of Hindrances if their racial template already gives them one:
Code:
#resmax[resHinder] += 1 (or 2 if it's Major) |
![]() |
![]() |
Senior Member
Join Date: Nov 2009
Posts: 891
|
I just came up with an even more efficient code for enforcing Novice and character creation and for enforcing the Rank while choosing Advances.
It can also be used with an alternate XP table. All that you have to do (as far as Rank is concerned) is change the value of xpPerRank in this code and you are done. You would possibly have to alter the number of Advances in a different Eval script. I spread out the code a bit so that it is easier for us to read. Phase: Final Priority: 5010 Code:
var endRank as number var xpPerRank as number var advPerRank as number var advCount as number var xp as number var xpRank as number var rankCount as number var endRank as number xpPerRank = 20 advPerRank = xpPerRank / 5 advCount = 0 xp = hero.child[resXP].field[resMax].value xpRank = xpPerRank rankCount = 0 endRank = 0 ~ Check for spent Advances foreach pick in hero from Advance sortas _CompSeq_ advCount += eachpick.field[advCost].value nexteach ~ Determine Rank based on current Advance ~ Seasoned rankCount = advPerRank -1 if (advCount >= rankCount) then if (xp >= xpRank) then endRank = 1 endif endif ~ Veteran rankCount = rankCount + advPerRank xpRank = xpRank + xpPerRank if (advCount >= rankCount) then if (xp >= xpRank) then endRank = 2 endif endif ~ Heroic rankCount = rankCount + advPerRank xpRank = xpRank + xpPerRank if (advCount >= rankCount) then if (xp >= xpRank) then endRank = 3 endif endif ~ Legendary rankCount = rankCount + advPerRank xpRank = xpRank + xpPerRank if (advCount >= rankCount) then if (xp >= xpRank) then endRank = 4 endif endif ~ Apply the Rank herofield[acRank].value = endRank Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
![]() |
![]() |
Senior Member
Join Date: Nov 2009
Posts: 891
|
There are times that you will want a Racial Ability or an Edge make it so that you can ignore the Rank requirements for certain edge types.
For the first example, I made a Racial Property that ignores the Rank requirement for all Combat edges. I figured that it was a good racial property to give a particularly warlike race/culture. It has two Eval scripts. Phase: Validation Priority: 100 Code:
foreach pick in hero from Edge where "EdgeType.Combat" perform assign[Helper.IgnoreRank] nexteach Priority: 200 Code:
foreach thing in Edge where "EdgeType.Combat" var ignoretag as string ignoretag = "IgnoreRank." & eachthing.idstring perform hero.assignstr[ignoretag] nexteach It also requires two eval scripts to work. They are similar to above, but the priority of the Initialization had to change because it is from an edge. Phase Validation Priority 100 Code:
foreach pick in hero from Edge where "EdgeType.Leadership" perform assign[Helper.IgnoreRank] nexteach Priority 2101 Code:
foreach thing in Edge where "EdgeType.Leadership" var ignoretag as string ignoretag = "IgnoreRank." & eachthing.idstring perform hero.assignstr[ignoretag] nexteach Evil wins because good rolls poorly .... or the players are not paying enough attention to the game. |
![]() |
![]() |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2007
Posts: 591
|
Here is the code to raise the max cap on an Attribute.
Pre-Traits/5000 Code: Code:
#traitbonus[attrStr] += 1 hero.child[attrStr].field[trtMaximum].value += 1 Calc trtFinal Last edited by dartnet; November 27th, 2016 at 06:23 PM. |
![]() |
![]() |
Member
Join Date: May 2012
Location: Reading, UK
Posts: 79
|
Bootstrapping Vs AutoAdd
So we've all seen and played with Bootstrapping one Thing to another, lets call them Thing 1 and Thing 2. This adds Thing 2 to a character as long as Thing 1 is attached and can never be removed. Sometimes useful, mostly... not so much. What happens if we want to automatically some equipment or an injury that should later be removable, or add a skill to someone when they pick up an object, but keep it when they drop the object again? This is where AutoAdd comes into play Code:
<autoadd thing="injACSLoss" portal="peInjury"></autoadd> For simplicity sake, here's the list of available portals... assuming you've not created any of your own. You'll notice that the portals are prefixed with the tab abbreviation, e.g. ba for Basic, sk for Skills etc. etc. Basics tab - baAttrib - This is the Attributes panel - baTrait - This is the Derived Traits panel - baRank - This is the character Rank - baCreation - Shows character creation details (Advances, edges, hindrance points etc.) - baStatus - Shows the current status (encumrance/load limit) Skills tab - skSkills - shows the list of current skills - skLangs - Shows the Languages panel Edges tab - edEdges - Shows the Edges area - edHinders - Shows the hindrances area - edRewards - shows the rewards area Arcane Tab - apPowers - Lists all powers Armoury tab - arMelee - shows the Melee weapons section - arRange - shows the Ranged weapons section - arSpecial - Special weapons - arDefense - Defensive items Gear tab - grGear - Misc gear area - grGizmos - Weird science gear - grVehicle - Vehicles Advances tab - adAdvances - Selected advances Personal tab - peImages - Shows image - peInjury - Shows the Temporary injuries - peAdjust - Permanent Adjustments The other personal information seems to come from elsewhere and is included using the Thing mscPerson Allies - alAllies - Shows the list of allies Journal - jrTitle - This is just a title according to the code comments - Journal - This is a table to add new journal entries In-Play - ipTracker - This is where you'd add new trackers - ipActive - This is the list of active abilities - ipFCActiv - This is a list of the magic item powers for the character - ipFCActiSh - This is for Fantasy Companion Magic item skill bonuses - ipFCActivE - Lists active Edges - ipFCActiPh - Fantasy Companion Magic Item granted powers with a header - ipSPCActih - Lists the active super powers with a header - ipAdjust - Shows any adjustments Special tab - spSpecial - Lists all special traits Working on: Official Achtung! Cthulhu datafiles |
![]() |
![]() |
Member
Join Date: May 2012
Location: Reading, UK
Posts: 79
|
Something else that came up tonight that I've meant to put in here before.
If you are just writing and testing on a Windows environment, you may not see these problems, but the Mac client (much like the OS) is case sensitive and *demands* perfect match. This can explain some errors you may encounter with errors that appear to be syntactically correct. Working on: Official Achtung! Cthulhu datafiles |
![]() |
![]() |
Senior Member
Join Date: Mar 2007
Location: Muskegon, MI
Posts: 2,975
|
Everything in Hero Lab is case sensitive.
|
![]() |
![]() |
Member
Join Date: May 2012
Location: Reading, UK
Posts: 79
|
It should be, yes, but I've encountered this problem a few times when developing or testing something on my windows machine works and testing on the mac where it doesn't. In every case it has been case sensitivity.
Working on: Official Achtung! Cthulhu datafiles |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|