Page 9 of 12

Re: Dynamic Book Template (version 2.1)

Posted: Sat Mar 08, 2008 2:39 pm
by Zander
Obviously there's a lot of stuff to do with using this that has emerged in the course of the comment thread. Hopefully some kind and technically adept soul will come up with a comprehensive tutorial for nurks like moi.

I seem to gather that the entire content of the book has to fit on one line. Does this set a limit of length on that content? I always assumed the books in Uru were only a couple of pages long because they didn't think we'd have the patience to read any more (fools)or, in the alternative, that they didn't have the patience to write any more...

Re: Dynamic Book Template (version 2.1)

Posted: Sat Mar 08, 2008 3:42 pm
by andylegate
As far as I know, there is no limit on how much content you wish to put in a journal, other than maybe the computers memory and hard disk space, ;)

Just remember, the content for one journal must all be on one line in the journals file.

Re: Dynamic Book Template (version 2.1)

Posted: Sat Mar 08, 2008 4:21 pm
by Grogyan
Btw I fixed that spelling mistake, and removed the extension in the python file, made the book model an actor.

And apart from my Journal book (unclicked) appearing 3 times larger and awful, I still can't click on it.
I removed the clickfileX logic property, still no hotspot to click

I am however going through and trying to see what happens between the AlcScript and the book model Logic Property with alternating puttting in the .py extension

So far i've tried no extensions in either two places.

Re: Dynamic Book Template (version 2.1)

Posted: Sat Mar 08, 2008 4:32 pm
by Grogyan
The .py extension in both places failed

Re: Dynamic Book Template (version 2.1)

Posted: Sat Mar 08, 2008 5:29 pm
by Grogyan
Yay, some success, I got the hotspot now, book still won't open, and the model is still 3 times larger in game than in Blender.

But its a start.

AlcScript

Code: Select all

s119JournalBook:
   quickscript:
      simpleclick:
         pythonfile: s119BookGUI
         region: s119JournalRgn   


The book model is named s119JournalBook Actor StaticTriangleMesh String: clickfileX Value: s119BookGUI
The region is named s119JournalRgn Actor ConvexHullPolytope String: type Value: region
The book GUI is named s119BookGUI.py

Re: Dynamic Book Template (version 2.1)

Posted: Sat Mar 08, 2008 5:55 pm
by andylegate
You don't ever use file extensions in either Python or the ALCscript.

Okay, so you're saying that it gives you the click hotspot now, but the book does not pop up when you click on it?

Time to be looking at your Python log. It will show what is going on when you attempt to click on the book, and has saved me no end to grief. You'll need the Elfviewer for that.

Off hand I would now say the problem is no longer in Blender, but is now in the Python scripting. Can you post both your BookGUI and your PageDefs python files on here for us to look at? We might spot the problem.

Re: Dynamic Book Template (version 2.1)

Posted: Sat Mar 08, 2008 7:06 pm
by Nadnerb
it's a python file.. you can use triple quotes to extend your string assignment over multiple lines. like this:

Code: Select all

string = """This is a string.
here is another line.
and another.
This puts newlines in the string,
so be aware of your word wrap length."""


is equivalent to saying this:

Code: Select all

string = "This is a string.\nhere is another line.\nand another.\nThis puts newlines in the string, \nso be aware of your word wrap length."

Re: Dynamic Book Template (version 2.1)

Posted: Sat Mar 08, 2008 10:27 pm
by Grogyan
That I can do, as there isn't anything spoilery in it, as I didn't get that far.
Show Spoiler


Though I can't see any mention of the journal being called.

Re: Dynamic Book Template (version 2.1)

Posted: Sun Mar 09, 2008 7:15 am
by D'Lanor
Oh wait, is it a Pahts shell? That is not going to make debugging any easier. Especially in the future with all shells being used acitively. Perhaps there should be a rule about debugging messages in finished shells?

Edit: Is this your book?

Code: Select all

    (03/09 18:16:38) Python file s119BookGUI.py was not found.


You must have misnamed your Python file.

Re: Dynamic Book Template (version 2.1)

Posted: Sun Mar 09, 2008 10:09 am
by Grogyan
Yeah, thats my book, due to the naming conventions for Pahts its like that.

Or is it suppose to link to another file, The PageDefs get called from BookGUI and calls the Journals.py, so I figure its the file to use.