News:

Welcome to the Herolab 4e user added support site.

Main Menu
+-+-

+-User

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

+-Stats ezBlock

Members
Total Members: 266
Latest: servisnyy_etSi
New This Month: 4
New This Week: 4
New Today: 0
Stats
Total Posts: 760
Total Topics: 370
Most Online Today: 134
Most Online Ever: 486
(October 05, 2025, 05:27:10 PM)
Users Online
Members: 0
Guests: 5
Total: 5

Intelligent Blademaster Bugfix

Started by MagicSN, December 27, 2012, 09:06:06 AM

Previous topic - Next topic

MagicSN

Hello!

I found out "Intelligent Blademaster"'s effect on Basic Melee is not correctly implemented. Due to the way Hero Lab works, it cannot be implemented by a user file (user files cannot replace Basic Melee as the system then complain "it is already in use"). I solved the issue by directly editing ddi_powers.dat (which is just an XML file). But I think this Bugfix should go into the next version of the data files from WolfLair as such a direct editing of a .dat file is an "ugly" solution.

Here is how to fix it:

Look in ddi_powers.dat for pwBasicMel and replace it with this (basically you only need to change the Script part):

  <thing id="pwBasicMel" name="Basic Melee" description="A basic melee attack." compset="Power">
    <fieldval field="pwTarget" value="One creature"/>
    <tag group="Helper" tag="Bootstrap"/>
    <tag group="ActionType" tag="Standard"/>
    <tag group="ReqLevel" tag="1"/>
    <tag group="AttackType" tag="MeleeWep"/>
    <tag group="Attack" tag="attrStr"/>
    <tag group="DamageAttr" tag="attrStr"/>
    <tag group="AttackVs" tag="defAC"/>
    <tag group="PowerAcc" tag="Weapon"/>
    <tag group="PowerType" tag="AtWill"/>
    <tag group="Damage" tag="Weapon1"/>
    <containerreq phase="Initialize" priority="0">
      !source.HideBasic
      </containerreq>
    <eval phase="Traits" priority="10000"><![CDATA[
if (#level[] >= 21) then
  perform delete[Damage.Weapon1]
  perform assign[Damage.Weapon2]
  endif

  if (hero.childexists[ftIntelBla] <> 0) then
   if (#attrbonus[attrInt]>#attrbonus[attrStr]) then
    var attidstr as string
    attidstr = "attrInt"
    perform deletestr["DamageAttr.attrStr"]
    perform deletestr["Attack.attrStr"]
    perform assignstr["DamageAttr." & attidstr]
    perform assignstr["Attack." & attidstr]
   endif
  endif

]]></eval>

Cryptoknight

Two things.

1. The error message that pops up is OK.  You can in fact allow it and have it delete the item and re-add it from the character (or that's what I've been told before).  It's just an error that pops up because you're overriding a power that's on the currently loaded profile.

2.  You can edit the .dat file in the editor as well and change the power, but the next run of the downloader will override it.

Cryptoknight

In fact I was working on that problem before (I had forgotten) and I already had a basic melee attack power that overrode the basic melee attack.

I added your code to it (which works great) and when I saved and tested I got the same error about deleting and re-adding.

I then went to Develop and chose quick compile.  When it reloaded, my swordmage now works correctly.

The hard one will be the Melee Training and the 1/2 damage from the stat trick.

dracusmage

I'm sorry for resurrecting this, but I thought I should put my 2 copper in on this. It seems that replacing "Basic Melee Attack" is heavy handed and prone to cause future problems when someone else decides that the best way to fix another issue is to do it too. Also, if we put the fix into the attack, it means we have to do some checking to see if the feat exists.

Instead what I did was fixed the feat. This has the benefit of not changing anything unless the feat is actually picked, and means that if someone else needs to make a change to Basic Melee, they don't need to add another fix on top, or release a different incompatible fix.

I also fixed the script so that it does some paranoid checking on the off chance that we are using something else that also changes the basic attack stat.


<eval phase="Traits" priority="10000"><![CDATA[
perform hero.child[pwBasicMel].setfocus
var text as string
var current as number
text = focus.tagids[DamageAttr.?]
current = hero.findchild[Attribute,text].field[attrBnBase].value
if (#attrbasebonus[attrInt] > current) then
perform focus.delete[DamageAttr.?]
perform focus.delete[Attack.?]
perform focus.assign[DamageAttr.attrInt]
perform focus.assign[Attack.attrInt]
endif
]]>
<after name="Calc attrBnBase"/>
</eval>


What this will do is grab whatever the Attribute being used for Basic Melee currently is, check it against Int to see which one is better, then if Int is better, replace whatever is currently the attribute (probably Str, but maybe something else) with Int. I don't know if other feats are this courteous, but this one will not cause a problem.

Did you ever get the Melee Training you mentioned handled?

Cryptoknight

Nice, added your fix to the compiled data files...

+-Recent Topics

Селектор онлайн — пространство, где страсть становится вдохновением 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

Please read this and weigh in - Issue/Source/Document Version Control System by nixxrite
March 29, 2019, 07:14:36 AM

Items, Feats and Magic Armour calculations not working by Charlie
March 28, 2019, 01:13:14 PM

Powered by EzPortal