Page 11 of 12

Re: Dynamic Book Template (version 2.1)

Posted: Mon Mar 10, 2008 1:52 pm
by Grogyan
I used PlasmaShop to pack the Pahts.pak which is in the python directory of my PoTS installation inside it are, from memory.
s119Journals.py
s119BookGUI.py
s119PageDefs.py
s003.py
s111.py
s111Globals.py

Its exactly the same file structure that you can see in the RAD version of Ahra Pahts which I am using to continue to develop my shell with.

Re: Dynamic Book Template (version 2.1)

Posted: Mon Mar 10, 2008 3:06 pm
by D'Lanor
Well, then I don't know. I guess Pahts doesn't like the name of the file somehow.

Re: Dynamic Book Template (version 2.1)

Posted: Tue Mar 11, 2008 3:00 am
by Grogyan
Well as a test I tried putting another set of [] around those Defs at the top, now Plasma isn't complaining it can't find the journal, now its attempting open a file, the one that has my journal text (well yours actually D'Lanor), and fails, and try again when clicked on.

I believe I am closer to the mystery

Re: Dynamic Book Template (version 2.1)

Posted: Tue Mar 11, 2008 4:32 am
by D'Lanor
What should have happened when you left out the double brackets is that the template tries to open each letter of the word as a separate book section. That should have given plenty of debugging messages instead of the "cannot find" message.

There is definately something weird with the way Pahts handles Python.

Re: Dynamic Book Template (version 2.1)

Posted: Tue Mar 11, 2008 10:05 am
by Grogyan
Thats exactly what it did.

I forgot to put in late last night, that I also removed the "%player" thing, Andy doesn't use it, and it seems to help narrow down whats happeneng

Re: Dynamic Book Template (version 2.1)

Posted: Tue Mar 11, 2008 10:35 pm
by Grogyan
The error that I am now receiving, removing the extra []

Code: Select all

(03/12 18:31:50) s119BookGUI: OnNotify called
(03/12 18:31:50) Someone clicked on object s119JournalBook
(03/12 18:31:50) It was you
(03/12 18:31:50) Try book s119JournalBook with page(s) s119Journals
(03/12 18:31:50) Match found! start opening...
(03/12 18:31:50) s119BookGUI: IOpenBook: Page request for s119Journals
(03/12 18:31:50) Skipping s because definition does not exist
(03/12 18:31:50) Skipping 1 because definition does not exist
(03/12 18:31:50) Skipping 1 because definition does not exist
(03/12 18:31:50) Skipping 9 because definition does not exist
(03/12 18:31:50) Skipping J because definition does not exist
(03/12 18:31:50) Skipping o because definition does not exist
(03/12 18:31:50) Skipping u because definition does not exist
(03/12 18:31:50) Skipping r because definition does not exist
(03/12 18:31:50) Skipping n because definition does not exist
(03/12 18:31:50) Skipping a because definition does not exist
(03/12 18:31:50) Skipping l because definition does not exist
(03/12 18:31:50) Skipping s because definition does not exist
(03/12 18:31:50) No pages created...
(03/12 18:31:50) s119BookGUI: OnNotify called
(03/12 18:31:50) s119BookGUI: OnNotify called
(03/12 18:31:50) Someone clicked on object s119JournalBook
(03/12 18:31:50) It was you
(03/12 18:31:50) Try book s119JournalBook with page(s) s119Journals
(03/12 18:31:50) Match found! start opening...
(03/12 18:31:50) s119BookGUI: IOpenBook: Page request for s119Journals
(03/12 18:31:50) Skipping s because definition does not exist
(03/12 18:31:50) Skipping 1 because definition does not exist
(03/12 18:31:50) Skipping 1 because definition does not exist
(03/12 18:31:50) Skipping 9 because definition does not exist
(03/12 18:31:50) Skipping J because definition does not exist
(03/12 18:31:50) Skipping o because definition does not exist
(03/12 18:31:50) Skipping u because definition does not exist
(03/12 18:31:50) Skipping r because definition does not exist
(03/12 18:31:50) Skipping n because definition does not exist
(03/12 18:31:50) Skipping a because definition does not exist
(03/12 18:31:50) Skipping l because definition does not exist
(03/12 18:31:50) Skipping s because definition does not exist
(03/12 18:31:50) No pages created...


I might ask Robert the Rebuilder to see if can get a journal to work with your template.

Edit: I have a theory as to why it won't work, you've stated in the comments to replace *YourAge* with the name of your Age, perhaps there is something in the code that is calling an Age named "s119" even though its a shell for Ahra Pahts, though I really have some idea to begin with this theory to prove it, and it involves changing a lot of things, between Blender and the scripts, or is it just script related. There is only one way to find out.

Edit: That plan failed

Re: Dynamic Book Template (version 2.1)

Posted: Wed Mar 12, 2008 6:38 am
by Robert The Rebuilder
Grogyan: I got your message. I currently have a hidden linking book in the shell that has additional text in it, like a journal, and it currently works. It doesn't follow the template format, though; but I'll replace it with the template once I get home and try it out.

Re: Dynamic Book Template (version 2.1)

Posted: Wed Mar 12, 2008 11:40 am
by D'Lanor
Grogyan wrote:The error that I am now receiving, removing the extra []

Yep, that's what happens. Nothing wrong with it. That tells us it sees the book now. Just don't remove those extra [].

What does the log say when you put those [] back? The "not found" thing again?

Grogyan wrote:Edit: I have a theory as to why it won't work, you've stated in the comments to replace *YourAge* with the name of your Age, perhaps there is something in the code that is calling an Age named "s119" even though its a shell for Ahra Pahts, though I really have some idea to begin with this theory to prove it, and it involves changing a lot of things, between Blender and the scripts, or is it just script related. There is only one way to find out.

That was just to stick with Cyan's naming conventions. Which apparently do not apply to Ahra Pahts. My code does not look for age s119 (although it might look for area51 ;) ).

Re: Dynamic Book Template (version 2.1)

Posted: Wed Mar 12, 2008 7:47 pm
by Robert The Rebuilder
OK - I got it to work with my shell. Here are the files I used, based on D'Lanor's template:

dynamic_books_s111.zip
(6.7 KiB) Downloaded 377 times


What I did:

- Replaced YourAge (and *YourAge*) with s111
- Changed the BookGui file to be s111Book.py (and the class) because s111Book is the name of the book's pythonfile AlcScript property
- Changed 'Journal' in the ageBooks variable in s111Book.py to 's111SecretBook' because that is the name of the clickable book
- Changed 'Journal' in the AgeBooks variable in s111PageDefs.py to 's111SecretBook'
- Changed *YourTexture* in the AgeBooks variable in s111PageDefs.py to 'xLinkPanelBlackVoid*1#0.hsm' (just because I didn't have a book cover texture)

And when I click on my book, I see the black void as the cover. I click on it to open, and I see the words "Shorah, Robert The Rebuilder! ..." etc.

So what you can do with these files, Grogyan, is to rename them to your shell, then change s111SecretBook to the name of your book, and rename s111Book.py to the name of your book's pythonfile AlcScript property.

Re: Dynamic Book Template (version 2.1)

Posted: Wed Mar 12, 2008 9:04 pm
by Grogyan
Cool, thanks again Robert.

I'll scrutinize my code to see where I went awry tonight.

It'll take a while, because I find python code hard to read