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 Zander » Sat Mar 08, 2008 2:39 pm

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...
Image
User avatar
Zander
 
Posts: 195
Joined: Fri Nov 16, 2007 9:45 pm

Re: Dynamic Book Template (version 2.1)

Postby andylegate » Sat Mar 08, 2008 3:42 pm

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.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Dynamic Book Template (version 2.1)

Postby Grogyan » Sat Mar 08, 2008 4:21 pm

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.
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 » Sat Mar 08, 2008 4:32 pm

The .py extension in both places 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 Grogyan » Sat Mar 08, 2008 5:29 pm

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
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 andylegate » Sat Mar 08, 2008 5:55 pm

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.
"I'm still trying to find the plKey for Crud!"
Image
Blender Age Creation Tutorials
3DS Max Age Creation Tutorials
User avatar
andylegate
 
Posts: 2348
Joined: Mon Oct 01, 2007 7:47 am

Re: Dynamic Book Template (version 2.1)

Postby Nadnerb » Sat Mar 08, 2008 7:06 pm

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."
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Dynamic Book Template (version 2.1)

Postby Grogyan » Sat Mar 08, 2008 10:27 pm

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.
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 » Sun Mar 09, 2008 7:15 am

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.
"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 » Sun Mar 09, 2008 10:09 am

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.
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 2 guests