Dynamic Book Template (version 2.1)

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Re: Dynamic Book Template (version 2.1)

Postby Grogyan » Mon Mar 10, 2008 1:52 pm

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.
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Dynamic Book Template (version 2.1)

Postby D'Lanor » Mon Mar 10, 2008 3:06 pm

Well, then I don't know. I guess Pahts doesn't like the name of the file somehow.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Dynamic Book Template (version 2.1)

Postby Grogyan » Tue Mar 11, 2008 3:00 am

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
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Dynamic Book Template (version 2.1)

Postby D'Lanor » Tue Mar 11, 2008 4:32 am

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.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Dynamic Book Template (version 2.1)

Postby Grogyan » Tue Mar 11, 2008 10:05 am

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
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Dynamic Book Template (version 2.1)

Postby Grogyan » Tue Mar 11, 2008 10:35 pm

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
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Dynamic Book Template (version 2.1)

Postby Robert The Rebuilder » Wed Mar 12, 2008 6:38 am

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.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Dynamic Book Template (version 2.1)

Postby D'Lanor » Wed Mar 12, 2008 11:40 am

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 ;) ).
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Dynamic Book Template (version 2.1)

Postby Robert The Rebuilder » Wed Mar 12, 2008 7:47 pm

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 368 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.
Can we rebuild it? Yes, we can - here's how.

MOULagain KI# 1299

Myst Movie coming soon - spread the word!
User avatar
Robert The Rebuilder
 
Posts: 1383
Joined: Sat Sep 29, 2007 7:24 am
Location: Virginia, US

Re: Dynamic Book Template (version 2.1)

Postby Grogyan » Wed Mar 12, 2008 9:04 pm

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
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

PreviousNext

Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron