Page 2 of 3
Re: Is the Code for My Age Available?
Posted: Tue Dec 18, 2007 1:29 am
by Jennifer_P
Whoopsy--guess I shouldn't have skimmed the details there, thanks for catching me. Ah, and instructions right in your tutorial too. Perfecto!
Re: Is the Code for My Age Available?
Posted: Tue Dec 18, 2007 5:24 am
by Trylon
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...
Re: Is the Code for My Age Available?
Posted: Tue Dec 18, 2007 6:11 am
by Jennifer_P
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.
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.

Thanks for posting that tutorial.

Re: Is the Code for My Age Available?
Posted: Tue Dec 18, 2007 8:15 am
by Chacal
Good!
After you complete your assignment I'll tell you about a nifty feature of prpExplorer, a kind of sugarcoating.
Re: Is the Code for My Age Available?
Posted: Tue Dec 18, 2007 11:46 am
by Jennifer_P
Ooooh...

Re: Is the Code for My Age Available?
Posted: Mon Jan 14, 2008 4:53 pm
by Zrax
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.
Re: Is the Code for My Age Available?
Posted: Mon Jan 14, 2008 9:52 pm
by Grogyan
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
http://alcugs.almlys.org/wiki/index.php/Python
Re: Is the Code for My Age Available?
Posted: Tue Jan 15, 2008 12:06 am
by Chacal
Yes, Plasmashop is a great tool.
Re: Is the Code for My Age Available?
Posted: Tue Jan 15, 2008 8:48 pm
by Zrax
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

.
Re: Is the Code for My Age Available?
Posted: Wed Jan 16, 2008 8:11 am
by Robert The Rebuilder
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!
