Senior Member
Join Date: Oct 2016
Posts: 621
|
Hey group!
I am trying to code some skills so that adding ranks to one skill automatically adds ranks to another skill; so that, for example, adding 5 ranks to Rituals: Cha will automatically add the same number to Rituals: Con. This is what I came up with, what am I missing? Pre-Attrib (User)/5000 var Ritranks as number Ritranks = #skillranks[kRitualCha] hero.child[kRitualCon].field[kUserRanks].value = hero.child[kRitualCon].field[kUserRanks].value + Ritranks |
#1 |
Senior Member
Join Date: Dec 2011
Posts: 100
|
If I remember correctly, skill ranks are part of an array (skills x classes) so when you are adding "ranks" you will have to identify which class the ranks are being added under. I'm not sure about the specifics of your usage, but you may want to add additional ranks to the class to compensate for these ranks.
It might be easier to just apply the ranks of Rituals (cha) as a bonus to Rituals (con). Though I understand this would allow the players to bypass the skill point cap imposed by level. |
#2 |
Senior Member
Join Date: Jul 2012
Location: Texas
Posts: 707
|
Quote:
I do it like this, though those more learned than I may have a better way. In the Eval Scripts Phase:Prelevels Priority: 10000 if (#skillranks[kHandleAnm] >= 5) then field[Bonus].value = field[Bonus].value + 2 endif In this case I was adding a synergy to a profession: Animal Trainer using a synergy with the Skill: Handle Animal. D&D> Pre 1e White Box Edition, 1e, 2e, 3.5 Currently, Set in the World of Greyhawk (The first, longest running and Best Campaign Setting) Software>Extensive use of all forms of MS Products, Visual Studio 2012, DAZ 3d, AutoCAD, Adobe Products. Gaming Specific>Campaign Cartographer, D20 Pro Alpha & BattleGrounds Beta Tester, World Builder, Dungeon Crafter, LWD Hero Lab, Realm Works, Inkwell Ideas Citybuilder & Dungeon Builder, Auto-Realm, Dundjinni Contributing Writer for TSR, WOC, & Canonfire |
|
#3 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
If you place this eval script into the Rituals: CON skill, it will increase automatically when you add ranks to Rituals: CHA.
Code:
Pre-Levels/6000 field[kUserRanks].value += #skillranks[kRitualCha] |
#4 |
Senior Member
Join Date: Dec 2011
Posts: 100
|
@Erin,
I guess I don't fully understand what it is you are trying to accomplish. In my first read through I thought it was 2 skills that gave bonuses to each other (similar to synergy), but using skill ranks to limit the total bonus for the 2 skills. Now I am thinking it is a single skill (like Intimidate) that is either invoked through physical prowess, or force of personality. This leads me to ask, do you really need both skills, or would a single skill using the higher attribute bonus work? Code:
Post-attributes/ any time before 10000 ~ this is to set our attribute bonus to the greater of our Con or Cha modifiers if (hero.child[aCON].field[aModBonus].value > hero.child[aCHA].field[aModBonus].value) then field[kAttrValue].value = hero.child[aCON].field[aModBonus].value else field[kAttrValue].value = hero.child[aCHA].field[aModBonus].value endif ~if you are just matching the ranks but not other bonuses, here is a pair of eval scripts to add to R-Con Code:
Pre-levels/6000 ~ as sendric pointed out, but note it is Pre-levels and not Pre-levels (Users) ~ this will add our ranks in RitualCha to RitualCon field[kUserRanks].value += #skillranks[kRitualCha] Code:
any time before Pre-levels/5000 ~ this is to prevent us from adding ranks to RitualCon except through RitualCha trustme field[kValue0].value = 0 field[kValue1].value = 0 field[kValue2].value = 0 field[kValue3].value = 0 field[kValue4].value = 0 field[kValue5].value = 0 field[kUserPts].value = 0 Last edited by Nightfox; February 14th, 2017 at 06:57 PM. Reason: add code |
#5 |
Senior Member
Join Date: Oct 2016
Posts: 621
|
Thanks Sendric and Night fox, that is exactly what I was looking for
|
#6 |
Senior Member
Join Date: Dec 2011
Posts: 100
|
Glad we could be of service.
|
#7 |
|
|