Announcement

Collapse
No announcement yet.

Batch Files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Whats echo?
    "Whoever wants peace, be prepared for war"- Soundwave

    Comment


    • #17
      '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


      • #18
        EDIT... crosspost
        Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

        Comment


        • #19
          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?
          Tecumseh's Village, Home of Fine Civilization Scenarios

          www.tecumseh.150m.com

          Comment


          • #20
            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


            • #21
              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.
              No, the new files exist until you run the bat. file again. In the one case where the file is copied to another directory, city.gif, it's a one time only thing, which can't be reversed unless you rename things manually.
              Tecumseh's Village, Home of Fine Civilization Scenarios

              www.tecumseh.150m.com

              Comment


              • #22
                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


                • #23
                  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


                  • #24
                    I've got MGE! is that bad?

                    Umm i've checked every letter...
                    "Whoever wants peace, be prepared for war"- Soundwave

                    Comment


                    • #25
                      So what should i do now??
                      "Whoever wants peace, be prepared for war"- Soundwave

                      Comment


                      • #26
                        You have to check it again. All it takes is one character to be out of place...

                        -FMK.

                        Comment


                        • #27
                          Thanks, i spent about 30mins checkin gthe things and i misplaced the ENDTEXT after the txt on everysingle one excpet the start one.. so yay!
                          "Whoever wants peace, be prepared for war"- Soundwave

                          Comment


                          • #28
                            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?
                            Use the MOVE command instead. You can have a look at my FW version of Shay's Age of Piracy scenario... I didn't use MOVE myself.

                            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".
                            Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                            Comment

                            Working...
                            X