hangarflying
Active member
Is there a way to quickly determine the cost of a spellbook? If not, how difficult would it be to add a note, perhaps on the "Wizard" tab, along the left side (near the Caster Level, Concentration, etc notes)?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
So the ability to tie spells to spellbooks would be great![]()
Yea pretty easy actually. Here is something I just put together in about 30 minutes. Its a Spellbook gear item that when you select Wizard or Magus it calcs the total cost of the spells and the number of pages required.If all you guys wanted was to get the # of pages needed, that wouldn't be too hard to do.
As its not clear who exactly your asking this of I will assume its to me.What happens when you have two books, how does the program know which book to add the spell to?
As its not clear who exactly your asking this of I will assume its to me.![]()
This does NOT add spells to a spellbook. It calculates the total cost of the Class Spells and number of pages those spells take up.
A Magus uses a spellbook just like a wizard. A witch uses her familiar actually to store her spells. Their is no cost to putting a spell in your familiar but their is a chance the scroll is lost.Does the Magus and witch actually use spellbooks? or any other classes?
Shadow, with the spell book, is it possible to have it as spellbooks, and when you exceed the page limit of the books it just adds another book to it by increasing the weight?
That way we can have travelling spellbooks, standard spellbook and blessed book in this style?
var Cost as number
var Pages as number
var Books as number
var Class as string
Cost = 0
Pages = 0
~ Get the Spellbook Class ID
Class = field[usrChosen1].chosen.tagids[Spellbook.?,"|"]
~ Read through all the spells on the selected class
foreach pick in hero from BaseSpell where Class
~ Total up the Cost and number of pages used at each spell level
If (eachpick.tagis[sLevel.0] <> 0) Then
Cost += 5
Pages += 1
elseIf (eachpick.tagis[sLevel.1] <> 0) Then
Cost += 10
Pages += 1
elseIf (eachpick.tagis[sLevel.2] <> 0) Then
Cost += 40
Pages += 2
elseIf (eachpick.tagis[sLevel.3] <> 0) Then
Cost += 90
Pages += 3
elseIf (eachpick.tagis[sLevel.4] <> 0) Then
Cost += 160
Pages += 4
elseIf (eachpick.tagis[sLevel.5] <> 0) Then
Cost += 250
Pages += 5
elseIf (eachpick.tagis[sLevel.6] <> 0) Then
Cost += 360
Pages += 6
elseIf (eachpick.tagis[sLevel.7] <> 0) Then
Cost += 490
Pages += 7
elseIf (eachpick.tagis[sLevel.8] <> 0) Then
Cost += 640
Pages += 8
elseIf (eachpick.tagis[sLevel.9] <> 0) Then
Cost += 810
Pages += 9
Endif
nexteach
~Get number of books
Books = Pages/100
Books = round(Books, 0, 1)
~ Set the live name to include the cost and number of pages
if (Books > 1) then
field[livename].text = " "& Books & " " & field[thingname].text & "s" & " " & Cost & "gp " & Pages & " pages"
else
field[livename].text = field[thingname].text & " " & Cost & "gp " & Pages & " pages"
endif
~ Set weight.
field[gWeight].value = Books*3
Yea I thought so too until I actually tried to implement this Sendric. The issue is the timing involved does not work out correctly. So you can't just add into the weight especially at the Final timing that the original script runs at as it never will get onto the hero.I suspect there should be a relatively easy to way to use the number of pages calculated to change the name and weight of the item.
This is pretty cool idea actually.Shadow, with the spell book, is it possible to have it as spellbooks, and when you exceed the page limit of the books it just adds another book to it by increasing the weight?
That way we can have travelling spellbooks, standard spellbook and blessed book in this style?
Yea I thought so too until I actually tried to implement this Sendric. The issue is the timing involved does not work out correctly. So you can't just add into the weight especially at the Final timing that the original script runs at as it never will get onto the hero.
At the time that you have to calc the books, Post-Levels 10,050, we are just past the point where adjusting the weight of the gear item gets added to the hero.
So I then went ahead and added the weight directly to the Hero which worked until I tried to move the gear item to the "Dropped to Ground" container. The weight still gets to the hero. I then tried to figure out I was in the "Dropped to Ground" container but I can't figure out a way to detect I am in the bag.
So unfortunately the code you posted is not a correct solution as it will never get the weight to the hero. I spent close to 2hrs working on this and can't find a perfect solution yet. I can get close is all and I just don't have more time to spend on this.![]()