Page 1 of 1

Location of Python pak file?

PostPosted: Fri Feb 26, 2016 11:36 am
by Semjay
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?

Re: Location of Python pak file?

PostPosted: Sat Feb 27, 2016 2:18 am
by dendwaler
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.

Re: Location of Python pak file?

PostPosted: Sat Feb 27, 2016 7:46 am
by Dulcamara
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.

Re: Location of Python pak file?

PostPosted: Sat Feb 27, 2016 1:55 pm
by Karkadann
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

Re: Location of Python pak file?

PostPosted: Sat Feb 27, 2016 2:02 pm
by Deledrius
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.

Re: Location of Python pak file?

PostPosted: Sat Feb 27, 2016 3:47 pm
by Semjay
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.