+-+-

+-User

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

+-Stats ezBlock

Members
Total Members: 272
Latest: Fetjeavy
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 762
Total Topics: 372
Most Online Today: 15
Most Online Ever: 496
(December 10, 2025, 03:07:26 AM)
Users Online
Members: 0
Guests: 7
Total: 7

Script to replace key attribute for certain powers

Started by Fox Lee, March 23, 2013, 01:13:38 AM

Previous topic - Next topic

Fox Lee

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.


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.

+-Recent Topics

adecuada kosongibu hostilely szafe by Fetjeavy
April 13, 2026, 05:07:06 PM

ремонт стиральных машин by remont_kbOa
December 21, 2025, 03:46:24 PM

Селектор онлайн — пространство, где страсть становится вдохновением by CharlesImmEk
March 06, 2025, 08:58:34 AM

Купить Экстази и МДМА в Украине? САЙТ - KOKAINES.STORE Купить Экстази и МДМА Кие by DavidgfeTashy
February 04, 2025, 06:27:35 PM

What Are the Top 3 Skills for Remote Work in 2024? by JamesQuorp
January 27, 2025, 01:00:47 PM

Корисні відомості для українських громадян, які збираються створити свою справу by AliceResia
January 05, 2025, 12:21:29 PM

4e wont open due to duplicate files error by Fox Lee
April 14, 2024, 01:01:14 AM

Community Data files update 2023-02-16 by Tdotku1911
September 28, 2023, 08:52:54 PM

Errors from last update by jrmcnz
July 17, 2023, 03:30:56 PM

Community Data files update 2023-04-28 by Fox Lee
April 27, 2023, 09:40:45 PM

3rd Party - Zeitgeist character options by Fox Lee
March 25, 2023, 03:21:38 AM

Community Data files update 2023-03-25 by Fox Lee
March 25, 2023, 02:46:40 AM

Our Unofficial Update for Hero Lab 4e by jklagenberg
February 11, 2022, 09:00:52 AM

Kensei Focus - Paragon Path Feature by Charlie
October 21, 2020, 10:13:36 PM

Warlord Scraper Error Fixes by Fox Lee
April 03, 2020, 08:05:51 PM

Herolab 4e Themes Modification by Cryptoknight
July 27, 2019, 02:47:44 AM

Themes Collection by Cryptoknight
July 27, 2019, 02:47:44 AM

Feats Bug Fixes Package by Cryptoknight
July 27, 2019, 02:47:44 AM

Darksun Themes Package by Cryptoknight
July 27, 2019, 02:47:44 AM

Defensive Feats by Cryptoknight
July 27, 2019, 02:47:44 AM

Theme Framework for HeroLab 5 / 4e 4.0 - .HL version by Daphne
July 27, 2019, 02:47:44 AM

2014 09 20 Release by Cryptoknight
July 27, 2019, 02:47:44 AM

2014-09-29 Download by Cryptoknight
July 27, 2019, 02:47:43 AM

2014 11 13 Download by Cryptoknight
July 27, 2019, 02:47:43 AM

Hybrid Battlemind not working as it should by Sean Abel
July 27, 2019, 02:45:49 AM

Powered by EzPortal