maxim-zhao / psrp

Phantasy Star Retranslation Project
http://www.smspower.org/Translations/PhantasyStar-SMS-EN
65 stars 10 forks source link

Tools.py "list index out of range" #64

Closed TiredTeddybear closed 3 years ago

TiredTeddybear commented 3 years ago

Hi, I was checking out the tools to see about making some small personal tweaks to the English translation. However, when I ran NMAKE, it resulted in an error message of "'py' is not recognized as an internal or external command, operable program or batch file." This was especially strange, as I know I have Python added to PATH and PYTHONPATH.

Running Tools.py in IDLE gives me this: "IndexError: list index out of range" for lines 645 and 659. This led me to deduce that Tools.py is not meant for Python 3.9.5.

What version of Python is Tools.py dependent on?

Thank you for your time. I wasn't sure where else to ask this.


I seem to have corrected the issue outlined in the first paragraph by placing py.exe and pyw.exe in the same folder as the rest of my Python files. The second paragraph remains valid, however.

I tried again to build and it seemed to go smoothly, until it came time to insert the new graphics. It was then I received this issue.

Loading new_graphics\bg1.bin...
Fatal error: Parameter is not valid.
Guru meditation:
   at System.Drawing.Bitmap..ctor(String filename)
   at BMP2Tile.Converter.GetBitmap()
   at BMP2Tile.Converter.GetTiles()
   at BMP2Tile.Converter.SaveTiles(String filename)
   at BMP2Tile.Program.<>c__DisplayClass1_0.<Main>b__2(String s)
   at BMP2Tile.Program.Main(String[] args)
NMAKE : fatal error U1077: 'C:\Users\Achilles\Downloads\psrp-master\psrp-master\psrp-master\bmp2tile-05\bmp2tile.exe' : return code '0x1'
Stop.

This happens with both my edited files as well as the unaltered, official v2.1 files downloaded from the repo. My makefile is set up accordingly: (yes, i have it nested in 3 psrp-master folders, i did that on purpose)

WLAZ80 = "C:\Users\Achilles\Downloads\psrp-master\psrp-master\psrp-master\wla_dx_912\wla-z80.exe"
WLALINK = "C:\Users\Achilles\Downloads\psrp-master\psrp-master\psrp-master\wla_dx_912\wlalink.exe"
# FLIPS = "..\..\..\sms-build-tools\flips\flips.exe"
BMP2TILE = C:\Users\Achilles\Downloads\psrp-master\psrp-master\psrp-master\bmp2tile-05\bmp2tile.exe
PY = "py"

I commented out FLIPS as I only need the output game file for personal testing at the moment.

maxim-zhao commented 3 years ago

I'm using Python 3.9.4. Maybe your "py" picks up some older version - but "python" may work better.

The BMP2Tile error suggests you need a newer version. I'm using a feature which was added since version 0.5 - so I ought to make a release. Use the version from https://github.com/maxim-zhao/sms-build-tools for an immediate fix.

TiredTeddybear commented 3 years ago

Ah, I believe that would explain it. I'm using v0.5 of BMP2Tile, actually. I followed the link to the repo and downloaded the compiled binary.

If you wouldn't mind keeping this issue open until I try it for myself, I'd be appreciative. Thank you for your swift reply.

Edit - I've done several tests and all works well. Thank you again.