![]() |
Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 235
|
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 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. |
![]() |
![]() |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,545
|
Take a look at how the Trademark Weapon Edge functions.
_ Currently In Development: Savage Pathfinder Future Development: SWADE Super Powers Companion, SWADE Fantasy Companion _ Currently Running: Savage Unity Inc. (homebrew multiverse theme) Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane Future Setting Files: Savage Judge Dredd |
![]() |
![]() |
Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 235
|
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 Code:
if (eachpick.uniqindex = field[usrChosen1].chosen.uniqindex) then |
![]() |
![]() |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,545
|
The used chooses which weapon he is carrying that it applies to.
_ Currently In Development: Savage Pathfinder Future Development: SWADE Super Powers Companion, SWADE Fantasy Companion _ Currently Running: Savage Unity Inc. (homebrew multiverse theme) Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane Future Setting Files: Savage Judge Dredd |
![]() |
![]() |
Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 235
|
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:
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 ![]() |
|
![]() |
![]() |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,545
|
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.
_ Currently In Development: Savage Pathfinder Future Development: SWADE Super Powers Companion, SWADE Fantasy Companion _ Currently Running: Savage Unity Inc. (homebrew multiverse theme) Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane Future Setting Files: Savage Judge Dredd |
![]() |
![]() |
Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 235
|
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? |
![]() |
![]() |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,545
|
Well, for pre-built items just bootstrap what you need.
_ Currently In Development: Savage Pathfinder Future Development: SWADE Super Powers Companion, SWADE Fantasy Companion _ Currently Running: Savage Unity Inc. (homebrew multiverse theme) Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane Future Setting Files: Savage Judge Dredd |
![]() |
![]() |
Senior Member
Join Date: Jun 2010
Location: Florida
Posts: 235
|
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 ![]() Last edited by Gumbytie; August 2nd, 2023 at 06:05 AM. |
![]() |
![]() |
Senior Member
Volunteer Data File Contributor
Join Date: Aug 2009
Posts: 1,545
|
Don't modify Fighting Skill. Add to the items wpBonus. That will just affect the weapon.
And adding to wpDmgBonus is affecting all weapons?? _ Currently In Development: Savage Pathfinder Future Development: SWADE Super Powers Companion, SWADE Fantasy Companion _ Currently Running: Savage Unity Inc. (homebrew multiverse theme) Setting Files Supported: Deadlands: Reloaded, Flash Gordon, Gaslight, Hellfrost, Interface Zero 2.0, Seven Worlds, Slipstream, Solomon Kane Future Setting Files: Savage Judge Dredd |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|