Easily and automatically create Victory at Sea ship cards for your 3D-printed or custom ships! This project mimics the style, size, and information layout of the official cards provided by Warlord Games while allowing you to customize ships you’ve printed yourself.
- Automated Card Generation: Input ship stats via CSV files, and the project generates cards automatically.
- Mimics Official Style: Closely replicates the look and feel of the official Victory at Sea ship cards.
- Customizable: Easily adjust ship stats, weapons, traits, and more to match your custom or unofficial ships.
- High-Quality Output: Cards are generated at 300 DPI for sharp and professional printing.
- Dynamic Design: Automatically adjusts card layout and number of elements (e.g., weapon systems, hull stats) based on your input data.
- Fits Dashboard: Made to fit and line up with my created dashboard
There are two ways to use this script either via the supplied executable, see running via executable.
Or you can download and run the python scripts directly. In which case start with the Prerequisites Section Below.
To run this project, you need the following installed:
- Python 3.8+
- Google Chrome (or Chromium)
- ChromeDriver
- Pillow (Python Imaging Library)
- Selenium
Install Python dependencies via pip:
pip install pillow selenium pandas
Ensure your project directory is set up as follows:
project_root/
├── generate.py # Main script
├── shipcard.html # HTML template for ship cards
├── ships.csv # Input CSV file for ship data
├── weapon_systems.csv # Input CSV file for weapon systems
├── output_images/ # Folder where generated cards will be saved
├── ship_images/ # Folder for ship images
│ ├── placeholder.png # Placeholder for missing ship images
│ ├── new_mexico.png
├── flags/ # Folder for nation images
│ ├── placeholder.png # Placeholder for missing nation images
│ ├── usa.png
Defines the basic information about each ship.
Field | Description | Example |
---|---|---|
ship_id |
Unique ID for the ship | 1 |
ship_name |
Name of the ship | New Mexico |
ship_type |
Type of the ship | Battleship |
points |
Point cost | 395 |
flank_speed |
Flank speed in inches | 4" |
armour |
Ship's armor rating | 6+ |
hull |
Ship's hull value (current/max) | 72/24 |
traits |
Special traits | Aircraft 4, Armoured Deck, Torpedo Belt 2 |
ship_image |
Path to the ship image relative to the ship_images folder | new_mexico.png |
nation |
Path to the nation's image relative to the flags folder | usa.png |
ship_id,ship_name,ship_type,points,flank_speed,armour,hull,traits,ship_image
1,HMS King George V,Battleship,600,"5""",7+,89/29,"Aircraft 2, Armoured Deck",images/hms_king_george_v.png
2,New Mexico,Battleship,395,"4""",6+,72/24,"Aircraft 4, Armoured Deck, Torpedo Belt 2",new_mexico.png
Defines the weapon systems for each ship.
Field | Description | Example |
---|---|---|
ship_id |
ID matching the ship from ships.csv |
1 |
weapon_system |
Name of the weapon system | A Turret |
fire_arc |
Firing arc of the weapon | Fore |
point_blank |
Point-blank range | 9" |
short |
Short range | 18" |
long |
Long range | 27" |
extreme |
Extreme range | 37" |
ad |
Attack dice | 3 |
ap |
Armor penetration | +2 |
dd |
Damage dice | 3 |
traits |
Special traits | - |
Fire arcs are case-insensitive and support the following single or combined arcs:
- Single arcs:
Fore
,Aft
,Port
,Starboard
- Combined arcs are seperated by a comma:
Fore, Aft
Fire arc images are generated using the createArc.py
script. These images will be stored in the fire_arcs/ folder and linked dynamically on the ship cards.
ship_id,weapon_system,fire_arc,point_blank,short,long,extreme,ad,ap,dd,traits
1,A Turret,Fore,9",19",29",39",2,3,3,Restricted
1,B Turret,"Aft, Port",9",19",29",39",2,3,3,Restricted
2,Torpedoes,Port,6",14",21",30",1,1,2,Limited
2,Light Guns,"Fore, Aft, Port, Starboard",10",20",30",40",3,4,4,Armoured
To generate cards:
- Place your input CSVs (
ships.csv
,weapon_systems.csv
) in the project root. - Place any required ship images in the
images/
folder. - Run the
generate.py
script:
python generate.py
-
Ensure you have the following files and folders in the same directory as the executable:
ships.csv
: Contains ship data.weapon_systems.csv
: Contains weapon data.ship_images/
: Directory for ship images.flags/
: Directory for nation flags.
-
Place the executable in the root directory of your setup.
-
Run the executable:
-
On Windows:
VictoryAtSeaCardGenerator.exe
-
On Linux/Mac:
./VictoryAtSeaCardGenerator
Or simply double click the file.
-
Generated cards will be saved in the output_images/
folder.
- Cards are created as
.png
files, formatted at 14 cm × 10.9 cm and 300 DPI, ready for high-quality printing. - Vertical lines and markers are added dynamically based on ship stats (e.g., hull value).
To help me with creating new awesome tools and models you can
This project is licensed under the MIT License. See the LICENSE file for details.
While the code is open-source, the outputs (e.g., images) generated by this software may not be used for commercial purposes. This includes selling, sublicensing, or otherwise profiting from the generated content. For exceptions or permissions, please contact the author.
This project is not affiliated with or endorsed by Warlord Games. It is intended for personal use to enhance the gameplay experience of Victory at Sea.
All references to Victory at Sea are trademarks of Warlord Games. Any resemblance to official products is purely for compatibility purposes.