"datafile" and "datadir" in CD use

Started by Rui 'Trovatore' Pires, Sun 11/04/2004 19:00:39

Previous topic - Next topic

Rui 'Trovatore' Pires

Ok, I've been fiddling around with a CD-RW and "datafile" and "datadir", seeing how I could make a game playable from CD. And you know what? I found out that, unless I'm doing something very wrong, you can only put your .VOX files in the CD - put game.00?, and it won't work.

Could this be changed somewhat? I also tried "datadir" and put in both AC2GAME.AGS and all LARRY 2.00? files, and then ran the ACWIN interpreter, renamed to Larry 2 and using the compiled game's setup, which SHOULD have worked, as I understand...

I'd like to be able to -

1) Play by running the ACWIN file, with the proper modifications in the ACSETUP.CFG file, and having the entire game on CD;

2) Play by running the compiled EXE file BUT having the extra GAME.00? files on the CD;

AND

3) Play by having everything on hard drive except for .VOX files.

I can do 3), I can't do the other two. You see where this is going aren't you? Three instalation options - small, medium, large. AGS is getting more and more professional, and as such I'd like to use these features. AS a matter of fact, I PLAN to use them.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

I just tried this out, and it seemed to work for me:

Place acwin.exe and acsetup.cfg in C:\TEST
in acsetup.cfg, add these lines in the [misc] section:

datadir=C:\GAME
datafile=GAME.EXE

in the C:\GAME folder, copy the contents of the Compiled folder for the game.

Running the acwin.exe from c:\test then ran with no problems.

Which version of AGS are yo uusing, and can you provide your acsetup.cfg file here?

Rui 'Trovatore' Pires

#2
Hmm. I'm going to try it out. I think this should be documented somewhere, because even the article in the Knowledge Base was misleading. I've actually been trying to do datafile=C:\GAME\GAME.EXE and never using both, only datafile or datadir one at a time!


EDIT - OK, so I put everything that was in the compiled folder into my CD, at drive D. Then I copied acwin.exe, acsetup.cfg and setup.exe to G:\ from my AGS folder, and edited the file so it read -

Quote
[misc]
screenres=0
windowed=0
refresh=0
datadir=D:\
datafile=Larry 2.exe

[sound]
digiid=-1
midiid=-1
digiindx=0
midiindx=0
digiwinindx=2
digiwin=0
midiwinindx=1
midiwin=0

---------------------------
Adventure Game Studio
---------------------------
Main game file not found. This may be from a different AGS version, or the file may have got corrupted.

---------------------------
OK  
---------------------------
THIS was the result. I'm using the latest beta, and I DID re-save the game, several times, in order to make sure it compiled with the latest version.

EDIT 2 - When I changed the datadir to datadir=G:\LARRY\COMPILED, which is basically a non CD folder, it worked. And that's all I changed.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Rui 'Trovatore' Pires

#3
EDIT 3 - Ok, so I put it all into a D:\COMPILED folder and changed datadir accordingly, and this time it worked. Now we know, it has to be in a folder. Thank for your help, CJ. And I say again, this should be a bit more documented, at least the article in the knowledge base should be updated.

(whoops, wrong button, this should be an EDIT...)
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

Well spotted - there's a bug with datadir where it won't work with a root directory - I'll get it fixed.

I've clarified the KB article to mention not putting a path in the datafile option.

Of course, if you're going to distribute the game on CD, you can't rely on everyone having their CD drive as D:, so you'd need your installer to update the cfg file with the actual CD drive letter.

Rui 'Trovatore' Pires

Oh yes, of course, I'm taking care of that right now. I think I've got it, actually. The only problem is that I can't change the icon on the ACWIN interpreter, which, being the game exectuable in the smallest possible instalation (let me tell you, it's a relief playing KQ2VGA with only 2mbs occupied!), is the one the player sees. Does anyone have any idea, how I can workaround this?
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

You can try using a program like Resource Hacker:
http://www.users.on.net/johnson/resourcehacker/

Note though that I accept NO responsibility WHATSOEVER if that program messes up the exe file.

Rui 'Trovatore' Pires

Ok, will do, and don't worry, if I mess it up no one's gonna try and blame you.

I'd just like to state here, while I'm at it, that a bit more fiddling seems to prove that I was wrong about 2), I can't seem to use speech.vox or music.vox if they're in a separate folder. For the sake of completion - the line in ACSETUP is datadir=D:\KQ2VGA\Files, with no datafile line. All the files in my installed folder, I:\King's Quest 2, are from the original game as distributed, but minus the vox files, which are in the CD, in the specified directory.
Or I may be just messing things up again and this should work...
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

Scenario (1) is the only one currently supported by AGS,  so yeah you can't really do (3)

(2) might be possible if you just set a datadir and no datafile entry, I haven't tried.

Rui 'Trovatore' Pires

It ain't. I imagine it treats all those GAME.00? as an extension of the EXE, and therefore treats it as a whole.

Oh well - minumum install and maximum install. Should be enough for anyone, I reckon. Although it WOULD be nice to have a medium... <sigh>
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

SMF spam blocked by CleanTalk