Armok Vision
repository·master·Indexed 43 days ago
https://github.com/rosarymala/armok-visionA 3D real-time visualizer for Dwarf Fortress that connects to the game via the DFHack remotefortressreader plugin using protobuf-formatted messages over TCP.
What's inside Armok Vision
- The Lowpoly Weapon Pack is a collection of free 3D models optimized for efficiency, making them suitable for mobile games and performance-sensitive scenes. The pack includes various weapon and accessory models with low polygon counts, along with an example scene and texture variants.
Use Low Poly Paper Boats as assets
masterThe package contains several low-poly boat meshes that function as simple props. They can be used as secondary side assets or as primary assets within Unity games and applications.
Available Meshes: - Birda - Black Pearl - Speedy - Super Sail - Tiny - White Fang Included Assets: - Texture: boat_texture.png - Material: boat_materialHow Armok Vision connects to Dwarf Fortress
masterArmok Vision functions by connecting to the
remotefortressreaderDFHack plugin via TCP. The communication uses protobuf-formatted messages.Key architectural components:
- Networking: The submodule
Assets/RemoteClientDF-Netcontains the generated C# protobuf files and connection management classes. The scriptAssets/Scripts/MapGen/DFConnection.csmanages the connection on a separate thread to expose data from Dwarf Fortress. - Map Management:
Assets/Scripts/MapGen/GameMap.csmanages the onscreen map by storingGameObjects for different map chunks. It utilizes scripts inAssets/Scripts/MapGen/Meshingto build meshes on separate threads. - Asset Loading: Most assets (textures, 3D models, sprites) are loaded at runtime from
Assets/StreamingAssetsviaAssets/Scripts/MapGen/ContentLoader.cs. This folder is copied directly to the generated application folder.
- Networking: The submodule
How to contribute 3D models, sounds, and concept art
masterArtists can contribute assets in two ways:
Method 1: Direct File Editing
Locate the
StreamingAssetsfolder near the Armok Vision executable (or inside the app bundle on macOS). You can edit files directly in this folder and restart Armok Vision to see changes. Note: Be careful when editing.xmlfiles as they are sensitive to formatting errors.Method 2: Unity Editor
Load the project assets into Unity and edit them there using the standard Unity workflow.
Switch texture variants in the Lowpoly Weapon Pack
masterThe pack includes three texture variants (red, green, and blue) at 256x256 resolution. To switch between these colors, use the three different materials provided in theMaterialsfolder.Install the Low Poly Paper Boats package
masterTo use the Low Poly Paper Boats in your Unity project, simply import the package into your project assets. Once imported, the boat models and materials will be immediately available for use in your scene.Armok Vision Controls and Navigation
masterUse the following keyboard and mouse controls to navigate and interact with the Armok Vision interface:
Movement & View
- Horizontal Movement:
W,A,S,D, or middle-click drag. - Vertical Movement:
QorE. - Zoom: Mouse wheel.
- Rotation: Right-click drag.
- Follow Center:
F(toggles following the center of the Dwarf Fortress screen).
Time & Environment
- Sun Movement:
P(pauses/resumes sun movement). - Time of Day:
[or](changes time of day; automatically pauses sun movement). - Shadows:
O(toggles shadows cast from hidden Z-levels).
Display & Interface
- Creature Scaling:
L(toggles scaling of creatures based on size). - Dwarf Fortress Screen:
`(toggles showing the DF screen). - Options Menu:
Esc.
Screenshots
- Full Screenshot:
F9. - Minimap:
Ctrl+F9.
- Horizontal Movement:
Use OBJ-IO to import and export OBJ geometry
masterOBJ-IO provides functionality to import and export OBJ files. The core
ImportandExportfunctions are designed to be flexible by accepting aSystem.IO.Streamas a parameter, allowing you to read from or write to files, memory streams, or other stream-based sources.Note: The current implementation only supports geometry data; it does not support materials or other non-geometric OBJ data.
// The API uses System.IO.Stream for flexibility // Example conceptual usage: // Import(Stream stream) // Export(Stream stream, geometryData)Apply the CensorEffect to a scene
masterTo use the censor effect in your scene, create a new 3D object (such as a Quad) and assign the
CensorEffectMatmaterial to it. While a Quad is the standard starting point, the effect can be applied to any mesh.1. GameObject -> 3D Object -> Quad 2. Assign "CensorEffectMat" material to the objectInstall Armok Vision
masterTo install Armok Vision, you must have a copy of Dwarf Fortress with a recent build of DFHack installed.
For full functionality, ensure you have one of the following:
- A version of DFHack built after the current Armok Vision release.
- An updated
RemoteFortressReaderplugin for your specific platform.
If neither is available, you must build DFHack yourself from the
developbranch following the DFHack compilation guide.Set up the development environment for Armok Vision
masterTo contribute to the codebase, you need to set up a Unity-based development environment:
- Install Unity 5.
- For non-Windows users, install the Git LFS extension (verify with
git lfs version). - Clone the repository including submodules:
git clone --recurse-submodules --depth 1 https://github.com/JapaMala/armok-vision.git - Open the
armok-visionfolder in the Unity editor. - Crucial Step: Run the
Mytools -> Build Material Collectionmenu item in Unity. This is required after a fresh pull or after modifying any material files.
git clone --recurse-submodules --depth 1 https://github.com/JapaMala/armok-vision.gitLocate OBJ-IO plugin scripts
masterThe core logic for the OBJ-IO plugin is located in the following directories within the project:
OBJ-IO/Plugins/OBJOBJ-IO/Plugins/Extension