How do you may batch files like .bat for civ2, coz i wanna have muiltaplayer events in my scenario?
Announcement
Collapse
No announcement yet.
Batch Files
Collapse
X
-
My advice is to use an existing batch file for a template - for example the one I used in my United Irishman scenario originally came from Redfront; I simply deleted what I did not need, renamed what was required and that was that. Open it up in notepad and take a look. I'm afraid I don't know how to make one up from scratch though.STDs are like pokemon... you gotta catch them ALL!!!
-
Take this as an example. This is from Red Front, BTW. I've numbered the lines to make it easier to refer to them.
1.@echo off
2.copy wterrain1.gif terrain1.gif
3.copy wterrain2.gif terrain2.gif
4.copy wcities.gif cities.gif
5.copy rules2.txt rules.txt
6.copy units2.gif units.gif
7.copy events2.txt events.txt
8.DELEVENT RF.sav
9.exit
Line 1 will ensure that the bat file does not report back everything it is doing whilst it is working.
Lines 2 through 7 are copying files, and renaming them in the process. For instance, line 2 is taking the file wterrain1.gif and making a copy, which is named terrain1.gif. When doing your own, simply insert the name of the file you wish to copy and tell it to rename it to whatever you want. Line 7 is probably the one you are interested in; it is taking a file called events2.txt, which Civ2 will not recognise, and renaming it to events.txt, so Civ2 will use it as the events file.
Line 8 is important; it is using the Microprose program DELEVENT, which removes the events data from a saved game file, in this case RF.sav. When playing your scenario, you must instruct people to give the save file a particular name, or this will not work.
Line 9 is quitting the bat file and shutting the window it creates when it runs."Paul Hanson, you should give Gibraltar back to the Spanish" - Paiktis, dramatically over-estimating my influence in diplomatic circles.
Eyewerks - you know you want to visit. No really, you do. Go on, click me.
Comment
-
Soundwave; do you know the basic names for all the files that make up a Civ2 scenario? I'll assume that you do, but if you don't just say so and I'll explain it.
Lets assume that you have a five part scenario, and that each part of the scenario has a different events file. You would probably name the files like so: events1, events2, events3, events4 and events5 (these will, of course, all have the .txt extension. Before beginning the scenario, the player would have to run the batch file for the first part, which would contain a line like:
copy events1.txt events.txt
This will copy the events1.txt file, creating a copy called events.txt. Civ2 will now detect this file and use it as the one for the first part of your scenario. When the time comes to change events files, you would indicate this in game via an event that reads something like "Change to the next set of events", or something similar. At this point, you would instruct the player to run the next bat file, which would contain the lines:
DELEVENT savegame.sav
copy events2.txt events.txt
Or something similar. This would wipe the events data in the samegame file and replace the current events file with the next one. The savegame would then be reloaded and all the units and such would remain the same, but the events would be different.
This is tricky to explain. My advice would be to follow our_man's advice and check out some existing bat files."Paul Hanson, you should give Gibraltar back to the Spanish" - Paiktis, dramatically over-estimating my influence in diplomatic circles.
Eyewerks - you know you want to visit. No really, you do. Go on, click me.
Comment
-
Then instead of using numbers, use eventsF for the French, eventsE for the English etc. and get the bat file to rename these to events. It doesn't require a particularly complicated bat file Soundwave, you don't even have to make use of the delevent.exe!
I take it that these files are only meant to be run at the beginning of a scenario of course when you're deciding what player you want to play as. If you still can't do it, I advise leaving it. It really isn't too hard for players to change one letter in an events file to decide what events they want to use!STDs are like pokemon... you gotta catch them ALL!!!
Comment
-
I have a question. I want to use a bat file to make it possible to easily copy and replace files for my Red October scenario. 3 files (city.bmp, dialog.bmp and Civwin_back.bmp) go in the Original directory. 3 more (intro.dll, mk.dll and tiles.dll) go in the ToT main directory.
What I would like to do is have these files plus the bat file go in the Red October folder along with all the other files. Then by operating the bat file from there, have the 3 bmp files copied into the Original directory and the 3 dll files copied into the ToT directory, and the appropriate backups made. Then I'd like the bat file to be able to reverse the process.
Is it possible to do this? And, if so, how do I specify the correct path? I've been able to modify the bat files of others to copy and backup files within a single scenario folder, so I know how to do that much at least.
Comment
-
Techumseh: Look at Andrew Living's Crises of the New World Order. It has stuff like what you just said in a batch file.Georgi Nikolai Anzyakov, Commander Grand Northern Front, Red Front Democracy Game
Comment
-
Right i cut it down all i want is a .bat file to make muiltplayer events and singel player.... ummmm how do i make a .bat file?
Sorry i have no idea about MS Dos, looked at it got more, played Civ2"Whoever wants peace, be prepared for war"- Soundwave
Comment
-
Soundwave: Copy someone's bat file and move it into your scenario's folder. Right click on it with your mouse; select edit. Read what's there. Figure out how it works. Make whatever changes you need for your own purposes. It's not that hard.
the ANZAC: Thanks, I will.
Comment
-
Originally posted by Soundwave
Right i cut it down all i want is a .bat file to make muiltplayer events and singel player.... ummmm how do i make a .bat file?Originally posted by Field Marshal Klesh
Just right click an existing batch file and select 'edit'.
-FMK.
-----------------------------------------------------------------------------
Here is the incomplete batch file for Stalingrad:
@echo off
cls
echo.
echo Stalingrad Playtest File Manager Version 1.0
echo.
echo Choose the phase which you want to play.
echo You have the following options:
echo.
echo 1. Load Phase 1 "Outskirts"
echo 2. Load Phase 2 "City in Flames"
echo 3. Load Phase 3 "General Winter"
echo 4. Load Phase 4 "Operation Uranus"
echo 5. Load Phase 5 "Operation Winterstorm"
echo 5. Load Phase 6 "Liquidation"
echo X. Exit without Loading
echo.
choice /c:123456X Enter your selection please:
if errorlevel 7 goto done
if errorlevel 6 goto Opt6
if errorlevel 5 goto Opt5
if errorlevel 4 goto Opt4
if errorlevel 3 goto Opt3
if errorlevel 2 goto Opt2
if errorlevel 1 goto Opt1
:Opt1
echo.
echo Phase 1 "Outskirts" loading...
copy rules1.txt rules.txt
copy units1.gif units.gif
copy events1.txt events.txt
copy Sterrain1.gif terrain1.gif
copy Sterrain2.gif terrain2.gif
copy cities1.gif cities.gif
copy Game1.txt Game.txt
copy sound\Missile1.wav sound\Missile.wav
echo.
echo Welcome to Stalingrad, Herr Paulus!
goto done
:Opt2
echo.
echo Phase 2 "City in Flames" loading...
copy rules2.txt rules.txt
copy units2.gif units.gif
copy events2.txt events.txt
copy Sterrain1.gif terrain1.gif
copy Sterrain2.gif terrain2.gif
copy cities1.gif cities.gif
copy Game2.txt Game.txt
copy sound\Missile2.wav sound\Missile.wav
DELEVENT SG.sav
echo.
echo We must take the banks of the Volga, Herr Paulus!
goto done
:Opt3
echo.
echo Phase 3 "General Winter" loading...
copy rules3.txt rules.txt
copy units3.gif units.gif
copy events3.txt events.txt
copy Wterrain1.gif terrain1.gif
copy Wterrain2.gif terrain2.gif
copy cities2.gif cities.gif
copy Game2.txt Game.txt
copy sound\Missile2.wav sound\Missile.wav
DELEVENT SG.sav
echo.
echo Another winter campaigning in Russia...
goto done
:Opt4
echo.
echo Phase 4 "Operation Uranus" loading...
copy rules4.txt rules.txt
copy units3.gif units.gif
copy events4.txt events.txt
copy Wterrain1.gif terrain1.gif
copy Wterrain2.gif terrain2.gif
copy cities2.gif cities.gif
copy Game2.txt Game.txt
copy sound\Missile2.wav sound\Missile.wav
DELEVENT SG.sav
echo.
echo There's been word of a Soviet breakthrough!
goto done
:Opt5
echo.
echo Phase 5
copy rules5.txt rules.txt
copy units3.gif units.gif
copy events5.txt events.txt
copy Wterrain1.gif terrain1.gif
copy Wterrain2.gif terrain2.gif
copy cities2.gif cities.gif
copy Game2.txt Game.txt
copy sound\Missile2.wav sound\Missile.wav
DELEVENT SG.sav
goto done
:Opt6
echo.
echo Phase 6
copy rules6.txt rules.txt
copy units3.gif units.gif
copy events6.txt events.txt
copy Wterrain1.gif terrain1.gif
copy Wterrain2.gif terrain2.gif
copy cities2.gif cities.gif
copy Game2.txt Game.txt
copy sound\Missile2.wav sound\Missile.wav
DELEVENT SG.sav
goto done
:done
echo.
exit
quit
--------------------------------------------------------------------------------
It is all self explanitory.
Events files are numbered.
Graphics are based on winter/summer looks.
There is a wav file that gets changed as well.
DELEVENT- deletes the events within the save file. I am making people name it 'SG.sav'
Each 'Opt' is what is going to happen when the person selects that phase of the game.
If you have seperate set ups for each country, just write it out so all the proper files are used.
The game only actually reads the generic file names: 'events', 'game', 'rules', 'cities' etc ect. So you have to have the batch file rename all your sepeate civ files to these generic file names (which are to be read by Civ when the player plays).
It really is pretty simple.
-FMK.
Comment
Comment