+- +-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Stats ezBlock

Members
Total Members: 138
Latest: KindredSpirit
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 707
Total Topics: 342
Most Online Today: 4
Most Online Ever: 20
(June 30, 2017, 12:18:50 AM)
Users Online
Members: 0
Guests: 2
Total: 2

Author Topic: Script to replace key attribute for certain powers  (Read 1139 times)

Fox Lee

  • Newbie
  • *
  • Posts: 31
  • She Bites
    • View Profile
    • Invincible Ink
Script to replace key attribute for certain powers
« on: March 23, 2013, 01:13:38 AM »
Priority: 4000
Phase: Final
(I don't understand timing very well, so the above may not be optimal - however, they do work in my HL).

Somewhat borrowed from Cryptoknight's script to assign highest attribute, but I needed something that would work on powers that already had an attribute, such as might ne modified by a feat or build option.

Example is for a homebrew feat that allows a certain race to convert strength-based Warlord powers into Wisdom-based instead.

Code: [Select]
foreach pick in hero from Attack where "PowerClass.clsWarlord"
    if (eachpick.tagis[Attack.attrStr] <> 0) then
      perform eachpick.deletestr["DamageAttr.attrStr"]
      perform eachpick.deletestr["Attack.attrStr"]
      perform eachpick.assignstr["DamageAttr.attrWis"]
      perform eachpick.assignstr["Attack.attrWis"]
      endif
   nexteach

Better scripters might know of a "replace" action that could tidy up the delete/assign pattern, but this is still functional.

Obviously you can check for other situations by replacing "PowerClass.clsWarlord" and "Attack.attrStr" with your desired conditions, and changing the deleted/assigned attributes appropriately. Official (and less ablative) in-game uses would be for things like Skald's Deceptive Duelist feature, Half-Elf's Adept Dilettante feat, which I am working on adapting it to now.
« Last Edit: March 23, 2013, 01:15:23 AM by Fox Lee »

 

+-Recent Topics

War Wizard's Expertise by SAbel
July 14, 2018, 09:26:27 AM

GenCon 2018 by SAbel
July 14, 2018, 12:17:41 AM

Rhythm Blade by SAbel
July 13, 2018, 11:07:16 PM

Critical hit damage by SAbel
July 05, 2018, 09:28:40 PM

Summoned and companion ect by SAbel
July 05, 2018, 09:26:46 PM

Druids by SAbel
July 05, 2018, 09:24:16 PM

Add the INit modifier for Battle Harness by SAbel
July 05, 2018, 09:19:35 PM

Making Utility Powers? by SAbel
July 01, 2018, 09:12:03 PM

Race Rebuild (All) by SAbel
July 01, 2018, 09:05:34 PM

Hero Lab v8.5 messed up 4e by Charlie
April 30, 2018, 11:03:57 PM

Color for Encounter Powers by Charlie
March 10, 2018, 10:57:11 PM

How to allow resistance show up by Charlie
December 06, 2017, 12:56:04 AM

Total Newb... but... by Johnny B Evil
November 26, 2017, 07:52:48 AM

Feat Valenar Weapon Training by Eldyn
October 13, 2017, 08:53:03 PM

4e license question by Cryptoknight
June 25, 2017, 09:28:29 PM

Remove/increase limit on Temporary Adjustment value? by Fox Lee
June 22, 2017, 07:30:45 PM

Change Attack Ability by dmayhew469
June 15, 2017, 07:57:20 PM

Would somebody like to take this over? by dmayhew469
June 09, 2017, 02:02:12 PM

Inherent Bonuses by dmayhew469
June 09, 2017, 01:59:28 PM

No Class or Race options by rkjanik
June 06, 2017, 01:57:21 AM

Spy by Mckinley
May 25, 2017, 02:06:57 AM

Is there a guide out for how to build a race by SAbel
May 05, 2017, 11:59:46 PM

Please read this and weigh in - Issue/Source/Document Version Control System by Charlie
April 27, 2017, 09:54:40 PM

Request Access to the CodePlex System by Charlie
March 03, 2017, 10:47:03 PM

Vampire class by Fox Lee
February 26, 2017, 05:29:29 AM

Powered by EzPortal