Author Topic: "datafile" and "datadir" in CD use  (Read 2073 times)

Rui 'Trovatore' Pires

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
"datafile" and "datadir" in CD use
« on: 11 Apr 2004, 19:00 »
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

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re:"datafile" and "datadir" in CD use
« Reply #1 on: 11 Apr 2004, 22:21 »
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

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
Re:"datafile" and "datadir" in CD use
« Reply #2 on: 12 Apr 2004, 08:19 »
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.
« Last Edit: 12 Apr 2004, 08:48 by redruM »
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

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
Re:"datafile" and "datadir" in CD use
« Reply #3 on: 12 Apr 2004, 08:53 »
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...)
« Last Edit: 12 Apr 2004, 08:54 by redruM »
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re:"datafile" and "datadir" in CD use
« Reply #4 on: 12 Apr 2004, 18:34 »
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

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
Re:"datafile" and "datadir" in CD use
« Reply #5 on: 12 Apr 2004, 18:40 »
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

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re:"datafile" and "datadir" in CD use
« Reply #6 on: 12 Apr 2004, 19:27 »
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

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
Re:"datafile" and "datadir" in CD use
« Reply #7 on: 12 Apr 2004, 19:42 »
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

  • Creator of AGS
  • Administrator
  • Mittens King
  • I sense danger.
    • Lifetime Achievement Award Winner
    • Pumaman worked on one or more games that won an AGS Award!
    •  
    • Pumaman worked on one or more games that was nominated for an AGS Award!
Re:"datafile" and "datadir" in CD use
« Reply #8 on: 12 Apr 2004, 19:53 »
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

  • Lunge da lei per me non v'ha diletto!
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with proof reading
    • I can help with scripting
    • I can help with story design
    • I can help with translating
    • I can help with voice acting
Re:"datafile" and "datadir" in CD use
« Reply #9 on: 12 Apr 2004, 20:09 »
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.