Location of Python pak file?

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

Location of Python pak file?

Postby Semjay » Fri Feb 26, 2016 11:36 am

I'm trying to add a journal to my age, Terahgrahm, created in Max. I've successfully managed to add the python component to the book in Max. I've created a .pak file called Terahgrahm.pak containing the following files:

Terahgrahm.pyc (the dummy file for the age)
TerahgrahmBookGUI.pyc, TerahgrahmPageDefs.pyc, TerahgrahmJournal.pyc (python files for the journal).

I'm not sure where to put this file for the game to pick up. I've tried putting it in the python directory within the PotS folder. However, on linking into my age, I see the following error message in the Python0.elf file in the PotS log directory:

(02/26 17:18:19) Python file Terahgrahm.py was not found.
(02/26 17:18:19) Python file TerahgrahmBookGUI.py was not found.
(02/26 17:18:19) xKI.OnServerInitComplete(): age = Terahgrahm

Is this the correct location for my Python Pak file? If not, where should the Pak file go?

Any thoughts?
User avatar
Semjay
 
Posts: 14
Joined: Tue Nov 03, 2015 6:52 am
Location: UK

Re: Location of Python pak file?

Postby dendwaler » Sat Feb 27, 2016 2:18 am

I can confirm that the python.pak file always is in the root of the Python directory.
I do not immediately see what you did wrong, i have no experience with 3d max and how to build with it.
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.

Image

Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 870
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Location of Python pak file?

Postby Dulcamara » Sat Feb 27, 2016 7:46 am

Hello Samjay

i am not the best in explaining. But maybe it help you.

I am put my Pak file always in the UruOffline folder Python.
But if i make the new pak file i work with Alabaster.py and AlabasterBookGUI.py and not with Pyc.
It is possible that it has no meaning. I wanted it but at least mention.
When I get such an error message, I have mostly forgotten to change something in the Alcscipt.
Unfortunately, I do not know what the error in Max could be, because I work with Blender.
User avatar
Dulcamara
 
Posts: 246
Joined: Fri Sep 03, 2010 11:06 am
Location: Alabaster

Re: Location of Python pak file?

Postby Karkadann » Sat Feb 27, 2016 1:55 pm

There is another way to add journals, linking books and Bahro stones to an age I found a bit easer using some python files Sirius wrote
you may wanna check them out they work in both Blender and Max

viewtopic.php?f=9&t=6197
"It is the responsibility of every student to try and surpass there teacher"
Sorry teach a Bahro ate my homework again
User avatar
Karkadann
 
Posts: 1218
Joined: Sun Aug 02, 2009 10:04 am
Location: Class Clown University

Re: Location of Python pak file?

Postby Deledrius » Sat Feb 27, 2016 2:02 pm

The method you chose should be working, Semjay, but those files should not end in pyc, but py (as Dulcamara points out). The packer should automatically handle compiling your Python scripts, IIRC.
User avatar
Deledrius
Gehn Shard Admin
 
Posts: 1107
Joined: Mon Oct 01, 2007 1:21 pm

Re: Location of Python pak file?

Postby Semjay » Sat Feb 27, 2016 3:47 pm

Thank you all for your input, I have now got it working.

The problem was caused by me using PlasmaShop3, which only allows .pyc files to be added to Python pak files. I was using the .pyc files that were made by the Max plugin which don't appear to be compatible with the game. Using PlasmaShop2 and allowing it to compile the original .py files when building the Python .pak file fixed the problem.

Many thanks again.
User avatar
Semjay
 
Posts: 14
Joined: Tue Nov 03, 2015 6:52 am
Location: UK


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest