Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 18th, 2012, 07:06 AM
So now that I have the ability to choose spells working properly, I am trying to set up the DC for the spell chosen. This isn't a huge deal imo, but it would be nice if I could get it to work.

I am attempting to access the sLevel field of the chosen spell and set a variable equal to it with this:

Code:
SL = field[usrChosen1].chosen.field[sLevel].value
However, this always returns 0 regardless of the level of the spell chosen. There are no error messages. Is it possible to pull this info or am I just not scripting it correctly? Note that I am using a Class Special, hence why "usrChosen1" is being used here.

Also of note may be the debug output for SL shows this:

Code:
[Unnamed 1.1] 0
I don't recall ever see the Unnamed part in debug output before
Sendric is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 18th, 2012, 07:21 AM
Quote:
Originally Posted by Sendric View Post

Code:
[Unnamed 1.1] 0
I don't recall ever see the Unnamed part in debug output before
If you're debugging while there are multiple characters in a portfolio (like hero + animal companion), it will put the name of the particular character where the debug is running in square brackets, so you can tell where to look.
Mathias is offline   #2 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 18th, 2012, 07:33 AM
Quote:
Originally Posted by Mathias View Post
If you're debugging while there are multiple characters in a portfolio (like hero + animal companion), it will put the name of the particular character where the debug is running in square brackets, so you can tell where to look.
Ah. That makes sense.
Sendric is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 18th, 2012, 07:49 AM
phase & priority of the script this debug is in?
Mathias is offline   #4 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 18th, 2012, 08:44 AM
Quote:
Originally Posted by Mathias View Post
phase & priority of the script this debug is in?
I have it set to Post-Attributes/101 because I need to include the INT modifier in my calculations.
Sendric is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old May 18th, 2012, 09:15 AM
I always use priorities with at least 4 digits, usually 5. There may still be internal calculations going on at 101 in any phase.

Try some other phases. Final would be the first one I'd try.
Mathias is offline   #6 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 18th, 2012, 09:31 AM
Quote:
Originally Posted by Mathias View Post
I always use priorities with at least 4 digits, usually 5. There may still be internal calculations going on at 101 in any phase.

Try some other phases. Final would be the first one I'd try.
Gave the following a try:

Attributes/10000
Final Phase/10000
Render/10000

None of them worked. I had also previously tried an earlier time just to see, but that also hadn't worked.
Sendric is offline   #7 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 18th, 2012, 10:47 AM
sLevel is calculated and set at First/10000, so it's not the issue. This issue, unfortunately, is how you are using it. I know this, because I've tried several different methods of making a chooser (which is what you have here) and learned quite a bit. Choosers can be created on Custom Abilities, Class Specials, and Feats. Technically you can have a chooser on an Adjustment too, but you can't use a custom expression with it. If you have Traits & Flaws in your game, you can make a chooser with them, but I have no idea how they operate since I don't use them at all, and there could be limitations on how they are used.

Custom Expressions can have a chooser, but you have to have a field for allowing a number of custom abilities to activate them, which means it has to be a Class or it won't work at all. Unless it is class related, it simply can't be used as a generic chooser (it expects it to exist as a custom ability that is live on a hero).

Class Specials do the same thing, but don't require a field for the number of custom abilities. It needs to know a class and a class level to become active. So, assuming that you have no class input, it will never meet the requirements, because it is looking for a spell that has to have a class and class level on the hero that meets the requirements. Since no class is listed, it doesn't find anything. If you do list a class, it will work on that class and ignore other classes altogether. PITA I know.

So you are left with Feats, which is always what I use for the generic chooser, and for which no requirements are necessary. But you do have to bootstrap it to all the things that are going to use it. This is the only solution I've been able to do to make generic choosers work.

Not sure if this is the issue, it could be some kind of live state issue, but I wouln't know without knowing what exactly you are trying to achieve and how you are going about doing it.

Last edited by Kendall-DM; May 18th, 2012 at 10:49 AM.
Kendall-DM is offline   #8 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old May 18th, 2012, 11:20 AM
I tried doing the same thing with a feat chooser, but that didn't work either.

I'm working on the Factotum class from Dungeonscape. It has an ability that allows it to choose any wizard spell (up to 7th level) and cast it as a spell-like ability. The DC is 10 + Int modifier + spell level. I was hoping to easily determine the spell level of the chosen spell so I can put the DC in the summary description. Frankly, it's not a big deal. I can always just require the user to know what level spell they are choosing and add it in themselves.

Anyway, the chooser works fine. I haven't yet looked into/determined how to either bootstrap the chosen spell or carry over the description. It might be necessary to find a way to bootstrap the spell before solving the DC problem.

The other problem I'll have to tackle once I tackle this is the ability to choose any 3 extraordinary abilities. I have the chooser working ok, but again, do I bootstrap the ability or just carry over the description? Can either actually be done?
Sendric is offline   #9 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Van Nuys, California
Posts: 1,220

Old May 18th, 2012, 11:57 AM
Try this instead. Look for the tag sLevel.X, so you'll be looking at a possibility of 10 tags. Psuedo-coding here...

if (chosen.tagis[sLevel.0] <> 0) then
SL = 0
elseif (chosen.tagis[sLevel.1] <> 0) then
SL = 1
etc...
Kendall-DM is offline   #10 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 04:57 AM.


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