• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Pyro feat - how do i code it?

ProphetPX

Active member
I have seen a feat on some of the open source 3.5 forums (on other sites) that have homebrew content on them, that I want to put into my own user files for Hero Lab. I do not know who created this stuff, but here is the fluff and crunch:

Pyro [General]
You’re good at lighting objects and opponents on fire.
Benefit: If you set something or someone on fire by
any means (alchemist’s fire, for example), the flames do an extra 1 point of damage per die, and the Reflex save
DC to extinguish the flames increases by +5.
Normal: Fire generally does 1d6 points of damage. A
successful Reflex save (DC 15) extinguishes it.

^^ How do I code that? I am totally new and i need help! please.

Source:
http://alcyius.com/dndtools/feats/song-and-silence-a-guidebook-to-bards-and-rogues--48/pyro--2311/index.html

How would I code this?
MY ONLY impression thus far is to just copy some of the mechanics of the eval script for Weapon Specialization, and change it to somehow search for any weapons that do FIRE typed damage, and then add +1 to each instance for as long a duration as the feat allows.

This is the code i have copied from stock PF core so far, from Weapon Spec:

Code:
      ~ If we're disabled, do nothing
      doneif (tagis[Helper.FtDisable] <> 0)

      ~ If we haven't chosen anything, get out now
      doneif (field[usrChosen1].ischosen + tagis[Target.?] = 0)

      if (tagcount[Hero.MartVersa] + hero.tagcount[Hero.MartMaster] <> 0) then
        perform field[usrChosen1].chosen.pulltags[wFtrGroup.?]
        foreach pick in hero from BaseWep
          if (eachpick.tagmatch[wFtrGroup,wFtrGroup,initial] <> 0) then
            perform eachpick.assign[Broadcast.WepSpec]
            perform eachpick.pulltags[WepSpec.?]
            endif
          nexteach
        perform hero.pushtags[WepSpec.?]
      else
        ~ Assign the appropriate tag to all weapons that meet the criteria
        var id as string
        var name as string
        call fTargetId

        foreach pick in hero where "IsWeapon." & id
          perform eachpick.assign[Broadcast.WepSpec]
          nexteach

        ~ Set our 'short name'
        field[shortname].text = "Spec: " & name
        field[sbName].text = "Weapon Specialization (" & lowercase(name) & ")"

        ~ Forward the weapon specialization tag for the weapon to the hero
        perform hero.assignstr["WepSpec." & id]
        endif

      ~ Pull the IsWeapon tag if we choose quarterstaff so that we can detect
      ~ that in the pre-req for this feat.
      if (field[usrChosen1].chosen.tagis[IsWeapon.wQtrstaff] <> 0) then
        perform field[usrChosen1].chosen.pulltags[IsWeapon.?]
        endif

The feat was designed for 3.5 but I MAINLY want a Pathfinder version of it coded (i am only ever going to code for PF for the time being) into Hero Lab.

Please keep in mind that i am a TOTAL NEWB to Hero lab, and while i AM familiar with basic XML, and OTHER object oriented scripting languages, I feel like a total babe in the woods with Hero Lab development. Thanks.
 
As I said in my answer to your previous thread, this feat would be text only because it interacts with something HL doesn't track, namely how much damage someone on fire takes. If it increased the damage fire weapons (like flamethrowers or lasers) did, then you'd have something to do, but by my reading it does not.

So, long story short, just create the feat in the editor, give it a unique ID and name, and paste the description into the description box. Save the file, and hit the blue "Test Now" button in the upper left, and you're done.
 
As I said in my answer to your previous thread, this feat would be text only because it interacts with something HL doesn't track, namely how much damage someone on fire takes. If it increased the damage fire weapons (like flamethrowers or lasers) did, then you'd have something to do, but by my reading it does not.

So, long story short, just create the feat in the editor, give it a unique ID and name, and paste the description into the description box. Save the file, and hit the blue "Test Now" button in the upper left, and you're done.

Errrrr... ok i get all that, but... by MY reading, it DOES increase the damage that all wielded fire weapons already do (but maybe only that which damage was already done, maybe not that damage which is going to be done in an impending combat round??)
How exactly is this something that HL does not track? I would think that HL could track this. I know you are more experienced than I am so i am just seeking to understand.

So, on the flip side...
How would i code it, if i do it the OPPOSITE way of what you thought?
(IE: if it was to influence any damage TO BE done, when the PC is about to act with a fire based attack)
 
If you'd prefer it to add to direct fire damage from weapons, then I would recommend you foreach through all weapons on the hero, looking for ones with the wType.Fire tag, and add +1 to their damage bonus field (dmmBonus or dmrBonus, or both depending on whether it is ranged or melee weapon).

For an example of something which does a foreach and adds to damage, check out the Skinsaw Mask (which is a magic item that adds +1 damage to all slashing weapons when equipped).
 
If you'd prefer it to add to direct fire damage from weapons, then I would recommend you foreach through all weapons on the hero, looking for ones with the wType.Fire tag, and add +1 to their damage bonus field (dmmBonus or dmrBonus, or both depending on whether it is ranged or melee weapon).

For an example of something which does a foreach and adds to damage, check out the Skinsaw Mask (which is a magic item that adds +1 damage to all slashing weapons when equipped).

hi. THANKS! YES. That is what i want. I want it for weapon type (yes, as you already showed me -- thank you!) AND i also want it for spells and other equipment items that can also cause fire damage of ANY kind.

I just copied the eval script from Skinsaw mask and am working on it now -- GREAT TIP!
How would I extend the script to apply the +1 fire damage to other things BESIDES weapons? like even NATURAL attacks (ie: monk fists with fire, or breath weapons, or oil flask explosions, or torches, or fire type spells and SLAs, etc etc...)

what are the various attack types or where can i find a list of them all?
That way i can just extend the script to cover all bases that the feat applies to :D
 
oh and that also reminds me. I also need to raise the DC of all those other attacks or powers by 5. Thanks for being patient with me.

I am finally learning how to do this!!!!!
 
Errrrr... ok i get all that, but... by MY reading, it DOES increase the damage that all wielded fire weapons already do (but maybe only that which damage was already done, maybe not that damage which is going to be done in an impending combat round??)
How exactly is this something that HL does not track? I would think that HL could track this. I know you are more experienced than I am so i am just seeking to understand.
The feat is only increasing the damage of "something set on fire" not something that takes any fire damage. Read Alchemist Fire as on the "following" round the person takes a 1d6 damage for being on fire and "this" damage is what would do +1 damage.

So "Fireball" does not do this. A flaming weapon does not do this. I can only think of a few abilities that do this with one being Alchemist Fire and the second one being "Fire Jet" ability of the Fire wizard school.

What you have here is a very situational ability that is pretty much left as 'Text' to remind you when that situation comes up.
 
Back
Top