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: 272
Latest: Fetjeavy
New This Month: 2
New This Week: 0
New Today: 0
Stats
Total Posts: 762
Total Topics: 372
Most Online Today: 83
Most Online Ever: 496
(December 10, 2025, 03:07:26 AM)
Users Online
Members: 0
Guests: 33
Total: 33

Berserker (Barbarian)

Started by dracusmage, August 06, 2014, 02:25:10 PM

Previous topic - Next topic

dracusmage

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

dracusmage

#1
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.

dracusmage

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.


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:

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

#3
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:
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.

dracusmage

#4
It now works, mostly, sorta.
      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.

dracusmage

      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

Victory!
    <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

Thanks so much for your work on this!

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

+-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