Pictures in Journals

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

Postby Aloys » Fri Oct 13, 2006 2:45 pm

Two things always irked me in Uru as big unexplainable step back from Myst: Fly-bys and Journals.
I won't go over flys-bys again.
But about journals: what lacks in the Uru journals are PICTURES. Drawings, sketches, etc.. The DRC journals are a bit 'formal', and the other journals.. hm no, there are no other journals. Just the note from Atrus in Cleft, and drawings on some desks (teledahn, baron city office), but those aren't journals, just textures on guis.
I pondered over the 'why' of this lack of support for pictures in journals, and found some possible answer, but the bottom line is there is no picture support as of now and that's a big lack IMHO.
I would love to have journals with drawings.. It that possible? I'm guessing the way the UAM API handles this the answer is 'no'.
So what can we do? GUI aren't possible for now. Any way we could add pictures to the journals? Journals in Uru are a simpler form of HTML if I remember right, couldn't we add an tag somewhere? ;)
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Postby Paradox » Fri Oct 13, 2006 4:48 pm

Theoretically yes.

It might mess a bit with the flow of the text. Try it out and see. :P
Paradox
 
Posts: 1292
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Postby Tsar Hoikas » Fri Oct 13, 2006 9:24 pm

QUOTE ("Some Private Wiki")

Plasma Book Markup Language

The PBML is based off of HTML, but is very specific to Plasma (journals, books, notes, etc). There are *no* end tags (like

), and line breaks are taken literally (instead of
). There are also no quotes used around property values within the PBML tags (except in src properties). Assume that all properties are optional, except for src=.

cover



Specifies a cover image for a book or journal.
[edit]
decal

PotS Only!



Places a simple decal
[edit]
font



Change the font face, size, color and style (bold, Italic or both) for rendering text (These fonts are from the .p2f files).

img



Inserts an image into the book (with an optional link, specified by link page ID).

margin



Specifies a margin (in pixels) to use around a set of items.

p



Start a block of text (not necessarily a paragraph), using the features specified.

pb



Indicates a page break. Anything after this will go on to the next page in the book or journal
[/quote]

This is not the complete page, but enough to get you started.

Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Postby Aloys » Sat Oct 14, 2006 6:59 am

Ooooh indeed. I just checked all of the Uru journals ingame I could think of (gah; too many of them..) and indeed the original Journey journal in Relto includes pictures ("logos" for the Ages) :rolleyes: but it's the only one. So it is technically possible, it's just that all of the other Uru journals are DRC journals that don't have any..

I assume that the covers and pictures must be included in the Age textures Prp.
Great then, we shall again have journals full of drawings, random scriblings and plenty of coffee mugs marks on the pages.. :D
Thanks for the info! :)


(now if only I could get decompyle to work again so I could check out the Uru journals python files..)
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Postby Robert The Rebuilder » Sat Oct 14, 2006 7:55 am

[quote="Aloys"] (now if only I could get decompyle to work again so I could check out the Uru journals python files..)

Aloys:

PlasmaShop 2.1 has decompyle built-in. Here's a link to installation instructions:

http://alcugs.almlys.org/wiki/index.php/AgeCompile
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

Postby Tsar Hoikas » Sat Oct 14, 2006 8:59 am

Decal can be seen in use in the DRC Jounal in the Watcher's Sanctuary.
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Postby Aloys » Sun Oct 15, 2006 7:31 am

Thanks for the plasmashop tip, I had plasmashop installed but I was still running version 1.something...
However it complained that python22.dll is missing. I had to format my hard drive two weeks ago, so I'm still struggling to correctly reinstall and configure all those darned tools.. :ph34r: And sure enough I had to reinstall numerous versions of python but not 2.2.3...
When I'm done I'll make a ghost image of my C:\ I guess.. :P
I'm glad I installed plasmashop version 2.1, Zrax did a fine job with this tool.

[edit]
I think I'll go write a tutorial about all that if you dont' mind. :) (Dustin had written the basics in his 'second Age' tut, I'll expand on those)
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Postby Aloys » Wed Oct 18, 2006 6:23 pm

I tried, I really tried hard to make a clickable journal, but I don't know a thing about Python and after spending hours browsing the Wiki and fidling with Py files and plasmashop I'm stuck with this (from the python0.log):

(10/19 02:59:38) Traceback (most recent call last):
(10/19 02:59:38) File "D:\Temp\tmp80.tmp\0.py", line 69, in glue_getInst
(10/19 02:59:38) File "D:\Temp\tmp80.tmp\0.py", line 53, in glue_getClass
(10/19 02:59:38) TypeError: issubclass() arg 1 must be a class
(10/19 02:59:38) Python file 0.py, instance not found.
(10/19 02:59:38) Traceback (most recent call last):
(10/19 02:59:38) File "D:\Temp\tmp80.tmp\0.py", line 69, in glue_getInst
(10/19 02:59:38) File "D:\Temp\tmp80.tmp\0.py", line 53, in glue_getClass
(10/19 02:59:38) TypeError: issubclass() arg 1 must be a class
(10/19 02:59:38) Python file 0.py, instance not found.

The error returned is from the glue part but I haven't touched that part (imported it from Dustin tut.py from this 6th tutorial). The full python file is here 0.py.

The Age name is "0" and so is the PAK file and the py file inside.

The python file without the glue part:
Code: Select all
from Plasma import *
from PlasmaTypes import *
from UruAgeManager import *
from xPsnlVaultSDL import *
actClickableObject = ptAttribActivator(1, 'Act: Clickable Object')

# Note: Change all "ptResponder" to "ptModifier" for a Modifier class

class BookTest1(ptResponder):
    __module__ = __name__

    def __init__(self):
        ptResponder.__init__(self)
        self.id = 160001
        self.version = 1

    def OnFirstUpdate(self):
        print 'BookTest1 on first update'

    def OnServerInitComplete(self):
        print 'BookTest1 on serverinitcomplete'

    def OnNotify(self, state, id, events):
       print 'BookTest1 on OnNotify',
       print id
       if (ObjectMsg.value == 'BookObject'):
                uam.output('BookTest1: showing journal')
                uam.showBook('PBML Journal', self.key)
                
    def OnSDLNotify(self, VARname, SDLname, playerID, tag):
        print 'BookTest1 SDL notify.'

    def OnTimer(self, id):
        print 'BookTest1 Timer update',
        print id
        

Why is Uru looking at D:\Temp\tmp80.tmp?? I guess that's where plasmashop stock his temp files.
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Postby Tsar Hoikas » Thu Oct 19, 2006 1:27 pm

Class need to be same name as age IIRC... And yes, I assume that is where Plasma Shop stores your stuff temporarily. EG For me it would be something like P:\URU\UU Stuff\python
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Postby Aloys » Thu Oct 19, 2006 3:12 pm

YAAAAAAAAAAAH!
:ph34r:
That worked. ;)
You were right about the name :) Thanks.
Of course my Age was named '0' (zero) and it wouldn't compile at first because variables in python can't have a number a something to that effect so I had to create a new Age with a valid name etc.. but in the end it worked and I got a clickable journal working. :)
(Solving all of Kadish's puzzles was easier than getting this script to work.)

I will now finish writing my tutorial, and I should have a straight step-by-step easy to follow tutorial up on the wiki by tomorrow. :)

[edit]
Hmm that tutorial will wait because I've got a problem: I can't get out of the Book GUI :rolleyes: I do have the 'click' cursor outside of the book but clicking doesn't do a thing. (Well actually it does: the framerate drops more and more each time I click :huh: )
Beside the python log spits out hundreds of "AAAAA on OnNotify -1" , several dozens per second. (one per FPS?)
User avatar
Aloys
 
Posts: 1968
Joined: Sun Oct 21, 2007 7:57 pm
Location: France (GMT +1)

Next

Return to Scripting

Who is online

Users browsing this forum: Google [Bot] and 1 guest