+- +-

+-User

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

+-Stats ezBlock

Members
Total Members: 144
Latest: G-music
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 715
Total Topics: 345
Most Online Today: 6
Most Online Ever: 20
(June 30, 2017, 12:18:50 AM)
Users Online
Members: 0
Guests: 4
Total: 4

Author Topic: Intelligent Blademaster Bugfix  (Read 2477 times)

MagicSN

  • Administrator
  • Jr. Member
  • *****
  • Posts: 79
    • View Profile
Intelligent Blademaster Bugfix
« on: December 27, 2012, 09:06:06 AM »
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

  • Administrator
  • Sr. Member
  • *****
  • Posts: 260
    • View Profile
Re: Intelligent Blademaster Bugfix
« Reply #1 on: December 28, 2012, 12:05:00 AM »
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

  • Administrator
  • Sr. Member
  • *****
  • Posts: 260
    • View Profile
Re: Intelligent Blademaster Bugfix
« Reply #2 on: December 28, 2012, 12:09:36 AM »
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

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: Intelligent Blademaster Bugfix
« Reply #3 on: August 15, 2014, 05:27:54 PM »
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.

Code: [Select]
<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

  • Administrator
  • Sr. Member
  • *****
  • Posts: 260
    • View Profile
Re: Intelligent Blademaster Bugfix
« Reply #4 on: September 18, 2014, 11:06:48 PM »
Nice, added your fix to the compiled data files...

 

+-Recent Topics

Invoker Damage stats by Charlie
September 08, 2018, 07:55:52 PM

Max hit points by Charlie
September 05, 2018, 10:05:12 PM

I have run into a problem with Power class types by SAbel
August 18, 2018, 11:43:05 PM

Demon Spawn by Charlie
August 18, 2018, 06:51:37 PM

GenCon 2018 by SAbel
August 10, 2018, 01:10:30 AM

War Wizard's Expertise by SAbel
July 14, 2018, 09:26:27 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

Powered by EzPortal