View Single Post
zarlor
Senior Member
 
Join Date: Nov 2010
Location: Metairie, LA, USA
Posts: 1,819

Old January 11th, 2013, 04:41 AM
To add 4 additional Skill Points:

Eval Script: Setup/8000

Code:
#resmax[resSkill] +=4
-----
To set an Edge to only be usable by a Female character:

Expr-Req
Code:
hero.child[mscPerson].field[perGender].value = 1
For Male set that value to 0.

-----

Some settings use a languages rule that says the character should have 1/2 of their Smarts in languages. This one is essentially already set up, so use an Eval Script in a Setting Adjustment as follows:

Eval Script: Initialization/1000

Code:
perform hero.assign[Hero.SmartsLang]
-----
Some settings allow the character to pick certain higher ranked Edges at character creation. The Born A Hero setting works for this, but it allows for all ranks to be ignored. Here's an example that allows for everything but Legendary Edges to show as valid if they were picked at character creation. To select, say, only Seasoned edge just remove all the other MinRank values other than MinRank.1.

Eval Script: Initialization/200

Code:
foreach thing in Edge where "(MinRank.1 | MinRank.2 | MinRank.3)"
   if (hero.tagis[mode.creation] = 1) then
      var ignoretag as string
      ignoretag = "IgnoreRank." & eachthing.idstring
      perform hero.assignstr[ignoretag] 
   endif
nexteach
This accesses a new feature that CapedCrusader graciously put into place for us where this "IgnoreRank." mechanic will allow a specific Edge to show as valid even if the character does not otherwise meet the Rank Requirements.

Next we need to make sure the Edge remains valid once we go into Advancement mode.

Eval Script: Validation/100

Code:
foreach pick in hero from Edge where "(MinRank.1 | MinRank.2 | MinRank.3)"
   if (eachpick.creation = 1) then
      perform eachpick.assign[Helper.IgnoreRank]
   endif
nexteach
-----
For adding a bonus to a trait based on Rank.

Eval Script: Pre-Traits/5000

Code:
var bonus as number
bonus = herofield[acRank].value + 1
perform #traitadjust[trCommand,+,bonus,"Valhalla Graduate"]
CapedCrusader has noted of this: "For NPC's though, since we don't know what Rank they are until everything is bought, and it can change every time something on the character changes, it has to be populated much later. So, be aware that using the acRank value can be somewhat unpredictable with NPC's."

-----
A thorny one that Erich brought up dealing with how to use the mechanic used by the Racial Property "Very Costly Atribute", but in this case trying to do it for all Knowledge skills. Knowledge skill are rather special since they are not Unique, you can have multiples of the. CapedCrusaader came through with the following code:

Eval Script: Effects/1000

Code:
foreach pick in hero from Advance where "Skill.skKnow"
  eachpick.field[advCost].value *= 2
nexteach
Eval Script: Traits/5000 Index: 2

Code:
foreach pick in hero where "Skill.skKnow"
   perform #resspent[resSkill,+,eachpick.field[trtUser].value - 1,"Hindrance Name"]
   var modifier as number
   modifier = maximum(eachpick.field[trtUser].value - eachpick.linkage[attribute].field[trtFinal].value,0)
   perform #resspent[resSkill,+,modifier,"Hindrance Name"]
nexteach
-----
To make the effects of an Edge or Hindrance show up as selectable (under the "Activated Abilities" section) on the In-Play tab check the "Activated by User?" cehckbox and enclose your code like the following:

Code:
if (field[abilActive].value <> 0) then
   herofield[acIgnWound].value += 1
endif
In this case we're using "Liquid Courage" as an example so just replace that "herofield[acIgnWound].value += 1" with the code you need for the activated ability.

-----
CapedCrusader worked out the following code for me to apply a +1 bonus to damage for all Melee attacks on a character coming from a specific Edge. This is an example of stepping through just one set of things, in this case Melee Weapons, and applying to something just to those.

Pre-Traits/5000
Code:
foreach pick in hero from WeapMelee
   eachpick.field[wpDmgBonus].value += 1
nexteach
perform hero.child[wpUnarmed].setfocus
   focus.field[wpDmgBonus].value += 1
-----
This one is an example of narrowing down to a specific set of things (like above) but then checking for and changing a further subset of those things, in this case we're going to step through Ranged Weapons, then we'll look for the ones that have the tag for a Thrown weapon and then set what the range value is for those weapons, as taken from the Mighty Throw Edge from Weird Wars: Rome:

At Pre-Traits/5000
Code:
foreach pick in hero from WeapRange
   if (eachpick.tagis[Weapon.Thrown] <> 0) then
      eachpick.field[wpShort].value = 4
      eachpick.field[wpMedium].value = 8
      eachpick.field[wpLong].value = 16
   endif
nexteach
-----
Gumbytie gave us the following for linking an existing skill to a different Attribute. In this example it's changing Fighting to work off of Smarts instead of Agility as the linked stat:

Put this at Setup/1000:
Code:
perform hero.childfound[skFighting].setlinkage[attribute,Attribute,"thingid.attrSma"]
-----
From SeelyOne in response to dartnet's request for a way to give a bonus to all Skills that are Smarts-based

Pre-Traits/5000 before Calc trtFinal

Code:
foreach pick in hero from Skill where "Attribute.attrSma"
  eachpick.field[trtRoll].value += 1
nexteach

Lenny Zimmermann
Metairie, LA, USA

Data files authored (please let me know if you see any issues with any of these if you have/use them):
Official (In the downloader)
50 Fathoms, Deadlands: Hell On Earth, Deadlands: Noir, East Texas University, Necessary Evil (requires Super Powers Companion), Pirates of the Spanish Main, Space 1889 (original file by Erich), Tour of Darkness, Weird War II, Weird Wars: Rome
Coming Eventually
Evernight (LWD has completed their review but I have some fixes to make first... although Pinnacle mentioned this might get an overhaul to SWADE so I may just wait for that first. If you just HAVE to have this now, though, just PM me)

Last edited by zarlor; November 26th, 2014 at 10:35 AM.
zarlor is offline   #3 Reply With Quote