Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old February 11th, 2017, 07:27 AM
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
ErinRigh is offline   #1 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old February 13th, 2017, 03:21 PM
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.
Nightfox is offline   #2 Reply With Quote
Dark Lord Galen
Senior Member
 
Join Date: Jul 2012
Location: Texas
Posts: 707

Old February 13th, 2017, 06:59 PM
Quote:
Originally Posted by ErinRigh View Post
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
One way you could do it is by creating a synergy ( I think that is what you are referring)

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
Dark Lord Galen is offline   #3 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old February 14th, 2017, 04:23 AM
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]
The problem here is if the user decides to add point to Rituals: CON, it does not automatically increase Rituals: CHA. I don't know how to resolve that yet, but if it's needed I can try to look into it some more.
Sendric is offline   #4 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old February 14th, 2017, 04:56 PM
@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 do need both skills listed separately, are they supposed to have the same non-attribute bonuses, or do they increase individually? For example, would Skill Focus: Ritual(cha) improve the Ritual(con) skill?

~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
Nightfox is offline   #5 Reply With Quote
ErinRigh
Senior Member
 
Join Date: Oct 2016
Posts: 621

Old February 14th, 2017, 09:02 PM
Thanks Sendric and Night fox, that is exactly what I was looking for
ErinRigh is offline   #6 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old February 14th, 2017, 09:39 PM
Glad we could be of service.
Nightfox is offline   #7 Reply With Quote
Reply

Thread Tools
Display Modes

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 Jump


All times are GMT -8. The time now is 03:09 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.