Member
Join Date: May 2011
Posts: 53
|
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: 13,213
|
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 |
Member
Join Date: May 2011
Posts: 53
|
Quote:
Code:
~ Generate our level for bonus field[abValue].value += field[xAllLev].value #skillbonus[AllSkills] += round(field[abValue].value/2,0,-1) Quote:
Last edited by insaneurge; January 20th, 2018 at 09:31 AM. |
||
#3 |
Senior Member
Join Date: Feb 2015
Posts: 676
|
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 |
Member
Join Date: May 2011
Posts: 53
|
Quote:
Code:
~ Generate our level for bonus #skillbonus[AllSkills] += round(herofield[tTotLevel].value/2,0,-1) |
|
#5 |
Member
Join Date: May 2011
Posts: 53
|
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 |
Senior Member
Join Date: Feb 2015
Posts: 676
|
Quote:
Quote:
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
|
Thank you sir!
|
#8 |
|
|