A Valheim mod that generates procedural roads connecting locations across your world.
- Automatically generates roads from spawn to nearby points of interest
- Terrain-aware pathfinding that follows natural contours
- Configurable road width, length, and count
Edit warpalicious.ProceduralRoads.cfg in BepInEx/config/:
| Setting | Default | Description |
|---|---|---|
| RoadWidth | 4 | Road width in meters (2-10) |
| IslandRoadPercentage | 50 | Percentage of islands that will have roads (0-100). Largest islands selected first. |
| CustomLocations | (empty) | Comma-separated list of location names to include in road generation |
Use the CustomLocations setting to add locations from other mods (e.g., Expand World Data):
CustomLocations = Runestone_Boars,Runestone_Greydwarfs,MerchantCamp
Other mods can register locations for road generation programmatically.
using ProceduralRoads;
// Register a location
RoadNetworkGenerator.RegisterLocation("MyCustomLocation");
// Unregister if needed
RoadNetworkGenerator.UnregisterLocation("MyCustomLocation");
// Get all registered locations
IReadOnlyCollection<string> locations = RoadNetworkGenerator.GetRegisteredLocations();private static void RegisterRoadLocation(string locationName)
{
var assembly = AppDomain.CurrentDomain.GetAssemblies()
.FirstOrDefault(a => a.GetName().Name == "ProceduralRoads");
if (assembly == null) return;
var generatorType = assembly.GetType("ProceduralRoads.RoadNetworkGenerator");
var method = generatorType?.GetMethod("RegisterLocation",
System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
method?.Invoke(null, new object[] { locationName });
}| Method | Signature | Description |
|---|---|---|
RegisterLocation |
void RegisterLocation(string locationName) |
Add a location to road generation |
UnregisterLocation |
void UnregisterLocation(string locationName) |
Remove a location from road generation |
GetRegisteredLocations |
IReadOnlyCollection<string> GetRegisteredLocations() |
Get all registered location names |
- Register locations during mod initialization (Awake/Start)
- Location names must match the prefab name exactly (e.g.,
Runestone_Boars, notRunestone Boars) - Both API registrations and config entries are merged at generation time
MIT License - see LICENSE.md