[Sandbox] How to spawn entire fleets

[Sandbox] How to spawn entire fleets

How To Spawn Entire Fleets

This guide will help you spawn whole fleets for use in a Sandbox situation, whether that be trying out fleet/ship designs or testing matchups in large scale combat.

Legacy Add_ship Command

Previous versions of Stellaris allowed you to easily spawn entire fleets of ships using "add_ship [ship name] [value]", but this was changed by the introduction of spaces inside ship names, so a ship with a name like "Cruiser version 20" would be difficult to spawn code-wise since the command "add_ship Cruiser version 20" could mean spawn 20 "Cruiser version" ships or 1 "Cruiser version 20" ship. Therefore the devs changed it to a single ship being spawned in its own fleet.

How To Spawn Fleets Now


[Sandbox] How to spawn entire fleets image 5
[Sandbox] How to spawn entire fleets image 6
[Sandbox] How to spawn entire fleets image 7
[Sandbox] How to spawn entire fleets image 8
[Sandbox] How to spawn entire fleets image 9

1. Open your file browser (i.e. Windows Explorer) and navigate to your Stellaris game folder. The fastest way to do is is right click on Stellaris in Steam > Properties > Local Files > Browse Local Files.

2. Create a new Text File and name it something useful with a .txt in the end. for example: spawnFallenEmpireFleet.txt

3. Open your txt file. This is where things get a little messy. On every single line you will need to write "add_ship [ship_name]" for every number of ship you want to spawn. So if you want to spawn 100 Beta class ships, then you will need to type "add_ship Beta" 100 times.

4. Save your file.

5. Back in the game. Pause the game, go into an empty star system, open the console and type "run [file name].txt" (without quotation marks). If everything went right then you should see a whole lot of single ships everywhere.

6. All you need to do now is group all your ships into the fleet you want. The easiest way to do this is go back to Galaxy view, create a selection box around that star system and then hold down the 'G' key until everything forms up nicely. Keep in mind different ship FTL methods will not group together.

7. Voila! Your fleet is ready to use! So much easier than manually clicking that "Build Corvette" 500 times, yes? :)

Making Step 3 Easier

Depending on your coding competence, step 3 should look very simple or very daunting to you. But fear not, I have thought ahead and wrote a simple Python script for you to use, for free!; but you will need to install Python 2.7 on your computer, download it here[www.python.org] . You can find the script here[raw.githubusercontent.com] . Copy and paste that into a new file, save it at "fleetGen.py" and then run it by double clicking on the file or opening command prompt, navigate to that folder and running "python fleetGen.py" .

This seems tidious, but will save you a lot of time!

Now feel free to edit fleetGen.py to suit your needs. Create a new fleet layout under 'fanaticXenophobe', use the format that shown

Variable = [] ]Then add your variable to the 'make_this" list, and run the file again.

This script will now create a whole bunch of "spawnXXX.txt" files in the folder fleetGen.py is in. Copy those into the Stellaris game folder and you're good to go!

Alternatively... Use Excel


[Sandbox] How to spawn entire fleets image 24

If you dont want to go through the hasstle of setting up Python and figuring out some simple code, you can always use Excel to generate your fleet list for you. Simply open a new Excel workbook, type "add_ship [name]" in the first cell and then left-click drag the bottom-right corner of the cell downwards, using the row numbers to gauge how many ships you want.

Afterwards, highlight all the cells and copy/paste them into the txt as normal.

Do You Have Pre-made Lists?

Yep! Here are 100 Escort / 50 Battlecruiser / 1 Titan fleet docs for:

Awakaned Fanatic Materialist[raw.githubusercontent.com]

Awakened Fanatic Spiritualist[raw.githubusercontent.com]

Awakened Fanatic Xenophile[raw.githubusercontent.com]

Awakened Fanatic Xenophobe[raw.githubusercontent.com]

Simply copy/paste these lists them into a new txt file.

FAQ

Do I have to quit/launch Stellaris every time I want to use a new txt?Nope. Just make sure you're putting the script in the root folder and it should just work. Same goes for editing an existing script.

What is the easiest way to make fleets fight?Create the fleets using the code or manually generating them in Stellaris. Put them on opposite ends of an empty star system. Open the console, type 'attackallfleets' and then move them towards each other. Boom!

Your script is stupid, I can do it betterBy all means! This is just what I personally use.

What other commands do you typically use when sandboxing?ai : disables ai

instant_build : builds things instant at no cost

research_technologies 1 : unlocks everything

survey : surveys all star systems

play X: where x is the id of other empires in the game, play 0 is beack to yours

Can I spawn my ships?Indeed you can, just ensure your ship name corresponds with the name in the script and it should just work

I'll add more Q/A as I get them! :^)

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=1164839004					

More Stellaris guilds