Is the Code for My Age Available?

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

Re: Is the Code for My Age Available?

Postby Jennifer_P » Tue Dec 18, 2007 1:29 am

Whoopsy--guess I shouldn't have skimmed the details there, thanks for catching me. Ah, and instructions right in your tutorial too. Perfecto!
Jennifer_P
 
Posts: 729
Joined: Fri Sep 28, 2007 10:54 pm

Re: Is the Code for My Age Available?

Postby Trylon » Tue Dec 18, 2007 5:24 am

PyPRP 101:

First, a prp file is basically a large array of objects. PyPRP can assemble and disassemble these lists.
PyPRP also has a large number of classes for each object in a prp file.
These classes share the same behaviour for a large part:
Code: Select all
### PSEUDOCODE ###
class plClassName:
    def __init__(self,name,type=0x0006): # the 0x0006 is an example object type nr, these are different for each object
        #initializes the object by inserting default variables
   
    def read(self,stream):
        # Read in the object-specific data into variables

    def write(self,stream):
        # Write out the variables into object-specific data

    def export_obj(self,obj): # form can vary
        # Reads in blender data from the blender object (the obj variable) and fills in the prp objectg fields based on that data
   
    def import_obj(self,obj): # form can vary
        # Reads in the prp-specific variables, and uses them to set the correct settings on the blender objects


Note, that this is only basic structure, not all classes have export/import functions, as sometimes variables are set or read externally.

Pyprp has a resource manager that manages creation of each object, and makes them findable. That one also handles storage and reading.

Another function of pyprp's resource manager is to handle basic blender interpretation. From the code in the export function in the resource manager, the objects are made, or object creation is delegated.
It basically follows a list of all blender objects, and created prp objects according to different settings on the blender objects.


Hope this helps...
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: Is the Code for My Age Available?

Postby Jennifer_P » Tue Dec 18, 2007 6:11 am

Well, I understand about 95% more about PyPRP than I knew before reading your post, Trylon. :) I'll certainly have a use for some of this information in my explanation of the files underlying the Age, although some of it is over my head at the moment I'm afraid. Heh, I'd ask you to explain, but I have a feeling that it might result in a kind of recursive effect where I have more and more questions the more you expand my limited knowledge. And I wouldn't want to pester you too much with questions when I haven't even looked for the answers myself. :geek:
And Chacal, I got UruFun and PYPRPExplorer downloaded and opened up the .sum, .age, and .fni files plus those human unreadable .prp files. It was pretty interesting seeing all the internal structure behind the GUIs--sort of like dissecting a frog or something. :D Thanks for posting that tutorial. :)
Jennifer_P
 
Posts: 729
Joined: Fri Sep 28, 2007 10:54 pm

Re: Is the Code for My Age Available?

Postby Chacal » Tue Dec 18, 2007 8:15 am

Good!
After you complete your assignment I'll tell you about a nifty feature of prpExplorer, a kind of sugarcoating.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2509
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Is the Code for My Age Available?

Postby Jennifer_P » Tue Dec 18, 2007 11:46 am

Ooooh... :)
Jennifer_P
 
Posts: 729
Joined: Fri Sep 28, 2007 10:54 pm

Re: Is the Code for My Age Available?

Postby Zrax » Mon Jan 14, 2008 4:53 pm

Not meaning to toot my own horn or anything, but PlasmaShop really is a lot more powerful and useful than UruFun (and supports more file formats and games) ;). And with regards to the PRP documentation, Cyan asked us a long time ago to stop posting that information out in the public, so although the COBBS docs are horribly outdated (and in some cases, horribly wrong/incomplete/unhelpful/etc), all of our newer stuff is held private among the major tool devs right now.
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: Is the Code for My Age Available?

Postby Grogyan » Mon Jan 14, 2008 9:52 pm

Its a great program Zrax, any idea about any upgrades to it?

I also use urupython 3.1 to decompile scripts back to .py after PlasmaShop.
Show Spoiler
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: Is the Code for My Age Available?

Postby Chacal » Tue Jan 15, 2008 12:06 am

Yes, Plasmashop is a great tool.
Chacal


"The weak can never forgive. Forgiveness is an attribute of the strong."
-- Mahatma Gandhi
User avatar
Chacal
 
Posts: 2509
Joined: Tue Nov 06, 2007 2:45 pm
Location: Quebec, Canada

Re: Is the Code for My Age Available?

Postby Zrax » Tue Jan 15, 2008 8:48 pm

Grogyan wrote:Its a great program Zrax, any idea about any upgrades to it?


Well, as I mentioned in the last release a week or so ago, I still need to finish the Hex Isle support (It's supported, but I need to add stuff like the syntax highlighting for .hex and .fx files -- and maybe even eventually a level editor of sorts)... If you have ideas beyond that, I'm always open to them :). Oh, and PlasmaShop will actually decompyle python as well as compyling it -- that seems to be the most "accidentally hidden" feature about it, I've noticed :\. Perhaps I'll find a way to fix that in a future update too ;).
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: Is the Code for My Age Available?

Postby Robert The Rebuilder » Wed Jan 16, 2008 8:11 am

Hello, Zrax!

I use PlasmaShop quite a bit. One feature I'd like to see is line numbers in the Python editor, which is very handy when the Plasma logs cite an error at a specific line. If line numbers are too difficult to do, then having a "jump-to-line" option would be just as useful. Of course, it would be great to have both features - but then, I'm being greedy!

Keep up the great work - looking forward to changing my avatar to Osmo! :-)
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

PreviousNext

Return to Scripting

Who is online

Users browsing this forum: No registered users and 2 guests