Visualization for safehouses in The Long Dark. This is a work in progress!
The purpose of this vizualizer is to give a bird's eye view of all one's bases in the game. Everything is SVG, meaning you can zoom in and out and the icons will scale nicely.
I'm currently using this vizualizer to keep track of all my bases in my current interloper game. Right now, it looks like:
You can install them with:
pip install drawsvg beautifulsoup
The visualizer takes its data from a JSON file which you provide as a command-line argument. Two example JSON files are provided: mybases.json and loottable4.json.
To run the visualizer: python3 TLDBaseViz.py <inputFile.json>
The input JSON has two sections: a list of bases, and a list of connections between the bases. A small vizualization might look something like this:
In this example, Hibernia, the No 5 Mine, and Lonely Lighthouse have been explored, but the other locations have not, and are hence outlined in purple. Square boxes indicate indoor (warm) locations where one could cure a hide. The opacity of the box's border indicates whether there is safehouse customization. Italics indicate there is no loading screen to access this location. The JSON entry for Hiberina is:
"Hibernia":{
"region": "DesolationPoint",
"customizable": true,
"loading": true,
"cabinfeverrisk":true,
"indoors": true,
"explored":true,
"features": ["salt,beachcombing",
"bed, grill, workbench",
"quality, -hammer",
"#Cannery, +woodworking, +furnbench, +bearbed"
]
},
The icons are specified by the list features: each string is a row, and each string in the list is a column. Every icon has a specified keyword (e.g. salt is for salt deposit). There are three special prefixes:
-is used to indicate something should be taken from this location (e.g.-hammer: you can see the nearby Riken has a+hammershowing where it should go). By default, cyan is used for this.+is used to indicate something should be brought to this location (e.g.+woodworking). By default pink is used for this.#is used to indicate a text box. This is useful for notes for yourself, such as if an item is coming or going far away. In the example above,#Canneryis a note I made to indicate the woodworkng tools are coming from the Cannery.*is used to indicate something should be produced (crafted) for this location (e.g. a furniture workbench).?is used to indicate something should be searched for at this location.
Connections are formatted as a list, and an excerpt looks like this:
["Hibernia", "north", "top,left", "BrokenBridge", "bottom,left", "path"],
["Hibernia", "south", "bottom,left", "Riken", "top,left", "charcoal"],
["Riken", "east", "top,right", "LittleIsland", "top,left", "charcoal"],
["No5Mine", "east", "bottom,right", "Hibernia", "top,left", "path"],
The format goes:
- Name of source base
- Direction from source base to sink (destination) base
- Which corner of the source base's box the connection starts from
- Name of sink base
- Which corner of the sink base's box the connection ends at
- A keyword used to style the connection. For example
pathfor when a connection is readily navigated in low-visibility conditions thanks to a road, railroad, or natural path.
You can change the colour scheme by editing styling.json as desired. A high contrast style file, hicontraststyling.json is also provided.
The order in which you list your bases in the JSON file affects the order in which they are drawn. The program draws bases in this order:
- Draw the first base in the JSON file.
- Draw all of the bases connected to that base.
- Move to the second base in the JSON file. If it isn't already drawn, draw it. Then draw all of the bases connected to it.
- Repeat #3 with the third base, fourth base, etc.
If your bases are appearing in janky locations, you may have to fuss with the order of the bases. If the program gets to a base but has no connections to it so far, it won't know where to put it, and will put it at the location of the first base.
A full legend is avilable in legend.csv.
Green indicates it is not available on interloper/misery.
You can modify legend.csv to remap the keywords and add icons of your own.
If you want to add or modify the SVG icons, please be forewarned that the SVG parser is rather minimal, and presently only supports SVG files which are square in shape, have no layers, no relative paths, and no transformations.
Icons used here are all from The Noun Project unless otherwise noted. They are all Creative Commons licensed.
- Aviator Cap by madness stock
- Balaclava by Juicy Fish
- Ballistic Vest by Smashicons
- Barb's Rifle by Hey Rabbit
- Beachcombing by Idwar
- Bear by abdul gofur
- Bear Hide by Yo! Baba
- Bear Hide Bed by Luiz Carvalho
- Bearskin Coat based on art by iconcheese, Simon Child, and Roundicons.com
- Bed by Adrien Coquet
- Bedroll by Daniel Shettel
- Birch Bark by Amethyst Studio
- Bunker Rifle based on art by ka reemov
- Bushcraft Bow by Mask Icon
- Briefcase based on art by Arkinasi
- Camera by Andi Nur Abdillah
- Car Battery by ARI NOFIANA
- Cedar Firewood by Felipe
- Chemical Boots by monkik
- Climb by Adrien Coquet
- Climbing Rope by IYIKON
- Climbing Socks by Agan24
- Coal Piece by Sean Maldjian
- Coal Spawn by BinikSol
- Cookpot by NeueDeutsche
- Combat Boots by Amethyst Studio
- Combat Pants by Amethyst Studio
- Cougar by Sahiruddin
- Cougar Hide by Amir Ali
- Cougar Claw Knife based on art by Abdullah Faisal
- Cougar Hide Wrap based on art by Flowicon
- Cowichan Sweater by ferdizzimo
- Crampons based on art by Vectors Point
- Curator's Rifle by Jarem Frye
- Curing Box by Pham Duy Phuong Hung
- Deer by Anissa
- Deer Hide based on art by Smashicons
- Deerskin Boots based on art by Eucalyp
- Deerskin Pants based on art by Jajang Nurrahman
- Distress Pistol by Andy Horvath
- Distress Pistol Ammunition by Dwi Budiyanto
- Emergency Stim by Andi Nur Abdillah
- Expedition Parka by Cik merry
- Firestriker by IconMark
- Fir Firewood by Ronald Cortez
- Fire Hardened Arrow by Zach Bogart
- Fish by BnB Studio
- Fisherman's Sweater by Ayub Irawan
- Fishing Tip-up is original art for this project
- Flare by Side Project
- Flight Jacket based on art by Zky Icon
- Forester's Revolver by Hey Rabbit
- Forge by Andi Nur Abdillah
- Furniture Workbench by Deni Sudibyo
- Gauntlets based on art by Michael T
- Goating by Nick Novell
- Grill (2-burner stove) by Cuby Design
- Hacksaw by omeneko
- Handheld Shortwave Radio by Uswa KDT
- Hatchet by Studio Danro
- Heavy Hammer by Firza Alamsyah
- Hockey Jersey / Festive Sweater by Andry Horvath
- Hunter's Revolver by Graphic Nehar
- Hunting Knife by icongarage
- Hunting Rifle by Hey Rabbit
- Improvised Crampons based on art by LSE Designs
- Improvised Hatchet by farra nugraha
- Improvised Insulation based on art by Amethyst Stedio
- Improvised Knife based on art by J703
- Insulated Flask by AbtoCreative
- Insulated Boots by Side Project
- Jerry Can by Nikita Kozin
- Lantern by Athok
- Mackinaw Jacket based on art by ToZIcon
- Magnifying Lens by vectaicon
- Manufactured Arrow by Leonardo Henrique Martini
- Marine Flare by Amethyst Studio
- Mariner's Pea Coat by Smallike
- Matches by Zach Bogart
- Military Coat by Blackonion
- Milling Machine by krisna agra muria
- Miner's Pants by pictranoosa
- Moose by pramana
- Moose Hide based on art by Nhor
- Moose-Hide Cloak by Daniela Baptista
- Moose-Hide Satchel by Amethyst Studio
- Mukluks by Eucalyp
- Poisoned Wolf by icon trip
- Polaroid by Alice Design
- Pot Belly Stove by Andrejs Kirma
- Prybar by Ben Gilman
- Ptarmigan by Amethyst Studio
- Quality Tools by Asiah
- Rabbit by Logisstudio
- Rabbit Pelt based on art by Eucalpy
- Rabbitskin Hat by DTNS Studio
- Rabbitskin Mittens by Neneng Fadliyah
- Radio by Arif Arisandi
- Range (6-burner stove) by Cuby Design
- Recipe Card by Marianna Nardella
- Reclaimed Wood by Adrien Coquet
- Revolver by Eskak
- Rock Cache by kusuma potter
- Safe by Jonn Tronic
- Salt by Muhammad Hilmi Fajri
- Simple Arrow by Sahab Uddin
- Simple Parka by Siipkan Creative
- Simple Tools by fauzin idea
- Ski Boots by Lars Meiertoberens
- Ski Jacket based on art by ToZIcon
- Skillet by icelloid
- Snare by Intervex [Wikimedia Commons]
- Snowpants by Studio365
- Spelunker's Lantern by Teny Septiani
- Sport Bow by TRAVIS BIRD
- Stick by MingNae
- Suitcase by shashank singh
- Survival Bow by Anditii Creative
- Survival Knife by Soremba
- Tactical Gloves modified from art by Abu Ibrahim Icon
- Technical Backpack by johanna
- Technical Balaclava by P Thanga Vignesh
- Thermal Underwear by Ainun Nadliroh
- Thermal Underwear by Edi Prastyo
- Thin Wool Sweater by Jamil Akhtar
- Timberwolf by okja
- Trader by Salman Azzumardi
- Transmitter by IconsHome
- Trunk (rustic) by Annisa
- Trunk (premade) by Chintuza
- Urban Parka by James gibson
- Vaughn's Rife by ka reemov
- Warden's Revolver by Eskak
- Windbreaker by Lars Meiertoberens
- Wolf by IronSV
- Wolf Hide based on art by Singlar
- Wolfskin Coat by Collicon
- Wolfskin Hat based on art by Amethyst Studio
- Wolfskin Pants modified from art by Jo Santos
- Woodworking Tools by Berkah Icon
- Woodwright's Bow by Simon Henrotte
- Wool Ear Wrap by parkjisun
- Wool Longjohns by Edi Prastyo
- Wool Mittens by Icon Market
- Wool Shirt by Amethyst Studio
- Wool Socks by Pong Pong
- Wool Toque by Flatart
- Workbench by cdesign933
- Workbench Vice by Melisa Lutfiani
- Icons for all accessories
- Sewing kit
- Can openers?
- Wall art and rugs?
- Separate icon for outdoor workbench?
- Bear processing locations?
- Revamp colour scheme
- Add day # to visualization
- Automatic centring and canvas sizing (two-stage drawing?)... when redrawing, put the connections under the boxes
- Automatic legend location
- Allow stacking of items
- Indication of rope climbs
- Write more documentation for other people to use it
- Finish loot table templates for interloper
- Refine the dark mode / hi contrast style
- Add some level of importance/priority?
- Festive lights
- See image credits!
- TLD Interactive Map for helping me visualize how the regions connect