v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Command line"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(gen_modlist.txt info)
(use proper interwiki links)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The ''command line'' is used for [[World generation|generating worlds]] quickly from the [http://en.wikipedia.org/wiki/Command_Prompt Command Prompt] in Windows or a [http://en.wikipedia.org/wiki/Unix_shell terminal window] in Linux. Here is the text from command_line.txt:
+
The ''command line'' is used for quick [[advanced world generation]] from [[world_gen.txt|prefs/world_gen.txt]] through the [[wikipedia:cmd.exe|Windows command prompt]] or a [[wikipedia:Unix shell|Linux terminal window]].
 +
 
 +
Here is the text from "command line.txt":
  
 
<pre>
 
<pre>
See readme.txt for the license.
+
See readme.txt for general information about the release.
 
See release_notes.txt for information on handling saves and a brief writeup on the changes for this version.
 
See release_notes.txt for information on handling saves and a brief writeup on the changes for this version.
 
See file_changes.txt for new init/interface information.
 
See file_changes.txt for new init/interface information.
See command_line.txt for information on world generation from command lines.
 
Go to http://www.bay12games.com/dwarves/faq.html for Frequently Asked Questions and their answers.
 
Go to http://www.bay12games.com/dwarves/dev_now.html to see a full list of changes.
 
  
  
Line 13: Line 12:
  
  
Dwarf Fortress currently offers one command line option, a world generator, suggested by genmac.
+
Dwarf Fortress currently offers one command line option, a world generator, suggested by genmac. You can use it as follows:
You can use it as follows:
 
 
 
FORMAT: dwarfort.exe -gen <id number> <seed> <world gen param title>
 
EXAMPLE: dwarfort.exe -gen 1 3498 STANDARD
 
EXAMPLE: dwarfort.exe -gen 2 RANDOM CUSTOM6
 
  
 +
FORMAT: "Dwarf Fortress.exe" -gen <id number> <seed> <world gen param title>
 +
EXAMPLE: "Dwarf Fortress.exe" -gen 1 3498 "MEDIUM ISLAND"
 +
EXAMPLE: "Dwarf Fortress.exe" -gen 2 RANDOM CUSTOM6
  
This will open a silent, introless dwarf fortress, generate a world with the given id number and seed,
+
This will open a silent, introless dwarf fortress, generate a world with the given id number and seed, export the region files and a picture, and finally quit.  The window remains open so you can see what's going on.  You can still abort world generation while it is running.  If you attempt to create a world number that already exists, it will abort immediately.
export the region files and a picture, and finally quit.  The window remains open so you can see
 
what's going on.  You can still abort world generation while it is running.  If you attempt to create
 
a world number that already exists, it will abort immediately.
 
 
</pre>
 
</pre>
  
 
On Linux, make sure to rename the '''df''' shell script to something else before putting it in your path, since a '''df''' command already exists and replacing it with the ''Dwarf Fortress'' launcher script could mess up your system.
 
On Linux, make sure to rename the '''df''' shell script to something else before putting it in your path, since a '''df''' command already exists and replacing it with the ''Dwarf Fortress'' launcher script could mess up your system.
  
After first gen will be created 'gen_modlist.txt' with default vanilla mods.
+
===Mods===
 +
After the first gen, a default '''Dwarf Fortress/gen_modlist.txt''' will be created with an ordered list of vanilla mods ID, which will be used in all future gens.
  
To generate '''32767''' maps on Windows create file "generate.bat" in game folder with this content and run.
+
===Example===
 +
To generate '''32767''' maps on Windows create a file "generate.bat" in the game folder with this content and run.
 
<pre>
 
<pre>
 
--------------------------------------------------------
 
--------------------------------------------------------

Latest revision as of 23:40, 12 September 2025

The command line is used for quick advanced world generation from prefs/world_gen.txt through the Windows command prompt or a Linux terminal window.

Here is the text from "command line.txt":

See readme.txt for general information about the release.
See release_notes.txt for information on handling saves and a brief writeup on the changes for this version.
See file_changes.txt for new init/interface information.


Dwarf Fortress Command Line Options


Dwarf Fortress currently offers one command line option, a world generator, suggested by genmac.  You can use it as follows:

FORMAT:	"Dwarf Fortress.exe" -gen <id number> <seed> <world gen param title>
EXAMPLE:	"Dwarf Fortress.exe" -gen 1 3498 "MEDIUM ISLAND"
EXAMPLE:	"Dwarf Fortress.exe" -gen 2 RANDOM CUSTOM6

This will open a silent, introless dwarf fortress, generate a world with the given id number and seed, export the region files and a picture, and finally quit.  The window remains open so you can see what's going on.  You can still abort world generation while it is running.  If you attempt to create a world number that already exists, it will abort immediately.

On Linux, make sure to rename the df shell script to something else before putting it in your path, since a df command already exists and replacing it with the Dwarf Fortress launcher script could mess up your system.

Mods[edit]

After the first gen, a default Dwarf Fortress/gen_modlist.txt will be created with an ordered list of vanilla mods ID, which will be used in all future gens.

Example[edit]

To generate 32767 maps on Windows create a file "generate.bat" in the game folder with this content and run.

--------------------------------------------------------
:loop
"Dwarf Fortress.exe" -gen %RANDOM% RANDOM "SMALL REGION"
goto loop
--------------------------------------------------------