Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
...since it's getting late and I need to sleep!
1) How can I grant a race a higher number of creation points (to use with the point buy method for attributes), for example +4 points? I have tried Code:
hero.child[tGen].field[Bonus].value = hero.child[tGen].field[Bonus].value + 4 Code:
#applybonus[Bonus, hero.child[tGen], 4] 2) How can I code as a prereq "having at least one Martial Weapon proficiency", whichever the origin (in my campaign, Skill Tricks can be used to gain a single Martial Weapon proficiency)? Thanks again! |
#1 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Try this for #1.
herofield[tGen].value += 4 |
#2 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
Thanks Kendall-DM for the help.
However, it still gives me a syntax error: "Only derived fields can generally be modified via scripts (field tGen)" |
#3 |
Spy
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220
|
Put trustme before it. Be careful when using trustme, it allows the program to do things that are likely having other unseen effects. Since tGen is not derived, then HL is setting it and doesn't think it is a good idea to change it.
|
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
DON'T Add something with trustme. You are modifying a user-set field, and are adding to it. EVERY time HL recalculates the character (that's after every time the user changes something), 4 more will be added to the field. You'll have to set the value equal to if you want to do this.
|
#5 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
Gentle bump... still equally stumped by those two.
Thanks in advance! |
#6 |
Senior Member
Volunteer Data File Contributor
Join Date: Mar 2007
Posts: 1,245
|
For #2, from a Pre-req on my Abjurant Champion PrC
~ We are valid if we have the Martial Weapon Proficiency feat (either version). validif (#hasfeat[fWepMart] <> 0) validif (#hasfeat[fMartial] <> 0) ~ Or if we have a weapon that requires Martial, and we are proficient foreach pick in hero from BaseWep where "wProfReq.Martial" validif (each.tagis[Helper.Proficient] <> 0) nexteach |
#7 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
Thanks, this is working almost perfectly!
However, 1) How could I code a validif for characters having the (house-ruled) skill trick granting a Martial Weapon proficiency? "#hasskilltrick" doesn't work 2) For the second part of your script, it considers you're proficient in the weapon only if you have one in your weapon list. For example, an elven rogue would be considered as proficient in the longsword only if he actually carries one (not necessary to actually equip it), otherwise the racial proficiency does not register. Thanks! |
#8 |
Senior Member
Join Date: Jan 2011
Location: Quebec, QC, Canada
Posts: 464
|
1) Figured it with childlives[] <> 0
2) Still pending ...and still looking for a way to modify that creation point budget. |
#9 |
|
|