Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD

Notices

Reply
 
Thread Tools Display Modes
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old November 20th, 2020, 08:12 AM
Quote:
Originally Posted by Fenris447 View Post
Yeah I know it was at least finding the spellbook version of the spell, as I could see the tags were being pushed to it. The debug will need to check for more than just the id string, since they'd be the same for the same spell. I can also have the debug push me something like the memorized tag, if present, to see if I'm actually getting the memorized version.

Is there any way to determine when in the timing a pick goes live? To see when that memorized spell is actually considered present on the hero? I would have assumed it's live the moment it's picked, before the timings even start. But that must not be the case here. Because the foreach is based on the thingid, it should pull in every version of that spell on there. But it's not.
Trial and Error is one method, the other is to look at the timing report and find when picks go live.

RavenX Pronouns: She/Her

Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you.

I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all.
RavenX is offline   #11 Reply With Quote
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old November 20th, 2020, 12:09 PM
Quote:
Originally Posted by RavenX View Post
Trial and Error is one method, the other is to look at the timing report and find when picks go live.
One thing to try to is to look into the floating info windows and choose Show Selection Tasks and find the copies of your spell.

Those windows show when scripts run against the pick, sometimes you can see a script name that you can do some poking around with in the timing report, plus it just plain gives you target timing slots to see if you can trial and error it.

Unfortunately a lot of the eval scripting behind BaseSpell isn't visible to us.
dungeonguru is offline   #12 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old November 20th, 2020, 12:50 PM
Quote:
Originally Posted by dungeonguru View Post
One thing to try to is to look into the floating info windows and choose Show Selection Tasks and find the copies of your spell.

Those windows show when scripts run against the pick, sometimes you can see a script name that you can do some poking around with in the timing report, plus it just plain gives you target timing slots to see if you can trial and error it.

Unfortunately a lot of the eval scripting behind BaseSpell isn't visible to us.
You can't see the stuff that's in the raw source code so a lot of it is trial and error to figure out.

RavenX Pronouns: She/Her

Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you.

I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all.
RavenX is offline   #13 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 600

Old December 31st, 2020, 10:34 AM
For the record, I did get it figured out. I used the spell selector in the configurable thing, which imposes the hasagent tag on new copies of the spells. Then I searched all spells with that tag and built a list. That list was then used to find the spellbook and prepared versions of each of those spells.

All of this ran at Final 50000 and works perfectly.

Code:
  ~set our variables
  var searchexpr as string
  var otherexpr as string
  var blep as number

  ~start off the string for the tag expression with an open parenthesis
  searchexpr = "("

  ~look at all the spells that have been selected by this configurable   
  foreach pick in hero from BaseSpell where "hasagent.cfg5C1WthWrd"

  ~if this isn't the first spell we've found, add an OR (" | ") before it in the string
    if (blep > 0) then
      searchexpr &= " | " 
     endif

  ~add the found spell's thingid to the search expression
    searchexpr &= eachpick.tagids[thingid.?]

  ~blep tracks how many spells have been added to the list we're building
  ~so once we've found one, add to blep so we can add an OR as above
    blep += 1

  ~hide the found spell; this version of the spell is from the configurable
   perform eachpick.assign[Hide.Spell]
   nexteach

  ~close the tag expression string with a parenthesis
  searchexpr &= ")"

  ~make a copy the string with just the spells listed 
  otherexpr = searchexpr

  ~add the tag that shows we're looking for the spellbook version of the spell
  searchexpr &= " & portal.ClsBook"

  ~add the tag that shows we're looking for the prepared version of the spell
  otherexpr &= " & Helper.Memorized"


  ~run through the list of spells, looking for their spellbook versions
  foreach pick in hero from BaseSpell where searchexpr

  ~add "(Lost)" to the end of the spell's name
      eachpick.field[sNameMod].text = "Lost"

  ~hide this spell, as it's in the spellbook and has disappeared
      perform eachpick.assign[Hide.Spell]
  nexteach

  ~run through the list of spells, looking for their prepared versions
  foreach pick in hero from BaseSpell where otherexpr

  ~add "(Lost from spellbook)" to the end of the spell's name
      eachpick.field[sNameMod].text = "Lost from spellbook"
  nexteach

Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub.

Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts!
Fenris447 is offline   #14 Reply With Quote
Brolthemighty
Senior Member
 
Join Date: Jan 2013
Posts: 273

Old January 1st, 2021, 07:00 PM
Holy cow
Brolthemighty is offline   #15 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633

Old January 2nd, 2021, 08:56 AM
Quote:
Originally Posted by Brolthemighty View Post
Holy cow
Yeah the scripting is not always going to be short one-liners of code... sometimes if you want to something it's going to be a long multiline thing. Just imagine if you had to code a new class and needed to add a spell list like this...

RavenX Pronouns: She/Her

Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you.

I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all.
RavenX is offline   #16 Reply With Quote
Fenris447
Senior Member
 
Join Date: Sep 2017
Posts: 600

Old January 4th, 2021, 10:32 AM
Yeah scripts aren't always so clean. I added the note lines just for this post, to help anyone looking to do something similar in the future. But figuring it out was not easy at all.

Found an issue with or have a suggestion for the 5e Community Pack? Please post it here at our GitHub.

Feel free to stop by the Lone Wolf Development Subreddit, for discussion of any and all LWD products and community efforts!
Fenris447 is offline   #17 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 07:39 AM.


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