Whats echo?
Announcement
Collapse
No announcement yet.
Batch Files
Collapse
X
-
'echo' is for what will be displayed for the person. I have chosen to use a little flare in displaying a message to the user when he completes an operation.
'echo.' is what is used when you just want a space in the display... the line is skipped.
-FMK.
Comment
-
EDIT... crosspost
Comment
-
Using Andrew Livings batch file as a template, I can now copy a dialog file from the Red October scenario file into the Original directory and back up the original dialog bmp. Thanks Anzac.
The problem is reversing it. I'm trying to make a bat file which copies the backup dialog file over the new one, thus restoring the files to their original state. But it doesn't work. Here's the command line from the bat file:
if exist ..\Original\dialogorg.bmp ren ..\Original\dialogorg.bmp dialog.bmp
Dialogorg.bmp is the backed up file. When I run the bat file, I get this message: "duplicate file name or file in use." I don't understand why it won't overwrite the dialog file; this seems common enough in multi-events type games. Can anyone help?
Comment
-
Well, with Andrew's, you have to leave it running and when you shut off Civ2 everything gets restored. I haven't investigated how this happens though.Georgi Nikolai Anzyakov, Commander Grand Northern Front, Red Front Democracy Game
Comment
-
Originally posted by The ANZAC
Well, with Andrew's, you have to leave it running and when you shut off Civ2 everything gets restored. I haven't investigated how this happens though.
Comment
-
Ummm, guys i have another problem, i kinda dropped the idea of muiltable events, and now i can use one! YAY!, ok now the problem... they dont work!! AHH! It keeps coming up with events cant be used, debug them, and i looked all thourgh them and they look fine!! some one help i'm so pissed!!"Whoever wants peace, be prepared for war"- Soundwave
Comment
-
If you've got FW, then load the events in that, and you can then run debug
Failing that, check for spelling mistakes - all it takes is one missplaced letter and the entire thing won't work'Arguing with anonymous strangers on the internet is a sucker's game because they almost always turn out to be - or to be indistinguishable from - self-righteous sixteen year olds possessing infinite amounts of free time.'
- Neal Stephenson, Cryptonomicon
Comment
-
Originally posted by techumseh
[...]
Dialogorg.bmp is the backed up file. When I run the bat file, I get this message: "duplicate file name or file in use." I don't understand why it won't overwrite the dialog file; this seems common enough in multi-events type games. Can anyone help?
Well, here it is:
@ECHO OFF
if not EXIST Piracy.scn goto NOTE
if not EXIST Backup\Game.txt goto INIT
goto UNDO
:INIT
md Backup
copy ...\Labels.txt Backup
copy ...\Game.txt Backup
copy ...\Scredits.gif Backup
copy ...\Scredits.txt Backup
copy Labels.txt ...
copy Game.txt ...
copy Scredits.gif ...
copy Scredits.txt ...
cls
echo AGE OF PIRACY is ready to play!
echo.
goto END
:NOTE
echo This file must be run from your Piracy directory.
echo That directory must be a subdirectory of the CivilizationII
echo 'Scenario' folder.
echo.
goto END
:UNDO
copy Backup\*.* ...
deltree /Y Backup
cls
echo AGE OF PIRACY has been temporarily disabled.
echo.
:END
A short explanation:
- If the piracy.scn file isn't in the same directory as the batch file it displays a note.
- Else if it can't find a backup of the game.txt, I assume the "special" files haven't been installed. It will do so now by copying the originals to the backup folder and copying the piracy files to the main Civ2 directory. After that it will display a message to show the user AoP has been "enabled"
- Else (it can find a backup), the backups are copied back (overwriting the Piracy ones) and the backup directory is deleted. Again, a message is displayed to show the user AoP has been "disabled".
Comment
Comment