Lone Wolf Development Forums Mechanic for Skill Bonus
 Register FAQ Members List Search Today's Posts Mark Forums Read

 Notices 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

Member

Join Date: May 2011
Posts: 53

January 19th, 2018, 09:33 PM
I am having trouble creating a script for a mechanic to assign a skill bonus to all skills equal to half class levels. I have was trying something like the following.

Code:
```~ Generate our level for bonus
field[abValue].value += field[xAllLev].value

field[abValue].value += round(#skillbonus[AllSkills]/2,0,-1)```
#1
Senior Member
Lone Wolf Staff

Join Date: May 2005
Posts: 12,454

January 19th, 2018, 11:21 PM
Take another look at what you've written.

The first line says "add our level to our stored value".

The second line says "add half the bonus that's currently being applied to all skills to the stored value"

I think your second line is backwards, based on what you're describing - you want to add half your stored value to the bonus that's being applied to all skills.
#2
insaneurge
Member

Join Date: May 2011
Posts: 53

January 20th, 2018, 09:19 AM
Quote:
 Originally Posted by Mathias Take another look at what you've written. The first line says "add our level to our stored value". The second line says "add half the bonus that's currently being applied to all skills to the stored value" I think your second line is backwards, based on what you're describing - you want to add half your stored value to the bonus that's being applied to all skills.
Something like this?

Code:
```~ Generate our level for bonus
field[abValue].value += field[xAllLev].value

#skillbonus[AllSkills] += round(field[abValue].value/2,0,-1)```
When I recompile I get an error box with the following

Quote:
 Attempt to access field 'xAllLev' that does not exist for thing 'SWSkills' Location: 'eval' script for Thing 'SWSkills' (Eval Script '#1') near line 2 - - - Attempt to access field 'abValue' that does not exist for thing 'SWSkills' Location: 'eval' script for Thing 'SWSkills' (Eval Script '#1') near line 2 - - - Attempt to access field 'abValue' that does not exist for thing 'SWSkills' Location: 'eval' script for Thing 'SWSkills' (Eval Script '#1') near line 2 - - - Attempt to access field 'abValue' that does not exist for thing 'SWSkills' Location: 'eval' script for Thing 'SWSkills' (Eval Script '#1') near line 4

Last edited by insaneurge; January 20th, 2018 at 09:31 AM.
#3
Senior Member

Join Date: Feb 2015
Posts: 505

January 20th, 2018, 10:08 AM
This is a Mechanic, right? Mechanics don't have an xAllLev field, which is why you're getting that error. Check out the list of fields that exist on the hero itself (Develop -> Floating Info Windows -> Show Hero Fields) and you should be able to find the one that fits your purposes. Once you have that, you can refer to the field in a script with "herofield[fieldID].value".
#4
insaneurge
Member

Join Date: May 2011
Posts: 53

January 20th, 2018, 01:35 PM
Quote:
 Originally Posted by TheIronGolem This is a Mechanic, right? Mechanics don't have an xAllLev field, which is why you're getting that error. Check out the list of fields that exist on the hero itself (Develop -> Floating Info Windows -> Show Hero Fields) and you should be able to find the one that fits your purposes. Once you have that, you can refer to the field in a script with "herofield[fieldID].value".
Thank you both! Changed the script to:

Code:
```~ Generate our level for bonus

#skillbonus[AllSkills] += round(herofield[tTotLevel].value/2,0,-1)```
Of course nothing happened. Finally realized I hadn't changed the timing
#5
Member

Join Date: May 2011
Posts: 53

January 20th, 2018, 01:38 PM
Another unrelated and probably simple answer. What tag would I use in a bootstrap to assign a custom racial trait at different levels. Something like ClSpecWhen but for races?
#6
TheIronGolem
Senior Member

Join Date: Feb 2015
Posts: 505

January 20th, 2018, 02:00 PM
Quote:
 Originally Posted by insaneurge Thank you both! Changed the script to: Code: ```~ Generate our level for bonus #skillbonus[AllSkills] += round(herofield[tTotLevel].value/2,0,-1)``` Of course nothing happened. Finally realized I hadn't changed the timing
Since you mentioned that this works off of class level, I'll point out that tTotLevel isn't quite the field you want - unless you meant to say character level. There's a separate field for class level. The difference will be important if/when you have characters who have class levels on top of racial Hit Dice. You just want to make sure you're using the one that matches your intent.

Quote:
 Originally Posted by insaneurge Another unrelated and probably simple answer. What tag would I use in a bootstrap to assign a custom racial trait at different levels. Something like ClSpecWhen but for races?
There's no tag for that as far as I know. What you can do instead is use conditional bootstraps, with the condition being "count:Hero.HitDice >= X" (or "count:Classes.? >= X" if you care specifically about class levels and not overall Hit Die count).

Another thing you can do is bootstrap the ability with Helper.SpcDisable, and then have a script remove that tag if the hero is sufficiently high level. The conditional bootstrap is generally cleaner, though.
#7
Member

Join Date: May 2011
Posts: 53

January 20th, 2018, 02:53 PM
Thank you sir!
#8

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Lone Wolf Development Web Site Announcements Realm Works Forums     Realm Works Discussion         Realm Works in Action         Realm Works Feature Requests     Realm Works in Action     Realm Works Feature Requests Hero Lab Online Forums     Hero Lab Online Discussion     HLO - Pathfinder Playtest     HLO - Starfinder Hero Lab Forums     HL - Pathfinder Roleplaying Game     HL - D&D 5th Edition SRD     HL - Shadowrun     HL - Mutants & Masterminds     HL - d20 System     HL - World of Darkness     HL - Call of Cthulhu     HL - 4th Edition     HL - Savage Worlds     HL - Cortex System     HL - Authoring Kit     HL - User Projects     HL - Alternity (user-created)     Hero Lab Discussion Army Builder Forums     Army Builder Army Builder Data Files     Babylon 5: A Call to Arms     Battlefleet Gothic     Blood Bowl     Black Powder, Bolt Action, Hail Caesar, Judge Dredd, and Pike & Shotte     Confrontation - English     Kings of War (2nd Edition)     Lord of the Rings (Tabletop)     Mordheim     Necromunda     Starship Troopers     Star Wars: X-Wing and Armada Miniatures Game     The 9th Age     Warhammer Ancient Battles     Warhammer 40,000     Warhammer Fantasy 8th Ed.     Warhammer Historical: The Great War     Warhammer Fantasy 3rd Ed.     Warlord     Warmachine & Hordes     Warmaster Card Vault Forums     Card Vault Card Vault Data Files     MLB Showdown     Lord of the Rings CCG     .hack//ENEMY     Vs. System     Yu-Gi-Oh!     D&D Miniatures

All times are GMT -8. The time now is 04:18 PM.

 -- Default Style -- Majestic Contact Us - Lone Wolf Development Forums - Archive - Top