Launch parameters

RedKi-rr

Prince
Joined
Apr 15, 2010
Messages
538
Hi guys!

Are any launch parameters for civ1? For example, something like "civ.exe -nosound".

Every time when I start a new game I have to manually change all default options...(I mean animation, palace, end of turn and so on). So, I would like just set up those for a fresh games.

Although, I would not wonder if civ1 doesn't allow parameters.

Also, please share your experience about it)
 
Try
CIV$ - editor for CIVIL*.SVE files
http://forums.civfanatics.com/threads/civ-editor-for-civil-sve-files.112297/


Features
Change the treasure amount of any country.
Control of Civilization advances.
Shows Advances others have that you don't.
Quick Start of CIV.
Quick removal of barbarians
Addition or removal of units from a map.
Editing of city size and contents
Control of Wonders.
 
Thank a lot! I will definetely try it. I think it is especially good for OCC games and test. Anyway, is it impossible to put commands or options when start the usual civ1?...
 
Nope, civ.exe does not use any input from the command line, as far as I can tell, after having scanned its disassembly for a while

Thanks a lot! Also I tried yours JCivED, but it looks like it requires Java Machine. So, I couldn't launch it. Need to try again. :goodjob:
 
I can't help with the new game settings, but I run Civ1 in DOSBOX via a dos batch file and use Horst Schaeffer's ancient freeware KPUSH utility (available lots of places on the web including Horst's own .de site) to stuff the keyboard buffer. Here's a barebones batch file (just change the drive, directory and keystrokes to match your setup) that will take you to the saved games menu:

@Echo off
c:
cd \civ1
kpush "1","1","1","L",CR
civ.exe

It is trivial to add lines before and after the civ.exe line to run a script (e.g. a small qbasic program) or utility (heck, you could even use dos DEBUG and a batch file) to check for new or changed saves, open them, and change the game settings byte in each to match your preferred settings.
 
Here is a qbasic program that will change your game settings to whatever values you choose. Save it in your Civ1 folder as CIVSETTS.BAS

' === Save this in your Civ1 directory as CIVSETTS.BAS ===
Code:
    const BAGSET = 35492 + 1 ' Game settings
    dim b as string, p as string
    dim f as integer, x as integer, y as integer, z as integer
    dim l as long
    dim filn$, filp$
    p = ".\" ' path is current directory
    y = 172 ' change this to match your preferred settings

    for z = 0 to 9
   
        filn$ = "CIVIL" + ltrim$(str$(z)) + ".SVE" ' file name
        filp$ = p + filn$ ' prepend path
 
        f = freefile: open filp$ for random as #f len = 1: field f, 1 as b
        l = lof(f)
        if not l = 0 then
            get #f, BAGSET
            x = asc(b)
            if not x = y then
                lset b = chr$(y): put #f, BAGSET
                print filn$, x; ">"; y
            end if
        end if
        close #f: if l = 0 then kill filp$ ' delete empty files

    next
    SYSTEM
' === end of file ===

Add together the numbers of just the settings you want ON and replace the line "y = 172" above with "y = " and your preferred total:
1 Instant Advice
2 AutoSave
4 Wait at End of Turn
8 Animations
16 Sounds
32 Enemy Moves
64 Civilopedia text
128 Palace

Call CIVSETTS.BAS from your batch file, sandwiching your civ run, thus:

qbasic.exe /run civsetts.bas
kpush "1","1","1","L",CR
civ.exe
qbasic.exe /run civsetts.bas

(We call it both before and after to ensure saved games are always properly set.)

Note: relies on Qbasic. Qbasic was bundled free with most older MS-DOS versions (e.g. MS-DOS 6.22) and copies are not hard to find. Either put a copy of qbasic.exe in your Civ directory, or place the directory containing qbasic.exe in your path. I keep it in the same folder as my other dos utilities such as KPUSH.


Edited to add: this example assumes you're using English-language Civ. I believe the French version (for example) may be 56(?) bytes later
 
Last edited:
Top Bottom