compiling a python file for uru:CC

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

compiling a python file for uru:CC

Postby jfmherokiller » Sat Nov 27, 2021 1:30 pm

I will admit that this is for testing possible fixes for mystV levels.

but how does one compile python files for this game.

my current thought process was first checking that cypython22.dll file.

it showed this

Image

eg python 2.2.2

so then I grabbed python 2.2.2 from here https://www.python.org/downloads/release/python-222/

After extracting the setup file I finally attempted to compile one of the files using this code
Code: Select all
.\Python222\python.exe -c "import py_compile; py_compile.compile('src/xYeeshaBinderFragment.py')"


I then created a pak file and inserted the file.

However, the game seems to think the file doesn't exist. Is there something I'm missing? If the file has an error I thought I would see it in Python.0.elf.
jfmherokiller
 
Posts: 19
Joined: Thu Nov 25, 2021 11:53 am

Re: compiling a python file for uru:CC

Postby Sirius » Sat Nov 27, 2021 3:10 pm

Python is very picky about correct version numbers when using compiled scripts. I'm using version 2.2.3, and it works fine:
Code: Select all
Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on win32

Also, (just in case) keep in mind Uru will prioritize PAK files that were recently modified when encountering duplicate scripts.

I also recommend the older PlasmaShop 2.x version (listed here) to edit PAK files. It allows you to specify the path to the Python 2.2 executable, and it will compile scripts on its own without you needing to manually compile them. Somehow this isn't available in the new PlasmaShop.

I'm also planning to go back to fixing a few things in the Myst V conversion someday soon. If you're looking to fix something in particular I can probably look at it too :)
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: compiling a python file for uru:CC

Postby jfmherokiller » Sat Nov 27, 2021 4:49 pm

Sirius wrote:Python is very picky about correct version numbers when using compiled scripts. I'm using version 2.2.3, and it works fine:
Code: Select all
Python 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)] on win32

Also, (just in case) keep in mind Uru will prioritize PAK files that were recently modified when encountering duplicate scripts.

I also recommend the older PlasmaShop 2.x version (listed here) to edit PAK files. It allows you to specify the path to the Python 2.2 executable, and it will compile scripts on its own without you needing to manually compile them. Somehow this isn't available in the new PlasmaShop.

I'm also planning to go back to fixing a few things in the Myst V conversion someday soon. If you're looking to fix something in particular I can probably look at it too :)


thanks for the resources I am using the latest version of plasmashop (this release https://github.com/H-uru/PlasmaShop/releases/tag/r298 ) and when studying this page of the wiki https://www.guildofwriters.org/wiki/Cre ... ython_File a lot of the options don't seem to line up.

as for the actual mystv fixes I'm mostly at the moment concerned with these missing file errors.

Image

Also the FTP link in that post doesn't work it needs account info I don't have.


As far as I can tell none of the paks in my uruCC install contain those scripts.
jfmherokiller
 
Posts: 19
Joined: Thu Nov 25, 2021 11:53 am

Re: compiling a python file for uru:CC

Postby Sirius » Sun Nov 28, 2021 5:04 am

jfmherokiller wrote:Also the FTP link in that post doesn't work it needs account info I don't have.

Ah yes, strange. Here you go.


Missing file errors are harmless, they just clutter the log file. However, from what I can see here, you converted Myst V Ages using Drizzle32, but the game fails to find the Python scripts that come with it (such as xLinkInFlyover and dsntElevator). Make sure that you copy the files included with Drizzle32 into your Uru folder, otherwise Ages from Myst V will be completely buggy !
User avatar
Sirius
 
Posts: 1506
Joined: Mon Jul 26, 2010 4:46 am
Location: France

Re: compiling a python file for uru:CC

Postby jfmherokiller » Mon Nov 29, 2021 12:36 pm

Sirius wrote:
jfmherokiller wrote:Also the FTP link in that post doesn't work it needs account info I don't have.

Ah yes, strange. Here you go.


Missing file errors are harmless, they just clutter the log file. However, from what I can see here, you converted Myst V Ages using Drizzle32, but the game fails to find the Python scripts that come with it (such as xLinkInFlyover and dsntElevator). Make sure that you copy the files included with Drizzle32 into your Uru folder, otherwise Ages from Myst V will be completely buggy !


Thanks for both pieces of info For some reason I think I installed the scripts into mystv not uru. That would explain the fact that I didn't see the scripts in uru.
jfmherokiller
 
Posts: 19
Joined: Thu Nov 25, 2021 11:53 am


Return to Scripting

Who is online

Users browsing this forum: No registered users and 9 guests

cron