Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old March 6th, 2024, 05:31 PM
I'm sorry, after 4 hours I must accept that my search-fu has failed me.

I'm working on a project and the best solution I can come up with for one of the many problems is to use a configurable. The goal is to create a group of spells from the character's spellbooks. I tested an expression in an adjustment and a feat and was able to get a drop down of only the spells in the spellbooks for a specific class, but I can't seem to get the expression to translate to the configurable.

From the feat:
Code:
 ~pre-level 11000
      field[usrCandid1].text = "component.BaseSpell & Helper.InSpellbk & Spellbook.cHelpWiz"
I've tried entering the expression on the config in the field directly and using eval script to add it to the field[cfgAllow1].text, but it always comes back with:
Nothing to choose from!

The goal is to create multiple small lists of spells from those the character has available, and be able to reference those lists later.
Since there were going to be multiple lists, the plan was to use a configurable with separate lists under custom ability, secondary ability, tertiary ability, etc...
Nightfox is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 7th, 2024, 08:11 AM
On these picks, what selection did you make in the "Restrict First List To" option? ("All Picks on Hero" is the selection that's correct for what you're trying to do).
Mathias is offline   #2 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old March 7th, 2024, 12:28 PM
I did not see a selection option for "Restrict First List To". I only see:
Allow Custom Abilities (with an Edit button)
Custom Ability Total [cfgMax1]
Primary Candidate Expression [cfgAllow1]
Custom Ability Name [cfgObject1]
Optional Ability (check box)

Did I miss an update, or is that supposed to be part of the candidate expression?
I'm not very familiar with the structure of the expressions. I went through your set on "math", "Location", and "Bootstraps" but could not find anything on the format for candidate expressions, and the references I found in other configurables were just aaaa.bbbb & cccc.dddd etc... with no reference to restricting where to look. I can see examples in "foreach" statements with restrictions of "pick on hero", but I don't think we want a "foreach" in the expression. <I could be wrong though>

If you know of a thread that goes over proper structure and syntax for expressions, can you point it out so I can save it to my editing reference folder.
Nightfox is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 7th, 2024, 01:07 PM
Ok, the Ids you just listed are for a completely separate mechanism than for your first post.

In your first post, the Id was usrCandid1 - that is used for setting up a drop-down choice on a feat or ability - that field controls the list of what choices will be shown to the user.

In your third post, the Ids you're listing are all specific to the Configurable tab in the editor, and control which abilities and how many abilities may be added to the table shown on the tab created by the configurable.

So which editor tab are you working on? Since the code you posted seemed to be for a drop-down, I was asking questions about controls found on the "Classes/Custom Ability" tab.
Mathias is offline   #4 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old March 7th, 2024, 02:57 PM
EXPLANATION:
Sorry for the confusion. As mentioned, in the first post, I'm trying to get a configurable to work. The code posted in the first post is what I got to work "From the feat:"
Here is what I had in the expression on the configurable:
Code:
component.BaseSpell & Spellbook.cHelpWiz & Helper.InSpellbk
But it gives me a popup of "Nothing to choose from!"

WHAT WE WANT TO DO:
Here is what I am trying to accomplish. I want to create a ... psudo-spellbook. It has limited space, you can't memorize or share spells from it, and you can only put in spells that you already have in your regular spellbooks.

HOW WE HAVE BEEN TRYING TO DO IT:
The easiest solution I could think of was to create a configurable. I usually use feats to test code since it is easy to add them to a test character, check results, make modifications, and check again. However, I have little experience with expressions, and I haven't been able to find anything that would explain why it isn't working, or if it simply won't work because of some hard coding in the background.
Nightfox is offline   #5 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old March 7th, 2024, 03:04 PM
I've never done anything with configurables, but looking at the editor they don't appear to have drop down menus, which is probably why your script isn't working. Instead, you might try:

Code:
field[cfgAllow1].text = "component.BaseSpell & Helper.InSpellbk & Spellbook.cHelpWiz"
Note: To find what the name of the candidate expression field for custom abilities is on a configurable, simply fill in some text in the editor on the appropriate line then click the "Fields" button to see what it says.

Edit: actually, you wouldn't even need to do this in a script. Just take the text above between the quotes and fill it into the primary canidate expression box in the editor.

Last edited by Sendric; March 7th, 2024 at 03:12 PM.
Sendric is offline   #6 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old March 7th, 2024, 03:10 PM
For what it's worth, using a foreach loop could also work for the problem you're trying to solve. When you write:

Code:
foreach pick in hero from BaseSpell
for example, this searches through the character and finds all the things that are spells. This would allow you to generate a list of all spells. If you wanted to narrow it down, you could do:

Code:
foreach pick in hero from BaseSpell where "Helper.InSpellbk & Spellbook.cHelpWiz"
This looks for all spells with those specific tags. You should then be able to generate a list of spell names and add them to the description.
Sendric is offline   #7 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old March 7th, 2024, 03:19 PM
Thank you Sendric. I've tried using an eval script in the configurable, the feat (that I used to test adding the configurable initially), and a class special (making a quick archetype to add the configurable to the class) to set the expression. All came back with either: [Nothing to choose from!] or a [Syntax error] notice and a list of EvErYtHiNg...

I've even tried using the eval script to add it to [cfgAllwSp1] with the same results.

There might be a timing issue, but I think the expressions run in the late final phase when everything else should already be in place so there would be things to choose from.

Right now my concern is that the spells are considered to be behind a gizmo (spellbook) and the expression can't see them.
Nightfox is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old March 7th, 2024, 03:21 PM
The table that is set up by cfgAllow1 will not support spells being added to it. That is an ability table, and the user-set candidate expression won't override the base setup of what category of things can be in that table, because that base setup is necessary to setup which visual display is used for the items added to that table.


So, please give me the game rules you're trying to implement - that way, I can try to figure out a different approach that will let you accomplish your goal.
Mathias is offline   #9 Reply With Quote
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old March 7th, 2024, 03:39 PM
Thank Sendric
The "foreach" is giving me that frustrating "Syntax Error" but I'll try some more permutations and see if it plays out.

Mathis
it is a homebrew. The caster can "give" their familar/animal/eidolon the ability to cast a certain number of spells. The number of spells and spell levels will vary. The spells have to be ones in their book, but they don't necessarily have to have them prepared for the day. It is also possible to have this set up with multiple familiar/animal/eidolon with each having a different set. So I don't want to limit it to a one-and-done but something that can be added multiple times, either on the same config or as additional tabs.

So the [cfgAllow1] is a hard code block, but I have a similar issue with [sfgAllwSp1]. I can get all spells to show, but I can't get it to limit to just the spells in spellbooks.

Question, is it possible to set a spellbook to limit what can be added to only what is in your other spellbooks for that class?
Nightfox 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:34 AM.


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