Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Predictably Damaged
Junior Member
 
Join Date: Mar 2019
Posts: 10

Old March 20th, 2019, 07:39 PM
I'm using the editor to design several magical races, and I would like to give them an ability with rather tricky behavior. I need two variables (which I think means two fields?), and I want the ability to behave as follows:

if the character is a member of a full-caster class,
they cast spells as if they were [var1] levels higher in their highest level caster class
if the character is not a member of a full-caster class,
they cast spells as if they were a level [var1] member of class [var2]
I am sure I can design an algorithm to do this, but I have no idea what to access and modify to implement them; it seems I need to know the following:
What classes is the character a member of, and at what levels?
Given a class, determine whether the class is a full caster (I assume this is already implemented for the purpose of multiclassing)
How can I specify a class for this ability to default to?
How can I grant spellcasting equivalent to higher level in a class? I suspect there is no easy way to do this, but is there a feasible one?
I would greatly appreciate any help with either answering these questions or using an alternate method to implement the ability. Thanks!

Last edited by Predictably Damaged; March 21st, 2019 at 07:35 AM. Reason: Improving formatting
Predictably Damaged is offline   #1 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old March 21st, 2019, 04:28 PM
Lots of questions here but I'll try to help.

To add a couple of levels to Wizard for instance you can do the following in a script running pre-levels/10000 in timing.

hero.childfound[cHelpWiz].field[cCasterLev].value += 4

That snippet would add 4 effective caster levels to a PC with the Wizard class. That changes the number of spell slots, the max spell level, the spell attack bonus and spell save DC and probably the number of spells memorized (for cleric), etc... It doesn't add class features though, so if you wanted your 1st level spellrace Wizard to get the wizard tradition you select at 2nd level, you're screwed.

Now, the problems. You need to bound this at the upper side by making sure cCasterLev never goes above 20.

Your questions:
1. What classes do I have?
The easiest way to do this is to check the hero level tags. A hero will have a Classes.XXX tag where XXX is the class ID for classes it has. A Wizard with have the Classes.Wizard tag. A fighter/wizard with have Classes.Wizard and Classes.Fighter.

This equates to code like:

if (hero.tagis[Classes.Wizard) then
do stuff to wizard class items
endif

2. What levels of classes do I have?

This is in the help file of the editor. You can use #levelcount[Wizard] macro to get the total number of wizard levels.

if (#levelcount[Wizard] > 1) then
do something that only a 2nd level or higher wizard can do
endif

3. How do I specify a default class?

Well, you hardcode that as your default case? Not sure how to answer this one, if you want to default to wizard in the case of multiclassed casters, you could probably put a step in that say if you're a caster AND you have wizard, run the script for wizard and then quit, don't touch the other classes.

4. How do I?

I think given my answer up above about the field, you should be able to figure it from that and searching the forums.
dungeonguru is offline   #2 Reply With Quote
Predictably Damaged
Junior Member
 
Join Date: Mar 2019
Posts: 10

Old March 21st, 2019, 07:35 PM
Thanks, that really helps! Am I allowed to access the levelcount and classes before the "levels" scripts have run? If so, it looks like this should actually be pretty easy.

Hopefully I can take it from there, but I do have one question outstanding; is there some macro/function/field/etc that tells whether a class is a "full caster", meaning it's levels count fully for the purpose of multiclass spellcasting?
Predictably Damaged is offline   #3 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old March 22nd, 2019, 11:07 AM
Quote:
Originally Posted by Predictably Damaged View Post
Thanks, that really helps! Am I allowed to access the levelcount and classes before the "levels" scripts have run? If so, it looks like this should actually be pretty easy.

Hopefully I can take it from there, but I do have one question outstanding; is there some macro/function/field/etc that tells whether a class is a "full caster", meaning it's levels count fully for the purpose of multiclass spellcasting?
I'm not sure, I usually use that macro post-levels, but it might just count the tags assigned. You can do a tag count on the Classes.Wizard tag, a 4th level wizard will have 4 copies of that tag before any level scripts run. I'm pretty sure there is a function to count the number of tags but I don't have my notes near me. You can probably search the forums.

#2 - on the class "helper" object are the tags you need to see if they are Full/Half/3rd/Warlock casters. This is tricky to explain.

The wizard "helper" object is cHelpWiz.

A wizard is a full caster, so the cHelpWiz object will have the Helper.FullCaster tag.

So, you have to pull the Helper tags on the class helper child objects and see if it has one of the following:
Helper.FullCaster
Helper.HalfCaster
Helper.3rdCaster
Helper.WarlocCast
dungeonguru is offline   #4 Reply With Quote
Predictably Damaged
Junior Member
 
Join Date: Mar 2019
Posts: 10

Old March 22nd, 2019, 01:46 PM
Thanks! That's really helpful, I should be able to take it from here.
Predictably Damaged is offline   #5 Reply With Quote
Predictably Damaged
Junior Member
 
Join Date: Mar 2019
Posts: 10

Old March 28th, 2019, 07:29 AM
Hey Dungeonguru, I am having a little bit of trouble implementing your advice!
I got the script to compile without errors, but it didn't seem to be actually adding the benefits, so I replaced it with just the snippet you provided:

hero.childfound[cHelpWiz].field[cCasterLev].value += 4

and it seems to not be completely effective. The "wizard spells" tab still only shows what you would expect for the one level of wizard on the hero (only allows two spells prepared and three cantrips known).The value of cHelpWiz.cCasterLev is five, and on the "spells" tab it shows the appropriate number of spells per day. Do you know how to fix this?

Last edited by Predictably Damaged; March 28th, 2019 at 07:46 AM. Reason: additional information
Predictably Damaged is offline   #6 Reply With Quote
Reply


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 11:07 AM.


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