Page 7 of 12
Re: Dynamic Book Template (version 2)
Posted: Sun Feb 17, 2008 11:08 am
by andylegate
Fixed my problem......
sheesh.
Okay here is what happened. I decided to use the ElfViewer as a good tool. I opened up Uru, linked in to Relto. Walked up to my book shelf, and opened the Gahreesen linking book. Then I exited and looked at the Python log.
Linking panel listed for it is: xLinkPanelGarrisonDefault*1#0.hsm
The difference being that I was using xLinkPanelGarrisonDefault*0#3.hsm because it was all I could find with Prp Explorer.
Then I looked at D'Lanor's template again. he's got a few different linking panels. They all end with *1#0.hsm
Rolling my eyes, I changed mine to *1#0.hsm and guess what? Linking book works fine now. Panel is there, and you can actually link.
Re: Dynamic Book Template (version 2.1)
Posted: Sun Feb 17, 2008 11:14 am
by D'Lanor
Glad you got it working. I was just about to suggest a typo.
Edit: btw, PtSendKIMessage(kDisableKIandBB, 0) disables the bar at the bottom of the screen which pops up when you move the cursor over it. That is the default action at opening linkingbooks (in TPOTS/CC).
However, it is not entirely correct for journals. Reading a Journal should disable the clickability of your avatar. And since this is a template for both linking books and journals I am not entirely happy with this.
So why not disable both the bottom bar and avatar clickability? Alas, that can't be done with a standard KI message. The KI message kDisableKIandBB which disables the bottom bar automatically enables avatar clickability.
Re: Dynamic Book Template (version 2.1)
Posted: Mon Feb 18, 2008 3:18 am
by boblishman
D'Lanor wrote:However, it is not entirely correct for journals. Reading a Journal should disable the clickability of your avatar. And since this is a template for both linking books and journals I am not entirely happy with this.
So why not disable both the bottom bar and avatar clickability? Alas, that can't be done with a standard KI message. The KI message kDisableKIandBB which disables the bottom bar automatically enables avatar clickability.
This has me totally confused... I am using your templates and they work PERFECTLY... no bottom bar, and you cannot click on the avatar, (only the book pages to turn them or somewhere on the screen outside the book to close it) ...
...so, I'm not sure why you are "not entirely happy wih it" ... ? ( I am, ... I'm VERY happy with it!

)
Re: Dynamic Book Template (version 2.1)
Posted: Mon Feb 18, 2008 6:48 am
by andylegate
I think D'Lanor did an outstanding job too! Here is why:
The way Cyan did it for Uru, you have a seperate pak file for Journals. If you open it up, you'll see all the contents for every journal in Uru.
Okay, well we do that too with the YourAgeJournals.py.
But then you have:
xBookGUIs.py
xLinkingBookDefs.py
xLinkingBookGUIPopup.py
If you look at them, they are very interesting, but they also have everything spread out.
D'Lanor's templates combines them both, so that you have only 3 files that you have to mess with, not to mention he's mostly made it to where you mostly just have to fill in the blanks.
BUT the best part, is that he put EXPLINATIONS in his templates! This goes a LONG way with me in troubleshooting and trying to figure out what I did wrong! Since I'm not a Python programmer, this is very helpful.
Re: Dynamic Book Template (version 2.1)
Posted: Mon Feb 18, 2008 11:51 am
by D'Lanor
boblishman wrote:This has me totally confused... I am using your templates and they work PERFECTLY... no bottom bar, and you cannot click on the avatar, (only the book pages to turn them or somewhere on the screen outside the book to close it) ...
...so, I'm not sure why you are "not entirely happy wih it" ... ? ( I am, ... I'm VERY happy with it!

)
You are right, not a big deal. It is just that I would have preferred to do it "the Cyan way".
When avatar clickability is disabled it means that
other players cannot click on your avatar. That is what puts the cross through the hotspot of the avatar. This will not be an issue until we are allowed to share user ages in multiplayer mode. I plan to experiment with this some more to figure out what could go wrong if we do not implement those secundary actions to opening and closing books.
Re: Dynamic Book Template (version 2.1)
Posted: Thu Mar 06, 2008 4:48 am
by andylegate
Hey, when you go to use your texture for the book covers, your take care of it with this line here in the PageDefs file:
Code: Select all
AgeBooks = {'andyjournal': ('<cover src="andyjournalcover"><margin right=32 left=32>', '<font size=12 face=Arial color=000000>', 0, 0),
'agejournal': ('<cover src="agejournalcover"><margin right=32 left=32>', '<font size=12 face=Arial color=000000', 0, 0), 'jishinjournal': ('<cover src="jishinjournalcover"><margin right=32 left=32>', '<font size=12 face=Airal color=000000>', 0, 0), 'nynavevejournal': ('<cover src="nynavevejournalcover"><margin right=32 left=32>', '<font size=12 face=Arial color=000000>', 0, 0), 'philipphjournal': ('<cover src="philipphjournalcover">', '', 0, 0)}
I've noticed if it doesn't know what cover to use, it defaults to the Relto cover. My question is, what is this pointing to? Is it an object or texture in your blend file?
Re: Dynamic Book Template (version 2.1)
Posted: Thu Mar 06, 2008 5:06 am
by D'Lanor
It points to a texture.
btw, I am working on version 3 of this template which has several new features. It supports the notebook gui and different sizes for each book. I have also drastically reduced the number of places where you have to replace *YourAge*.
There is also a new feature that lets you use a clickable image for other actions than linking. That means you can tie any Python routine to a book image.
I have one more thing to do before it is ready: The force owned option should be a setting for a single linking page rather than the whole book.
Re: Dynamic Book Template (version 2.1)
Posted: Thu Mar 06, 2008 5:36 am
by andylegate
That's great D'Lanor!
Your right, it's a texture....more specifically, it points to the name of the image you used for your texture. I just went and looked at my Camp Bravo Age where it works to find out what I was doing wrong. Turns out I used the image name for the texture name.
So, now I went in to the python file and changed the names to the image names, and presto zappo, works now....
Re: Dynamic Book Template (version 2.1)
Posted: Thu Mar 06, 2008 1:14 pm
by Grogyan
Can someone please tell me why the PageDefs and BookGUI wont compile when brought into PlasmaShop, the error is the same for both files, complaining that it can't import plasma on line 4 in the PageDefs and line 9 in BookGUI?
Its one of my last hurdles, and I really need my journal to work, I don't even know if leaving every variable as is will make the book a journal.
I know the solution is simple but right now my brain is failing from lack of sleep and so I can't see it.
Re: Dynamic Book Template (version 2.1)
Posted: Thu Mar 06, 2008 9:53 pm
by Grogyan
Woah! Hey, I figured out the problem, what I did was copy and pasted from the first post, and created a new python file with PlasmaShop, copied its contents, and pasted that at the bottom of my python files (excluding the Journals), and its identical to what I downloaded from that zip in the first post, except for one small thing, an obvious thing as I said, but one that will completely evade you with sleep deprevation (gotta love competitions

).
The problem is that Python gets confused when it sees indents when there shouldn't, and I use Notepad++, so I could see the difference quite clearly (Notepad++ does extra highlighting of indents as well, for indented programming languages), so rather than continue with the last lot of files, I instead used the ones from the
ZIP file and made the necessary changes, and it they all compiled perfectly, conclusion, Python is silly and I still much prefer C/C++.
New problem, that I hope to clear up soon, I can't click on my journal to open it.