Thread Tools
Old January 17, 2004, 23:12   #31
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 10:56
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
Here's the SoG bat file.
Code:
@echo off
cls
echo.
echo         Seeds of Greatness (v1.1) 
echo.
echo (Copies in the correct Events file for the chosen civilization)
echo.
echo Please select your civ from the list below:
echo.
echo 1. Hittites
echo 2. Babylonians
echo 3. Assyrians
echo 4. Egyptians
echo 5. Persians
echo 6. Greeks
echo 7. Minoans
echo X. Exit without Loading
echo.
choice /c:1234567X Enter your selection

if errorlevel 10 goto done
if errorlevel 9 goto done
if errorlevel 8 goto done
if errorlevel 7 goto Crete
if errorlevel 6 goto Greece
if errorlevel 5 goto Persia
if errorlevel 4 goto Egypt
if errorlevel 3 goto Assyria
if errorlevel 2 goto Babylon
if errorlevel 1 goto Hatti

:Hatti
echo.
echo Hittites
copy Events-H.txt events.txt
goto done

:Babylon
echo.
echo Babylonians
copy Events-B.txt events.txt
goto done

:Assyria
echo.
echo Assyrians
copy Events-A.txt events.txt
goto done

:Egypt
echo.
echo Egyptians
copy Events-E.txt events.txt
goto done

:Persia
echo.
echo Persians
copy Events-P.txt events.txt
goto done

:Greece
echo.
echo Greeks
copy Events-G.txt events.txt
goto done

:Crete
echo.
echo Minoans
copy Events-M.txt events.txt
goto done

:done
echo.
exit
quit
From Tech and my past experience, the only possible crash point in the bat file is on the CHOICE line. I'm assuming that you saw no error message such as 'file not found' in the dos window.

Since you crashed later, I strongly suspect the problem lies with a scenario file other than the bat file. First suspect is the title.gif. Try renaming it and starting the scenario. The scenario may start normally (without the opening graphic). My other suspects are corrupted rules and events files. Reunzipping from Kull's zips should solve that kind of problem. Otherwise, I'm stumped.
Boco is offline  
Old January 18, 2004, 13:58   #32
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 17:56
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
Windows XP might not like some of what comes after the choice line. The errorlevel 10 and errorlevel 9 lines are unnecessary.

Well, re-unzip the scenario and try starting the scenario without running the batch file. The batch file only controls events, so the scenario should start just fine (except you won't have events)... If the scenario still crashes, it's a text/graphics file problem. If the scenario doesn't crash, it's a batch file problem.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old January 18, 2004, 16:50   #33
Berzerker
Civilization II MultiplayerApolytoners Hall of Fame
Emperor
 
Berzerker's Avatar
 
Local Time: 10:56
Local Date: November 1, 2010
Join Date: May 1999
Location: topeka, kansas,USA
Posts: 8,164
Yeah, the game plays ok w/o the batch. I'll try unzipping but the scenario creator said the events file greatly improves the game. Thx guys.
Berzerker is offline  
Old January 19, 2004, 03:05   #34
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 10:56
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
Berzerker, there's always the manual alternative. The important line for you is
Code:
copy Events-B.txt events.txt
Kull stores the Babylonian events in Events-B.txt. With Windows Explorer or its ilk, you could try the following:[list=1][*]Delete Events.txt[*]Copy and paste Events-B.txt[*]Rename "Copy of Events-B.txt" to Events.txt[/list=1]

Merc, does XP handle Errorlevels differently from earlier versions? Granted the first two "if errorlevel" lines are useless. AFAIK, XP still supports EL's up to 255. Choice doesn't seem to corrupt EL1 into EL10. That would be nasty.

[JUNK]

I did find XP (maybe NT, too) has some new toys.
Code:
@echo off
setlocal
echo Checking OS
ver|find "XP"
if not errorlevel 1 goto :Choice
echo This OS is not Windows XP
goto Done
:Choice
echo.
set /p UserInput=Choose 1-3:
set UserInput=%UserInput:~0,1%
if "%UserInput%"=="1" goto Continue
if "%UserInput%"=="2" goto Continue
if "%UserInput%"=="3" goto Continue
goto Choice
:continue
goto Ans%UserInput%
:Ans1
echo Ans%UserInput%
goto Done
:Ans2
echo Ans%UserInput%
goto Done
:Ans3
echo Ans%UserInput%
goto Done
:Done ' why are smileys interpreted between code markers?
echo.
echo Did it work?
I know the "goto Continue" and "goto Ans%UserInput%" add an extra few lines unnecessarily, but I was exploring a little.

So, XP can bypass CHOICE.COM with set /p. Unfortunately it stores only the first character entered by the user as a variable. That's probably not a fatal flaw.

Haven't figured out how to trap the error that happens when choice.com isn't found in the path.

[/JUNK]

All of this junk is to say that you can write batch files that check OS versions and for newer ones, use an alternative to choice.com.
Boco is offline  
Old January 19, 2004, 13:09   #35
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 17:56
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
I don't have XP, so I was just guessing (and being a perfectionist).

Interesting and useful info about the /p switch too.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old January 19, 2004, 17:12   #36
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 10:56
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
Mercator, Angelo, anybody,
Do you know of any websites that have tutorials for vbs scripting? I can search MS or Google, but thought I'd check first. It just seems a more elegant approach. I'm not asking you to write one—it just might be within my reach. It'd be nice just to have a simple OK/Cancel dialog with radio buttons to do this stuff. I'm actually after a vbs alternative combining Gothmog's ToT setup/restore batch files. His stuff is very well written, but it'd be nice to try something more windowsy.
Boco is offline  
Old January 20, 2004, 11:41   #37
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 17:56
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
Here you go:
http://download.microsoft.com/downlo...scrdoc56en.exe

That's the guides I use... um, well... I have them on my computer anyway.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old January 21, 2004, 18:47   #38
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 10:56
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
Thanks!

Okay it looks like the only input 'native' VBScripts can take are from MsgBox (Yes/No) or InputBox (a string). Tell me that I'm wrong.

Writing a Yes/No front end to Gothmog's Setup and Restore bats for ToT is within my capability, but a form on an HTML page isn't.

Still I can get rid of Choice.com.
Boco is offline  
Old January 21, 2004, 21:07   #39
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 17:56
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
Yep, MsgBox and InputBox is all there is... I guess you could put the entire menu in the InputBox text and ask the user to enter the correct number. You can check that value for validity after that.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
Old January 21, 2004, 21:34   #40
Boco
Scenario League / Civ2-Creation
King
 
Boco's Avatar
 
Local Time: 10:56
Local Date: November 1, 2010
Join Date: Jan 2001
Location: of underdogs
Posts: 1,774
I have a old but legal copy of Visual Basic 6.0 Learning Edition. Is it worth installing on either a W98 or a WXP PC if I want to create a simple installation form with option buttons? I could probably write it in Excel VBA in 30 minutes (It used to be 5 minutes, but I'm rusty ), but then there'd be a requirement for Excel. What does VB6LE require on the user's PC?
Boco is offline  
Old January 22, 2004, 11:41   #41
Mercator
Scenario League / Civ2-Creation
Emperor
 
Mercator's Avatar
 
Local Time: 17:56
Local Date: November 1, 2010
Join Date: Dec 1969
Posts: 3,079
That's exactly what I've been using to make my utilities.

The user would require the VB run-time files, as you would have needed to install for MapEdit or any of my other utilities (and available on my website). It's slightly under 1MB in size... Of course everybody will already have those, thanks to me. And more seriously, I'm pretty sure everyone with WindowsXP actually does have them.

I also suggest you install the VB SP5, if you don't have it already:
http://msdn.microsoft.com/vstudio/do...doverview.aspx

For some controls you would need to add extra files (e.g. for the Open/Save File dialog, as I used in MapEdit). Those are the files that may make an installation a bit tedious, because they can't really be installed by hand easily... But those controls have to be added separately in VB as well (from the Components list), so you'll know which ones they are.
__________________
Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)
Mercator is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 11:56.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team