ERROR: Unable to open .\EGAHEAD.4: Secret of the Oracle for writing!

ModKeen mods Tiles and Sprites in all episodes of Commander Keen.
Post Reply
User avatar
Alopex
Posts: 28
Joined: Thu Jun 15, 2017 7:27 pm
Location: Bloogfoods, Inc.

ERROR: Unable to open .\EGAHEAD.4: Secret of the Oracle for writing!

Post by Alopex »

Hello, guys!

This is my first post here!

I'm trying to create my own Keen 4 mod but I'm facing a problem: when I try to import graphics with modkeen, a nasty error occurs as the title suggests.

This is what my Keen4mod contains:
BMP [folder]
AUDIO.CK4
CK4PATCH.EXE
CWSDPMI.EXE
EGAGRAPH.CK4
GAMEMAPS.CK4
KEEN4E.EXE
modkeen.exe
mymod.pat
Play.bat
unlzexe.exe
I followed the Ceilick's tutorial till the "Importing Graphics and Texts" and "Patch File and Batch File" sections and now I don't know how to resolve this problem.

Can anyone help me?

P.S: these are what .pat and .bat files contain:

mymod.pat :
%ext ck4
%version 1.4
# Load the modified graphics
%egahead EGAHEAD.CK4
%end
Play.bat :
ck4patch mymod.pat
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Re: ERROR: Unable to open .\EGAHEAD.4: Secret of the Oracle for writing!

Post by Fleexy »

Welcome to Keen Modding!

Just so we're on the same page, I'm testing this in DOSBox with ModKeen 2.0.1. I'm using this command to import:

Code: Select all

modkeen -import -episode=4 -bmpdir=BMP
I get this error when EGAHEAD.CK4 is marked read-only. Could you please check that file's properties? Also try restarting DOSBox after making any change to the directory structure outside the DOS environment.

If ModKeen continues to give you trouble, you might like Keengraph by Levellass, which is very featureful and very fast. I should probably write a modding tutorial using all the newest tools sometime.
User avatar
Alopex
Posts: 28
Joined: Thu Jun 15, 2017 7:27 pm
Location: Bloogfoods, Inc.

Re: ERROR: Unable to open .\EGAHEAD.4: Secret of the Oracle for writing!

Post by Alopex »

Fleexy wrote: Fri Jun 16, 2017 4:46 pm Welcome to Keen Modding!

Just so we're on the same page, I'm testing this in DOSBox with ModKeen 2.0.1. I'm using this command to import:

Code: Select all

modkeen -import -episode=4 -bmpdir=BMP
I get this error when EGAHEAD.CK4 is marked read-only. Could you please check that file's properties? Also try restarting DOSBox after making any change to the directory structure outside the DOS environment.

If ModKeen continues to give you trouble, you might like Keengraph by Levellass, which is very featureful and very fast. I should probably write a modding tutorial using all the newest tools sometime.
Actually, I don't have EGAHEAD.CK4 in my Keen4mod folder. For some reason that file wasn't generated and that's why I think the error occurs because the file doesn't exist.

Any suggestion?
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Re: ERROR: Unable to open .\EGAHEAD.4: Secret of the Oracle for writing!

Post by Fleexy »

EGAHEAD.CK4 should be created on the first import; apparently something else is amiss. Please try this command in DOSBox to try to manually create an empty file by that name:

Code: Select all

echo.> EGAHEAD.CK4
If that runs without errors, run this to remove that little file:

Code: Select all

del EGAHEAD.CK4
If the first command failed, please post the error message. A couple more questions so we can try to troubleshoot futher: what is the full command that you're running to import the graphics? Is there anything unusual about the folder name/path? Which OS are you using? Also make sure that you're using the newest ModKeen version available - there is a download link in my previous post.
User avatar
Alopex
Posts: 28
Joined: Thu Jun 15, 2017 7:27 pm
Location: Bloogfoods, Inc.

Re: ERROR: Unable to open .\EGAHEAD.4: Secret of the Oracle for writing!

Post by Alopex »

Code: Select all

echo.> EGAHEAD.CK4
OK, I used this command to create EGAHEAD.CK4, so now I have it in my Keen4mod folder but... same problem!
ERROR: Unable to open .\EGAHEAD.4: Secret of the Oracle for writing!
what is the full command that you're running to import the graphics?
I'm running this command, but I also tried the one you suggested me but still nothing:
modkeen -episode=4 -import -bmpdir="BMP"
as the Ceilick's tutorial says.
Is there anything unusual about the folder name/path?
The folder name's Keen4mod and it is inside another folder called Keen Modding. Keen Modding is on my Desktop.
Which OS are you using? Also make sure that you're using the newest ModKeen version available - there is a download link in my previous post.
I'm using Windows 10 64 bit and I'm also using the 2.0.1 version of ModKeen.
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Re: ERROR: Unable to open .\EGAHEAD.4: Secret of the Oracle for writing!

Post by Fleexy »

You can delete that small EGAHEAD.CK4; it was just to test that the folder can be written to. It's possible the space in that path might be causing issues, though I can't reproduce such behavior. Maybe try renaming that outer folder to something 8 characters or less and with no spaces involved?

I did just notice another thing. When I get that error (by setting my EGAHEAD.CK4 read-only), it doesn't include "Secret of the Oracle", and that text doesn't appear in my MODKEEN.EXE at all. Please try downloading the ModKeen package I linked and see if anything changes. Possibly relevant: the KeenWiki article on ModKeen.
User avatar
Alopex
Posts: 28
Joined: Thu Jun 15, 2017 7:27 pm
Location: Bloogfoods, Inc.

Re: ERROR: Unable to open .\EGAHEAD.4: Secret of the Oracle for writing!

Post by Alopex »

Fleexy wrote: Fri Jun 16, 2017 9:07 pm You can delete that small EGAHEAD.CK4; it was just to test that the folder can be written to. It's possible the space in that path might be causing issues, though I can't reproduce such behavior. Maybe try renaming that outer folder to something 8 characters or less and with no spaces involved?

I did just notice another thing. When I get that error (by setting my EGAHEAD.CK4 read-only), it doesn't include "Secret of the Oracle", and that text doesn't appear in my MODKEEN.EXE at all. Please try downloading the ModKeen package I linked and see if anything changes. Possibly relevant: the KeenWiki article on ModKeen.
Ta-da! It worked!

I resolved the problem downloading the version of ModKeen that you suggested in the previous post. I think that the one you can download from http://www.shikadi.net/keenwiki/Keen_Ga ... y_Ceilick) is just outdated, that's why it didn't work properly.

Thanks a lot for the help, Fleexy! I hope now I can start to create something nice for the mod.
User avatar
Fleexy
Site Admin
Posts: 490
Joined: Fri Dec 12, 2008 1:33 am
Location: Bloogton Tower

Re: ERROR: Unable to open .\EGAHEAD.4: Secret of the Oracle for writing!

Post by Fleexy »

You're very welcome. Happy modding!
User avatar
Nisaba
Posts: 320
Joined: Fri Jan 01, 2016 11:15 pm
Location: patch.pat
Contact:

Re: ERROR: Unable to open .\EGAHEAD.4: Secret of the Oracle for writing!

Post by Nisaba »

Alopex wrote: Fri Jun 16, 2017 10:15 pm
Fleexy wrote: Fri Jun 16, 2017 9:07 pm [...] When I get that error (by setting my EGAHEAD.CK4 read-only), it doesn't include "Secret of the Oracle", and that text doesn't appear in my MODKEEN.EXE at all. Please try downloading the ModKeen package I linked and see if anything changes. Possibly relevant: the KeenWiki article on ModKeen.
Ta-da! It worked!

I resolved the problem downloading the version of ModKeen that you suggested in the previous post. I think that the one you can download from http://www.shikadi.net/keenwiki/Keen_Ga ... y_Ceilick) is just outdated, that's why it didn't work properly.
[...]
strange...
haven't noticed this kind of problem before. thanks for posting!
I guess I'll have to test the tutorial package once more and update the modkeen files if needed. (gonna let you guys know, when done.)
Post Reply