Compiling .py files into .pak files and linking fossils

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

Compiling .py files into .pak files and linking fossils

Postby Metabasalt1 » Mon Aug 11, 2008 1:31 pm

Shorah GoW programmers. I have two separate ages, and I am trying to link between them with a "linking fossil" . D'Lanor has given me simple python code to use, I have my Alcscript code done, and my fossil is clickable. My problem is packing my .py files into a pak file. I did it before using Plasmashop, but for some reason it is not working! I am getting errors in Plasmashop when it tries to compile the .py files into .pak such as path to Python 2.2 not found. Arg, how frustrating. If one of you could compile the .py files into a Dragons_tooth.pak file, I would be grateful. Or tell me why Plasmashop is not working. Thanks.
The .py files are attached to this post in the form of a zip file.
Metabasalt
The .py files are attached to this post in the form of a zip file.
Attachments
Dragons_tooth2.zip
(4.63 KiB) Downloaded 292 times
Metabasalt1
 
Posts: 68
Joined: Fri Apr 25, 2008 6:03 pm

Re: Compiling .py files into .pak files and linking fossils

Postby D'Lanor » Mon Aug 11, 2008 4:43 pm

You can also use UruFun to compile and pak. It does not require older Python versions to be installed.

There is also an error in the glue section of your files. Let me see...
"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: Compiling .py files into .pak files and linking fossils

Postby D'Lanor » Mon Aug 11, 2008 4:51 pm

Here you go.

Dragons_tooth3.zip
"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: Compiling .py files into .pak files and linking fossils

Postby ardent red » Wed Aug 13, 2008 2:45 am

Glad to see that progress is being made on the linking fossils, Metabasalt! I'm intrigued by the second version of the age, and what changes you will have made to it since I first saw it!

And no, I have no programming advice, sorry- then again, perhaps that's a good thing, as my python leaves a lot to be desired :P. /me points at large, exploded canyon that was the result of wonky self-written code in age

*places topic back on track*
ardent red
 
Posts: 150
Joined: Fri Apr 18, 2008 3:41 pm
Location: The big little New Zealand

Re: Compiling .py files into .pak files and linking fossils

Postby Zrax » Wed Aug 13, 2008 12:46 pm

PlasmaShop currently requires you to install Python in order to deal with .pak files. You can download Python 2.2 at this location. After you install it, open PlasmaShop and go to File -> Options -> Python tab and provide the location of python.exe from the Python 2.2 folder you just installed.
User avatar
Zrax
 
Posts: 206
Joined: Fri Sep 28, 2007 5:19 pm
Location: Waist-deep in a conecano

Re: Compiling .py files into .pak files and linking fossils

Postby Metabasalt1 » Sun Aug 17, 2008 6:12 pm

Shorah! I am still trying to create a linking fossil from my Dragon's tooth age to my Ordovician age. So far, no luck. I have uploaded packed blender files, the sdl file, and python file to a server. If you could take a look at it and tell me where I am going wrong, I would be grateful. Thank you.
Metabasalt
The link to the files is:
http://www.mediafire.com/?gmtmgnylucg
Metabasalt1
 
Posts: 68
Joined: Fri Apr 25, 2008 6:03 pm

Re: Compiling .py files into .pak files and linking fossils

Postby Metabasalt1 » Sun Aug 17, 2008 6:14 pm

I forgot to mention in the last post, the name of the download file is D'Lanor.zip. D'Lanor has been trying to help me.
Metabasalt
Metabasalt1
 
Posts: 68
Joined: Fri Apr 25, 2008 6:03 pm

Re: Compiling .py files into .pak files and linking fossils

Postby D'Lanor » Mon Aug 18, 2008 4:26 am

Right, and we are getting nowhere fast.

The Python.0.elf logfile shows no errors. But then there is no debugging implemented in the Python file so at this point we don't even know if it is called at all. The simpleclick script looks ok now (although I prefer the 4 spaces notation instead of a tab).

Can you post your most recent export logfile as well? I want to see if it skips the pythonfilemod again like it did last time.

Edit: And now for some debugging. Can you compile this file into your pak?
Dragons_toothfossil.py.zip

Then try to link and post the Python.0.elf logfile here.
"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: Compiling .py files into .pak files and linking fossils

Postby Metabasalt1 » Mon Aug 18, 2008 6:27 pm

D'Lanor:
Ok. I tried three fixes tonight. First I put your new .py file into my Dragon's tooth .pak file. Dropped it in my python folder of my uru directory, and ran uru. The link did not work, so I put the python.0.elf file in a folder called run 1. Then I went into the alcscript file, deleted the tabs, and put 4 spaces where the tabs were. Exported PyPRP, ran uru, and again no link. Put the elf file in run 2. Then, I thought, I have a working clickable object in my blender file (the one that runs the limestone door for the cave), so I pulled out the python file for the door and put in the Dragon's tooth fossil file. Exported, ran uru, no link, but the door still worked! Weird! Put elf file in run 3.
Hope this hopes. Thanks for not giving up D'Lanor!
Metabasalt
Attachments
RUNS.zip
(67.88 KiB) Downloaded 281 times
Metabasalt1
 
Posts: 68
Joined: Fri Apr 25, 2008 6:03 pm

Re: Compiling .py files into .pak files and linking fossils

Postby D'Lanor » Tue Aug 19, 2008 2:41 am

The logfiles do not contain any of the debugging I added. That means the Python file is not being called at all.

Your age export keeps skipping the creation of the pythonfilemod. Just to be sure, does the alcscript look like this?

Code: Select all
fossil:
    physical:
        pinned: true
    quickscript:
        simpleclick:
            pythonfile: Dragons_toothfossil
            region: myclickregion


Edit: I found the problem in the blendfile you sent. Your corrected script is in a text datablock called Dragons_toothACL, which will be ignored at export. It should be in the AlcScript text datablock. The old script in the AlcScript section is indeed missing the pythonfile line.

This week alone you are the second person I know of who made that mistake. This seems to be a very common beginners error. And not just beginners, because I missed it too the first time. :oops:

Edit 2: Added to the Troubleshooting FAQ.
"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


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron