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

Old April 24th, 2017, 09:17 AM
"Replaces Thing ID" is a GLOBAL replacement. It completely ignores source settings, so using it means you want that new thing to forever replace in ALL data files the original thing, so you should use it only in very specific situations. Normally when you want to do a replace for a specific source file you would need to put the original thing under the Preclude tab and if that original thing had other stuff that relied on it, you'd Preclude those things as well and create new versions that have the links you need to the newly created ones. Otherwise use of "Replaces Thing ID" could cause you major, major headaches down the road if you're not certain you want to use it globally for ever and ever and ever. That also means if you are creating a data file for other people to use then you should NEVER use it because it could potentially cause them major headaches if they have data files that your Replaces screws up in ways they don't like.

As to the original question there are a couple of things from the Common Code thread that might be of use for doing your #1:

Quote:
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:
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:
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
Would either of those help to get you on the right track?

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)
zarlor is offline   #4 Reply With Quote