+- +-

+-User

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

+-Stats ezBlock

Members
Total Members: 125
Latest: Avhagapaphice
New This Month: 3
New This Week: 1
New Today: 0
Stats
Total Posts: 672
Total Topics: 332
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: Berserker (Barbarian)  (Read 2399 times)

dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Berserker (Barbarian)
« on: August 06, 2014, 02:25:10 PM »
Barbarian sub-type Berserker doesn't exist. Berserker is the Striker/Defender type of Barbarian from "Heroes of the Feywild".

TL;DR: It works as far as I can tell, here it is: http://hl4e.cryptoknight.org/index.php?action=downloads;sa=view;down=183
« Last Edit: August 21, 2014, 04:08:27 PM by dracusmage »

dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: Berserker (Barbarian)
« Reply #1 on: August 08, 2014, 06:28:30 PM »
I've got this mostly working. I'll do some more edge testing once I have it all working as it should at simpler settings.

As a side question, should I keep everything related to Berserker in the same file, or should I have them broken out by type? I had been working on it as a Class.Berserker and a separate Power.Berserker, but I combined them to make for easier downloading.

If anyone knows how to fix any of these, feel free to take over. I'll probably leave it until Monday at least. Or if you have direction I should look, I would be thrilled. I've got some sparse comments in the file if you like to work on it with typing rather than the editor.

Remaining issues:
Power Source should be both Martial and Primal, but when you put two sources in the code, it looks funny. I can't tell if this actually does anything beyond tell the user what it does, so for now I've left just the primary source intact, with the remainder in the fluff text area.

Class Role should have both Defender and Striker, but just like with Power Source, it looks funny. I've left it as just Defender for now, and worked around with clever use of the fluff text portion to show the rest.

I added an alternate Basic Melee attack power to show the extra damage if raging. I would like to hide the standard Basic Melee power when this is turned on, but for now they are both there. Does anyone know how to hide a different skill from an eval or bootstrap? Without modifying the original power too I can't see how to do it, and that seems like overkill for something that is in essence vanity.

All options give their bonuses as they should, except for the Temperate Land "Homeland" option. It should give a bonus to damage when wielding a One handed weapon and a shield, but it currently doesn't do that. Also it should give a bonus to speed when charging, but I'm not sure how to code that, as my wild stab didn't do the trick. My idea of looking at Butterfly Sandals to see how those add a special speed bonus didn't work to my advantage. I guess if I figure out how to code a special move bonus I can apply that to fixing the Sandals too.
« Last Edit: August 15, 2014, 07:46:01 PM by dracusmage »

dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: Berserker (Barbarian)
« Reply #2 on: August 14, 2014, 06:20:49 PM »
I'm still stuck trying to get the last build option to work. Ignoring the charge bonus, because that's a simple math problem for the end user, I really want to get the one handed weapon with shield damage bonus to calculate out. I've tried two different tacts, and neither of them adds the damage bonus.

Code: [Select]
var armor as number
var weapon as number
~perform hero.findchild[Armor,"Equipped.Equipped & Armory.Shield"].setfocus
perform hero.findchild[Shield,"Equipped.Equipped"].setfocus
armor = state.isfocus
perform hero.findchild[Equipment,"Equipped.Equipped & Equipment.TwoHand"].setfocus
weapon = state.isfocus
      if (armor <> 0) then
if (weapon = 0) then
foreach pick in hero from WeapMelee
perform eachpick.field[wpDamage].modify[+,2,""]
nexteach
endif
      endif
What this should do is make sure that the hero has a shield equipped, and puts that result in a variable to check later. The two lines that are similar with one commented out is that I found two ways in the existing code that it is done. I've tried both. Then it tests to see if they have a two handed weapon equipped, and puts that in a separate variable. Then the Ifs come out. If the user has a shield, it continues, otherwise nothing. If the user has no two handed weapon, then we get to the prize. It should go through each weapon on the hero, and give it a +2 to damage. This will probably give bonuses to all kinds of extra weapons that we don't want it given to, but I would settle for getting it to work at all before getting it to work better.

Alternately:
Code: [Select]
var mainhand as number
var offhand as number
var twohand as number
   foreach pick in hero from WeapMelee
      if (eachpick.tagis[Helper.EqpMain] <> 0) then
         mainhand = 1
      endif
      if (eachpick.tagis[Helper.EqpOff] <> 0) then
         offhand = 2
      endif
      if (eachpick.tagis[Helper.EqpBoth] <> 0) then
         twohand = 2
      endif
      nexteach
doneif (mainhand + offhand + twohand <> 1)
foreach pick in hero from WeapMelee
   perform eachpick.field[wpBonus].modify[+,2,""]
   nexteach
This version is a little more straight forward, but also doesn't work. This one checks to see if a weapon has be set as Main/Off/Both in the special tab. If at least one is set as main, the main variable gets a 1. If any of the weapon options is set as offhand (or two-handed), it puts a 2 in the offhand (or twohand) variable. It then adds them all together to make sure it is only 1, and not some other number that doesn't specify Main hand weapons. If it doesn't add to 1, then it stops the process, otherwise it lets it finish the last bit of code. Where it once again changes the damage bonus portion of each melee weapon that the hero has.

Or at least it should, but does not. Does anyone have any ideas? I'm not even being clever or anything with this code. It's all stuff that I've just found and slightly modified (the second one is almost entirely the Fighter's Tempest Technique (fFtrTemTec) if you want to look at it.

dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: Berserker (Barbarian)
« Reply #3 on: August 15, 2014, 07:58:10 PM »
I've stopped the Poised Defender bonus from being auto added to the AC if eligible, because it's better to go up 2 when the aura is active, rather than down 2 when the aura is inactive (since the aura needs to be activated anyway). I've added a notice to the user that it is not included so that they will know to add it themselves (this is due to a user who did not know this, and ran his berserker at all times at -2 ac).

I've also figured out how to hide the standard Basic Melee Attack, allowing me to have a substitute version with more information (rage damage) without confusing the user as to why there are two versions. In case you are curious, that eval code is this:
Code: [Select]
perform hero.childfound[pwBasicMel].assign[Hide.Special]That code finds the Basic Melee Attack, then gives it the code that makes it disappear from the Special tab. It still shows up on the power list in the character print out, but not in the cards. I'm ok with that.

Power Source and Class Role still don't have both, and I still don't know how to make the Temperate add the extra damage when using a one-hand and shield. Everything else is ship-shape.
« Last Edit: August 21, 2014, 02:52:05 PM by dracusmage »

dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: Berserker (Barbarian)
« Reply #4 on: August 21, 2014, 03:20:45 PM »
It now works, mostly, sorta.
Code: [Select]
      doneif (activated = 0)
  ~If no shield equipped, then no bonus.
  ~If more than 1 shield then not valid.
  doneif (hero.tagcount[Shield.?] <> 1)

  foreach pick in hero from WeapMelee
doneif (eachpick.tagis[Helper.EqpOff] + eachpick.tagis[Helper.EqpBoth] <> 0)

perform eachpick.field[wpDamage].modify[+,2,""]
  nexteach
This is a very nice, clean implementation, and it mostly does the right thing. It tests to make sure there is a shield equipped, using the validation code from the armory tab.
Then it looks at each weapon in turn. If it is not equipped on the off hand or with both hands (but not necessarily with the main hand), then it gets +2 damage. Then it moves onto the next weapon. And so on until it reaches a weapon that is equipped in the wrong place. Then it stops giving bonuses.
This means that the alphabetically first weapon is equipped with two hands or in the off hand, no weapon gets a bonus. Or if there are no weapons equipped, or each weapon that is equipped is equipped with just the main hand, then every weapon gets the +2 damage, including unarmed strike, and any two handed weapons you may have in your inventory but not equipped. This modifier is put on the character sheet too. So if, for example, you have an Alhulak in your main hand in equip slot 2, and a dagger in your off hand in equip slot 1, the Quarterstaff in your inventory doesn't get a damage bonus, because it comes after dagger. If you have a Falchion in your inventory, and a Quarterstaff equipped with 2 hands, then the Falchion gets the +2 damage (in spite of being a weapon you could never wield and get the bonus) but the Quarterstaff and after does not.
I'll see if I can make it grab just the weapons in the equipped slots (Special Tab Equipped Items 1, 2, and 3) do the test on those, then give the bonuses just to those. For now though, it at least gives the bonus at all.
« Last Edit: August 21, 2014, 03:29:04 PM by dracusmage »

dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: Berserker (Barbarian)
« Reply #5 on: August 21, 2014, 03:33:27 PM »
Code: [Select]
      doneif (activated = 0)
  ~If no shield equipped, then no bonus.
  ~If more than 1 shield then not valid.
  doneif (hero.tagcount[Shield.?] <> 1)
 
  foreach pick in hero from WeapMelee
  if (eachpick.tagis[Helper.EqpOff] + eachpick.tagis[Helper.EqpBoth] = 0) then
if (eachpick.tagis[Helper.EqpMain] = 1) then
perform eachpick.field[wpDamage].modify[+,2,""]
endif
endif
  nexteach
Now it only gives the bonus if the weapon is equipped on the main hand, and also not equipped as both or off. This is needed to prevent weapons from being equipped correctly once and invalidly also (versatile weapons, such as Longsword, where it may be used either one handed or both handed for a slight damage bonus). Need to also check to prevent weapons with two heads from being only equipped on the main hand and not the off hand, thus getting a bonus that they shouldn't have.

dracusmage

  • Jr. Member
  • **
  • Posts: 76
    • View Profile
    • 4e Source Files and Documentation
Re: Berserker (Barbarian)
« Reply #6 on: August 21, 2014, 04:06:57 PM »
Victory!
Code: [Select]
    <eval phase="Traits" priority="10000"><![CDATA[
      doneif (activated = 0)
  ~If no shield equipped, then no bonus.
  ~If more than 1 shield then not valid.
  doneif (hero.tagcount[Shield.?] <> 1)
 
  foreach pick in hero from WeapMelee
  if (eachpick.tagis[Helper.EqpOff] + eachpick.tagis[Helper.EqpBoth] = 0) then
if (eachpick.tagis[Helper.EqpMain] = 1) then
if (eachpick.tagis[WepProp.Double] + eachpick.tagis[WepGroup.wgUnarmed] < 1) then
perform eachpick.field[wpDamage].modify[+,2,""]
endif
endif
endif
  nexteach
      ]]>
      <after name="Build option activated"/>
      </eval>
It gives a bonus, only when there is a shield, and only to weapons that are equipped on the main hand, and are not also equipped otherwise, and are not double weapons with just half equipped, and are not unarmed attacks. Reordering the If tree may make for more efficiency, but I'm a little too burned out on this code to want to think about it. Also, it would be such a small bonus, it's probably not worth the time. I've probably just typed about it for more time than an un-optimized if tree would waste everyone who will ever use this class forever.

http://hl4e.cryptoknight.org/index.php?action=downloads;sa=view;down=183

Cryptoknight

  • Administrator
  • Sr. Member
  • *****
  • Posts: 260
    • View Profile
Re: Berserker (Barbarian)
« Reply #7 on: September 20, 2014, 09:55:39 PM »
Thanks so much for your work on this!

I've included it in the release I'm trying to get together :)

 

+-Recent Topics

Making Utility Powers? by dmayhew469
July 07, 2017, 02:11:16 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

Add the INit modifier for Battle Harness by dmayhew469
June 15, 2017, 08:27:12 PM

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

How to allow resistance show up by dmayhew469
June 12, 2017, 04:05:57 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

As we look at Making Card Headers correct colors by dracusmage
February 23, 2017, 03:24:01 PM

Question Involving Twofold Pact for Warlock by dracusmage
February 16, 2017, 02:52:32 AM

Daily Powers by Charlie
February 15, 2017, 06:31:00 PM

Missing Fighter? by dracusmage
February 13, 2017, 10:41:45 PM

Armor at Paragon and above by dracusmage
February 13, 2017, 06:52:16 PM

Help applying bonus damage (x + modifier) to class powers by Fox Lee
January 18, 2017, 06:16:49 AM

Cavalier Summon Steed Patch by Fox Lee
January 15, 2017, 01:00:56 AM

Fey Beast Companions (HotF) by Fox Lee
January 12, 2017, 07:49:08 PM

Has anyone worked with the Warlock (Binder) by SAbel
December 29, 2016, 11:43:17 PM

I will be posting an update soon by SAbel
December 24, 2016, 01:32:41 AM

Weapon Critical damage display by Paragon
December 02, 2016, 06:05:46 PM

Powered by EzPortal