Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Civilization II > Scenario League / Civ2-Creation > Batch Files
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
29.Jul: MOVING UP ON REVISED `TOP 100` INDEX
29.May: GAME MECHANICS REFERENCE BOOKLET
06.Mar: DROPPING FROM SECOND TO THIRD
CivGroups
Scenario League / Civ2-Creation (66): Not a Member - Join

bottom of page
  - CIVILIZATION 2 from $6.95 - CIVILIZATION 2 from $4.25 - CIV2: TEST OF TIME from $2.50 - CIV2: MULTIPLAYER GOLD EDITION from $4.99
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Patine is offline Patine
Prince
Edmonton, Canada
Mar 2002
time: 22:17
  Old Post 15-05-2004 03:14 Visit Patine's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Batch Files Avatar Enlargement: We've got the solution

I left a post at the end of another of my threads asking for help in the creation and usage of batch files (maybe a text manual or previous thread). I guess most folks just thought that thread was through. Oh well. Anyway, does anyone have a guide to creating and using batch files in a scenario? I've heard they can make miracles happen (well maybe not quite), and I would like to get acquainted with using them in my scenarios, especially since I downloaded CivSwap. Some please help me.

Mercator is offline Mercator
King
Sorekara no Nanimo
Jan 1970
time: 06:17
  Old Post 15-05-2004 04:33 Visit Mercator's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Avatar Enlargement: We've got the solution

Have you read the CivSwap readme?

In addition to that, see these links. They're far more general, though. You probably won't need to use much of it, but it'll give an idea of what batch files can do at least:
http://www.computerhope.com/batch.htm
http://www.cs.ntu.edu.au/homepages/...305/ith305.html

Then have a look at some of the existing scenarios with batch files. If you still have questions, fire away!

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:17
  Old Post 15-05-2004 07:25 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Tired of ads?

From MU's 2nd link.

quote:
Debugging
Testing a batch-file for correctness, and removing 'bugs' if necessary.

Several approaches -:

  • Print statements. putting echo statements in the file will allow you to see at which point the program took a nose-dive.
  • Stepping through the code. COMMAND.COM /Y /C batch_file_name.BAT



I didn't know about that /Y trick!

quote:
Have you read the CivSwap readme?
Where have I heard that before!

Patine is offline Patine
Prince
Edmonton, Canada
Mar 2002
time: 22:17
  Old Post 15-05-2004 16:28 Visit Patine's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Increase Your PM Length

What I really want to know is, which I couldn't find simply or easily in those links, is how to use a batch file to rename files. With CivSwap, this should give me my intended purpose. How is this function done now that I've got the DOS basics.

Boco is offline Boco
Prince
who was once King for a week.
Jan 2001
time: 00:17
  Old Post 15-05-2004 18:01 Visit Boco's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Enter the AD-FREE zone

Usually, you use the copy command (e.g. COPY EVENTS1.TXT EVENTS.TXT, then later on COPY EVENTS2.TXT EVENTS.TXT). That way you avoid any chance of overwriting the original.

quote:
Then have a look at some of the existing scenarios with batch files.
This is really the best way to learn, once you have a reference at hand. Techumseh uses a thorough one written by Gothmog for his scenarios. Makes an excellent template. Oops, that's for ToT. Allard uses one in River War (FW?). I'm sure someone will cite a good MGE example.

jasev is offline jasev
Moderator
of the SCS Forum
Feb 2001
time: 06:17
  Old Post 15-05-2004 19:04 Visit jasev's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Support Apolyton buy from Amazon

I wrote this SETUPSND prototype for a Scenario Creation Handbook that never was released. You may find it useful (The sentences between * are comments, you have to delete them):

---------------------------------------------------------------------

@echo off *This hides the messages; user will only see the ECHOS*
REM This is a prototype batch file to copy sound files *REM indicates a comment*
REM of any Civ2 Scenario (v2.60 or higher).
REM Created by Javier Arriaga, 11-IV-2003.
if exist SCENARIO.scn goto YES
*If the file is in the correct folder, jump to YES point*
echo ERROR: I can't find file "SCENARIO.scn". Make sure
echo you are running from the correct directory.
*Error message*
goto END *Jumps to END*
:YES *This is YES point*
md sound *Creates SOUND folder*
move NAME1.wav sound *moves the original file to the SOUND folder; copy this line if you have more files*
cd sound
copy NAME1.wav NAME2.wav
copy NAME1.wav NAME3.wav
copy NAME1.wav NAME4.wav
copy NAME1.wav NAME5.wav
copy NAME1.wav NAME6.wav
*Creates the copies; copy this lines if you need more*
cd..
cls *Clear Screen*
echo Sound files installed. Pleased verify a "sound" sub-directory
echo has been created in your "SCENARIO" directory. *Success message*
:END *END point*
rem End of program

----------------------------------------------------------------

To rename a file, the order is:
rename NAME1.EXT NAME2.EXT

Last edited by jasev on 15-05-2004 at 19:15

Patine is offline Patine
Prince
Edmonton, Canada
Mar 2002
time: 22:17
  Old Post 17-05-2004 09:59 Visit Patine's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton buy from Amazon

Sorry in taking so long to get back to you all. A great thanks for your help on this matter. I should be able to take it from here (I hope).

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:17.
Apolyton Time is 00:17.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0333 seconds (85.61% PHP - 14.39% MySQL) with 36 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net