|
Junior Member
|
Just wondering on how to work around this problem:
I have a specialist wizard who owns multiple looted spellbooks...because of the price for transcribing spells into my own spellbook, I've been stuck dragging the looted ones around with me. In-game, I'm left with the following: *tracking which spells are in my spellbook (and how many pages are left in it) *Tracking which spells I memorize from other spellbooks (Spellcraft check) Is there any possibility of gaining the functionality of tracking this info in-game? It seems like it should be fairly easy to do... |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
It would be very hard to do. All spells a character knows are actually attached to the character in general, they are not stored inside a spellbook container. I will keep this in mind for the future, for when I have a lot of time to work on the Pathfinder files.
Last edited by Mathias; January 4th, 2010 at 09:10 AM. |
#2 |
Senior Member
Join Date: Aug 2009
Posts: 125
|
Would it be possible to have a simple number field that tells you how many pages a spell takes up from the memorized ones? I.e. tracking which book it's in and how many pages are left may be manual, but how many pages each take are automatically shown...?
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Quote:
In fact, since I won't get to this for a little while, I'll show you how to do something like it: Go to the develop menu, and make sure that "Enable Data File Debugging" is checked. Create a new character, add a level or two of wizard, and go to the wizard tab. Go to the spellbook and add a few spells, then on any of the spells, right click, and select "Show Debug Tags for XXX". Move the window that pops up out of the way, close the spellbook, and then memorize the same spell you're looking at. Look at the memorized copy's debug tags, too. What's actually happening behind the scenes is that each spell in your spellbook is added to the hero, and when you memorize spells, it gives you a list of all the spells you have in your spellbook. Actually memorizing the spell creates a new copy of that spell, but some of the tags are different, which tells the program that it's a Wizard memorized spell instead of a spell in the spellbook or a Cleric memorized spell (which would be important for a multiclass character). Okay, looking at the tags for the two spells, you'll note that the level is stored as an sLevel tag, and the spellbook copy has "Spellbook.cHelpWiz" - which identifies it as a spell in the spellbook. Those are the tags we're going to use to find the number of pages currently used. Also note the component tags, and decide which seems to be most specific to the type of thing you're looking at. In this case, it's component.BaseSpell. Now, on to the editor. Create a new editor file (file...new), then go to the gear tab within the editor, and press "New (Copy)", and select "Wizard's Spellbook (blank)" from that list. Give it a new unique ID (like "gSplBook", and change the name so it's distinct from the previous version (like "Spellbook, Wizard's (blank, counting)"). Press the "Eval Scripts" button near the top right, and "Click to add a new Eval Script". At the top, change the phase to "Render" (since we're only creating display information, we should run it very late in the sequence). Change the priority to 10000, because there's some other things happening very early in the Render phase that we don't want to interfere with. Now, on to the script. This is how to search through all the things of a type in HeroLab (or specifically, how to search through all the spells that are in a wizard's spellbook): Code:
foreach pick in hero from BaseSpell where "Spellbook.cHelpWiz" Code:
pages += eachpick.tagvalue[sLevel.?] Now to modify that for cantrips (since they take up one page): Code:
pages += minimum(eachpick.tagvalue[sLevel.?], 1) Putting that together (this includes declaring a variable to store things in and closing the foreach): Code:
var pages as number foreach pick in hero from BaseSpell where "Spellbook.cHelpWiz" pages += minimum(eachpick.tagvalue[sLevel.?], 1) nexteach Code:
field[livename].text = "Spellbook, Wizard's (" & pages & " pages used)" Putting all that together for easy copying: Code:
var pages as number foreach pick in hero from BaseSpell where "Spellbook.cHelpWiz" pages += minimum(eachpick.tagvalue[sLevel.?], 1) nexteach field[livename].text = "Spellbook, Wizard's (" & pages & " pages used)" Now, save this item in the editor, press "Test Now!" at the top left, and then try buying this new spellbook version for your test character. Make sure it displays the number properly, and watch things change as you add or delete spells from your spellbook. |
|
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 8,232
|
Quote:
|
|
#5 |
Junior Member
|
Quote:
1) Create a new instance of the spell in the Spellbook, which would clearly show that it wasn't from my own book (perhaps "borrowed" or something in the text) 2) Add the custom "borrowed" spell to the spellbook 3) Delete the original from the spellbook. 4) edit the "Borrowed" spell somehow so that I know to make a Spellcraft check in order to memorize it. Can this work? How would one code it? |
|
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
There's currently no way to designate spells as being from that other spellbook once added to the spellbook.
|
#7 |
Junior Member
|
Quote:
Mathias, I actually meant something else, if I understand you correctly. Lets use an example of the Fireball spell. My wizard, for some insane reason, has never learned the spell himself, but has recently claimed the spellbook of a horrid zombie-wizard, or, zombizard- if you will. Actually, let's say it's a Blizzard spell. From the Zombizard. Yeah. In HL, I currently have the Zombizard's "Blizzard" spell added to my spellbook, but I have only a few recourses to notate that I must make a spellcraft check to memorize the spell, say, from the Background tab or what-have-you. could I go into the HL editor, duplicate the "Blizzard" spell and create a new spell called "Zombizard's Blizzard," and add some custom expression or gizmo or widget (Blidget?) that would also tell me the Spellcraft DC necessary to memorize? Once this new-and-improved "Zombizard's Blizzard" spell has saved, add it to my original spellbook and then delete the original and oh-so-bland "Blizzard" spell? Or am I just way too tired? So in summation: 2 spells enter. 1 spell leaves. Into the spellbook. MY spellbook. Not the Zombizard's. Which I can't add anyways. Not that I'd want to, since it's always covered with a sheen of hoarfrost that gets all my other parchments (or is the plural of parchment...parchment?) Erm, ok, PAPYRUS, wait- papyri?. @#$*&^*( My SCROLLS! The horrible Zombizard's hoarfrosty spellbook makes all my other non-zombified, non-hypothermic, wizardly materials... drippy. |
|
#8 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Okay, that will work.
Timing: PostLevel/10000 (actually, any time after the First phase and before the Final phase will work) Code:
var spelldc as number ~DC = 15 + spell level spelldc = 15 + field[sLevel].value field[livename].text = field[name].text & " (Prep DC " & spelldc & ")" |
#9 |
|
|