Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old December 30th, 2017, 08:11 AM
No, it's that you close and then re-open the quotes inbetween the SpellType and CasterType tags. The errror said "invalid tag expression", so you're looking for typos and mistakes in the tag expression, which is the part after "where".
Mathias is offline   #11 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old December 30th, 2017, 10:01 AM
When you close the qoutation, the ampersand is only joining the first part of the tag expression to the second part, rather than being interpreted within the expression.

"SpellType.cHelpArn" & "CasterType.MemBook"

is interpretted as

"SpellType.cHelpArnCasterType.MemBook"

Which is gobbledygook to the program. You want the "and" inside the expression, like so:

"SpellType.cHelpArn & CasterType.MemBook"
Aaron is offline   #12 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 30th, 2017, 11:22 AM
Quote:
Originally Posted by Aaron View Post
When you close the qoutation, the ampersand is only joining the first part of the tag expression to the second part, rather than being interpreted within the expression.

"SpellType.cHelpArn" & "CasterType.MemBook"

is interpretted as

"SpellType.cHelpArnCasterType.MemBook"

Which is gobbledygook to the program. You want the "and" inside the expression, like so:

"SpellType.cHelpArn & CasterType.MemBook"
Well that makes sense now. Thanks to both of you.

I tried keeping everything inside of the quotations, and it worked...almost...perfectly. It now is only selecting memorized spells, but is listing them twice in the usr field. Do you know why?
Bob G is offline   #13 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old December 31st, 2017, 07:23 AM
Odd, I suppose I'd have to see the portfolio too double check why that might be.
Aaron is offline   #14 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old January 1st, 2018, 07:53 AM
Quote:
Originally Posted by Aaron View Post
Odd, I suppose I'd have to see the portfolio too double check why that might be.
Thanks Aaron. I'll send over the file, let me know what you find when you get a free moment. Happy New Year!
Bob G is offline   #15 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old January 22nd, 2018, 04:51 AM
Hi everyone,

Still trying to get this to work as intended. The foreach statement below is pulling all spells from the hero's spellbook, not just the ones that are memorized. Plus, it is pulling the same results twice on certain spells.
Does anyone know what is going on here?

Quote:
Originally Posted by Bob G View Post
2. Another problem is a custom expression I am trying to write that does a foreach on memorized spells. I found a tag group name 'Memorized', so I used the following script:
Code:
foreach pick in hero from BaseSpell where "SpellType.cHelpArn &  CasterType.MemBook"
     field[usrCandid1].text = splice(field[usrCandid1].text, eachpick.tagids[sLevel.?], " | ")
     nexteach
But the results produced all spells in the hero's spellbook, not just the ones they had memorized. What's the correct tag to use in the custom expression?
Bob G is offline   #16 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 22nd, 2018, 11:33 AM
If this is still the same issue we talked about in e-mail, I still don't think a selector is the correct way to choose to "burn" a spell as though it were cast. But, if you are dead set on doing it that way I will take a second look.
Aaron is offline   #17 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old January 22nd, 2018, 04:07 PM
Quote:
Originally Posted by Aaron View Post
If this is still the same issue we talked about in e-mail, I still don't think a selector is the correct way to choose to "burn" a spell as though it were cast. But, if you are dead set on doing it that way I will take a second look.
Hi Aaron, this is a related issue. I decided to use your recommendation and just allow the user to manually change the status of the spell from 'uncast' to 'cast' on the Spells tab, but my concern is now in the user selection. What I would like to accomplish is that when the user selects a spell to "burn", that spell becomes an invalid choice for future selections, until a day's rest resets the hero's spells.

Does this still present major problems?
Bob G is offline   #18 Reply With Quote
Aaron
Senior Member
 
Join Date: Oct 2011
Posts: 6,793

Old January 22nd, 2018, 04:50 PM
I don't see how you would represent that, even if you got your selector choosing among the correct spells, unless you had one selector for every possible spell, because HL evaluates the character every time you change something.

For example, say you have your single selector, and you want to mark your choice by assigning a tag when you select a spell, and you've set it up so that your candidate expression for the chooser will not allow your to choose something with this new tag you created.

You add your ability, and you have 3 spells memorized right now, Spell A, B, and C. The tag you assign is Custom.NoPick2x.

On the character, you go to the ability in question and click on the selector, no selection has been made, no tag is assigned, you can choose any of the 3 spells. You make the selection, choosing Spell B, so HL runs an evaluation and your ability assigns Custom.NoPick2x to Spell B. Now you click on the selector again, no change has been made to the character so no evaluation is run yet and you see Spells A and C for selection but not Spell B (since it was assigned that tag last evaluation). As soon as you select either A or C, another evaluation runs and your eval script assigns Custom.NoPick2x to the new choice, and Spell B no longer has that tag. With a single selector applying a tag, there is no way to make your choice "sticky".

There are some things which retain information across evaluations, like user choices (what abilities have been added, what selections the user has currently selected for their abilities), and certain types of fields. Unfortunately, you can't define new fields on a pick, and even if there is a user field not currently being used (say one which relates to, for example, a variant spellcasting system from Pathfinder Unchained), its probably not a good idea to be co-opting it for whatever ability you are making here.

So the only way I can see that you have access to, would be to make this selector be on an ability which could be added as many times as the user needed, for example, through a configurable. The problem is, this is both wasteful and highly annoying to track, if you are expecting the user to add a new ability and select a new spell every time they use this ability. Then delete all the abilities when they rest just to do it all over again the next game day.

It just doesn't strike me as worth the effort for you to code, or your user to use. If you absolutely must have some record of which spells have been burned today, have them note it down on the Personal tab, or add a user text field to the ability and have the user manually type each spell marked off and erase the text at the end of each day. At least that is only one step per use, and a single step at the end of the day (rather than n*2 + n steps for add ability, make selection, delete ability).
Aaron is offline   #19 Reply With Quote
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old January 23rd, 2018, 05:02 AM
Quote:
Originally Posted by Aaron View Post
I don't see how you would represent that, even if you got your selector choosing among the correct spells, unless you had one selector for every possible spell, because HL evaluates the character every time you change something.

For example, say you have your single selector, and you want to mark your choice by assigning a tag when you select a spell, and you've set it up so that your candidate expression for the chooser will not allow your to choose something with this new tag you created.

You add your ability, and you have 3 spells memorized right now, Spell A, B, and C. The tag you assign is Custom.NoPick2x.

On the character, you go to the ability in question and click on the selector, no selection has been made, no tag is assigned, you can choose any of the 3 spells. You make the selection, choosing Spell B, so HL runs an evaluation and your ability assigns Custom.NoPick2x to Spell B. Now you click on the selector again, no change has been made to the character so no evaluation is run yet and you see Spells A and C for selection but not Spell B (since it was assigned that tag last evaluation). As soon as you select either A or C, another evaluation runs and your eval script assigns Custom.NoPick2x to the new choice, and Spell B no longer has that tag. With a single selector applying a tag, there is no way to make your choice "sticky".

There are some things which retain information across evaluations, like user choices (what abilities have been added, what selections the user has currently selected for their abilities), and certain types of fields. Unfortunately, you can't define new fields on a pick, and even if there is a user field not currently being used (say one which relates to, for example, a variant spellcasting system from Pathfinder Unchained), its probably not a good idea to be co-opting it for whatever ability you are making here.

So the only way I can see that you have access to, would be to make this selector be on an ability which could be added as many times as the user needed, for example, through a configurable. The problem is, this is both wasteful and highly annoying to track, if you are expecting the user to add a new ability and select a new spell every time they use this ability. Then delete all the abilities when they rest just to do it all over again the next game day.

It just doesn't strike me as worth the effort for you to code, or your user to use. If you absolutely must have some record of which spells have been burned today, have them note it down on the Personal tab, or add a user text field to the ability and have the user manually type each spell marked off and erase the text at the end of each day. At least that is only one step per use, and a single step at the end of the day (rather than n*2 + n steps for add ability, make selection, delete ability).
Okay, that makes sense. I guess what I can do is create a usr field that allows user to select a spell level. This selection will be used to power the various abilities the class has. The user can then manually select which spell will be burned to fuel the ability. Let me give that a try and see how it turns out.

Thanks as always for your valuable input!
Bob G is offline   #20 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 06:54 AM.


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