how to add new spellbook


Questions, Explanations, Howtos

Dungeon Dilettante

Posts: 2

Joined: Sunday, 30th December 2018, 15:04

Post Sunday, 30th December 2018, 15:14

how to add new spellbook

I was add new spellbook(containing some of charm spells), but there is a problem that associated with "spl-book.cc"
It occasionally causes an error with the message "book of 45 out of range 0 (0) .. (int)ARRAYSZ(spellbook_templates) (44)".
I think this will be caused by maximum number of fixed-books.
However, I only found the definition of the maximum number of books in "book-type.h"(#define NUM_FIXED_BOOKS (MAX_FIXED_BOOK + 1))


I checked the changes when the Fen Folio was added, but it did not helpful. What is the solution to solve this crash?

Ziggurat Zagger

Posts: 6136

Joined: Tuesday, 30th October 2012, 19:06

Post Monday, 31st December 2018, 05:34

Re: how to add new spellbook

cubejjw wrote:I was add new spellbook(containing some of charm spells), but there is a problem that associated with "spl-book.cc"
It occasionally causes an error with the message "book of 45 out of range 0 (0) .. (int)ARRAYSZ(spellbook_templates) (44)".
I think this will be caused by maximum number of fixed-books.
However, I only found the definition of the maximum number of books in "book-type.h"(#define NUM_FIXED_BOOKS (MAX_FIXED_BOOK + 1))


I checked the changes when the Fen Folio was added, but it did not helpful. What is the solution to solve this crash?

You'll note higher up in book-type.h it says:
  Code:
MAX_FIXED_BOOK = BOOK_NECRONOMICON

Which is how it defines what MAX_FIXED_BOOK is (BOOK_NECRONOMICON is the last enum value of type "book_type" that's considered a valid "fixed book"
Spoiler: show
This high quality signature has been hidden for your protection. To unlock it's secret, send 3 easy payments of $9.99 to me, by way of your nearest theta band or ley line. Complete your transmission by midnight tonight for a special free gift!

Return to Coding

Who is online

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.