Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   Weapons specific damage and attack bonuses (http://forums.wolflair.com/showthread.php?t=67930)

Gumbytie July 30th, 2023 10:52 AM

Weapons specific damage and attack bonuses
 
So I have never tried to apply these bonuses to one particular weapon when equipped.

Example, from the Fantasy Companion the "Pathblocker". It grants the wielder +2 to his Fighting and damage rolls...

So this code works sort of:
Pre-Traits/5000

Code:

if (field[grIsEquip].value <> 0) then
  perform #traitprof[skFighting,+,2,"Pathblocker"]
  perform hero.child[miSFAPathblocker].setfocus
  focus.field[wpDmgBonus].value += 2
endif

Equip the weapon and the bonuses apply. But they apply to Fighting and the damage bonus to EVERY weapon character has, including Unarmed.

So can you make a script that applies bonuses like that JUST to the equipped weapon? I guess the same would apply for an equipped item.

Once again, just additional coding that would prove more useful for someone running game within HeroLab.

CapedCrusader July 30th, 2023 12:05 PM

Take a look at how the Trademark Weapon Edge functions.

Gumbytie July 30th, 2023 03:28 PM

A good start hint, thank you very much. I can sorta see where I am supposed to going with this but Trademark Weapon uses a Chosen field to drive it.

I need this to work on a magic weapon the character "purchases".

So I get to this:
Code:

if (field[grIsEquip].value <> 0) then
  foreach pick in hero where "component.WeaponBase"
      if (eachpick.uniqindex = field[usrChosen1].chosen.uniqindex) then
        eachpick.field[wpDmgBonus].value += 2
        perform #traitprof[skFighting,+,2,"Pathblocker"]
      endif
  nexteach
endif

This of course throws an error because nothing is "chosen". I am not grokking what I need to replace in this line to move forward.
Code:

if (eachpick.uniqindex = field[usrChosen1].chosen.uniqindex) then
So the field[usrChosen1].chosen. section is what I need to swap out I think. Nothing I have tried so far works.

CapedCrusader July 30th, 2023 09:32 PM

The used chooses which weapon he is carrying that it applies to.

Gumbytie July 31st, 2023 05:09 AM

But this isn't a weapon the user "adds" magic ability to. This is a weapon in the existing Fantasy Companion. There are several similar weapons that have these kind of affects (effects?) but there is no code to support a player using character within HeroLab. So I have been going through trying to add code to various magic weapons/armour/items that we are using in our game minus the bunch precluded.

So I was trying to code what I could. In this case, the weapon from Fantasy Companion 2 (SWADE):

Quote:

PATHBLOCKER: Pathblocker is a long, sturdy spear that grants the wielder +2 to his Fighting and damage rolls and the First Strike Edge.
I know the code within HeroLab right now is for Fantasy Companion Deluxe so some stuff doesn't seem to work in SWADE. Like the Bootstrapping of Edges.

I know you are working on Fantasy Companion 2 for SWADE. I could hold off on too many magic items I guess.

Although the question I have would still pertain...unless in your work you are already accounting for this :)

CapedCrusader August 1st, 2023 07:26 AM

Well, they've completely changed how magic items work as far as construction. In Deluxe, you could do pretty much whatever. In SWADE, there aren't any open construction rules like that.

Gumbytie August 1st, 2023 07:55 AM

Hmm, okay, but this isn't for construction. Assuming I am understanding.

This is magic weapon listed in the new Fantasy Companion, just something a player can select normally.

I was just going through trying to add code to default magic items that allowed a user more options within HeroLab if they using it for play. Just like we have for many skills, Edges, etc.

I know some are just not possible to code with how HeroLab creating SW so I may be bumping up against limitations.

Maybe I should just wait and see what you complete and gets released for Fantasy Companion 2 and SWADE updates?

CapedCrusader August 1st, 2023 09:55 PM

Well, for pre-built items just bootstrap what you need.

Gumbytie August 2nd, 2023 04:14 AM

Heh, I think we got sidetracked. My original problem was the script at top of this thread would affect ALL weapons, etc. I was trying to figure out how to limit the effects to just applying to that weapon when equipped.

Again, this is just trying to push HeroLab a bit so there is more functionality if player/GM using HeroLab while running a game.

The magic items load just fine. There is just no code to support some of the magic effects. Again, I also don't know when I am hitting the limit of what HeroLab can and cannot achieve, or I am not smart enough :).

CapedCrusader August 2nd, 2023 07:22 AM

Don't modify Fighting Skill. Add to the items wpBonus. That will just affect the weapon.
And adding to wpDmgBonus is affecting all weapons??


All times are GMT -8. The time now is 03:41 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.