summaryrefslogtreecommitdiffstatshomepage
path: root/posts/ywalk-when-you-can-ride.md
blob: 8ea898080242d5a3169f0b48a1787c3cbe70e5f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
title: Why walk when you can ride?
date: 2021-11-13
author: Wolfgang Müller

Do you ever find yourself in the middle of nowhere, in the northern Ashlands of
Vvardenfell, and suddenly think: "Damn, what's my fastest way to Tel Branora
from here?  I *still* have to deliver Mistress Therana's skirt!"

<figure>
	<img class="round" width="90%" src="img/morrowind-ashlands.jpg"
	alt="A screenshot of Morrowind in the dark and dusty Ashlands, with two Netch in the vicinity."/>
	<figcaption>Somewhere in the Ashlands of Vvardenfell.</figcaption>
</figure>

Depending on the character you play, the answer to this question can vary
wildly. For one you could try to reach Khuul and rely on regular fast travel
services like the Silt Strider and the Guild Guide, but maybe you're playing a
particularly stuck-up Telvanni and would like to avoid interacting with the
Imperial rats of the Mages Guild.  Valenvaryon or Falasmaryon is close, and
you have picked up all Propylon indices already, so that is a very good
alternative. Or maybe you're feeling the need for some fresh sea air and would
like to sail all around Vvardenfell.

Morrowind's fast travel system is extensive and complex, so figuring out the
fastest routes from any one location to another is not an easy task. Even worse,
some of the best travel options (the intervention spells that teleport you to
the next Temple or Imperial Shrine) are hard to know when to use optimally.

<figure>
	<img class="round" width="90%" src="img/morrowind-routes.png"
	alt="A map of all travel routes on Vvardenfell"/>
	<figcaption>A map of all travel routes on Vvardenfell, courtesy of the
	<a href="https://en.uesp.net/wiki/Morrowind:Transport">UESP</a>.
	</figcaption>
</figure>

Morrowind veterans probably have a very good idea of the intricacies of
Vvardenfell's travel routes and can figure out the above problem in seconds, but
maybe you've just started the game and feel a bit overwhelmed, or you just
installed [Tamriel Rebuilt](https://www.tamriel-rebuilt.org/) and have to
suddenly juggle a multitude of new routes.

The latter is true for me, so I ended up writing **ywalk**, a command-line tool
that figures out the fastest route between a set of places in Morrowind. It can
consider certain limitations (Telvanni disdain for the Mages Guild perhaps, or
having to escorting yet another lost pilgrim[^1] who can't teleport) and give
you an optimized route.

Connections between places are parsed from a simple text file with tab-separated
values. A connection definition is simply the origin, the destination, the mode
of travel, and how long the journey takes in in-game hours:

```
Origin     	 Destination 	 Mode         	 Time
Seyda Neen 	 Balmora     	 Silt Strider 	 3
Vivec      	 Hla Oad     	 Boat         	 5
Balmora    	 Seyda Neen  	 Silt Strider 	 3
Balmora    	 Vivec       	 Guild Guide  	 0
```

Since a very small number of routes are one-way only[^2], I decided to keep
things simple and require every route to be specified explicitly. As you can see
above, the route between Seyda Neen and Balmora is specified twice, once for
each direction.

To collect these routes, I used the indispensable [Unofficial Elder Scrolls
Pages](https://en.uesp.net/wiki/Main_Page) and my own copy of the game running
on [OpenMW](https://openmw.org). I made each catalogued journey myself at least
once, just to be sure.

**ywalk** ships with definitions for the entire fast-travel network for
the Game of the Year version of Morrowind (meaning the *Master Index* plugin is
enabled by default). For Tamriel Rebuilt it includes definitions that are active
with *TR_Travels*. For now, only places with fast-travel options are considered.
An exception to this rule are available player homes in Vvardenfell, for use
with the Recall option. If you are curious, check out
[goty.tsv](https://git.oriole.systems/ywalk/tree/data/goty.tsv) and
[tr-travels.tsv](https://git.oriole.systems/ywalk/tree/data/tr-travels.tsv).

## Installation

**ywalk** is written in Python and is supposed to be installed per user. The
data files and manual need to be installed separately because Python packaging
is a nightmare. For a full install as a user, get the sources from the
[git repository](https://git.oriole.systems/ywalk) and run the following
commands:

```
$ python setup.py install --user
$ make install
```

This will install **ywalk** to `~/.local/bin`, the data files to their canonical
path `~/.local/share/ywalk`, and the manual to `~/.local/share/man/`.

## Usage

**ywalk** offers a simple command-line interface. Invoke it with the list of
places you want to travel through or to, and it will print a route if it can. By
default it allows all modes of travel, but you can allow only specific modes
with `-m`, or restrict them with `-M`. For detailed usage information, see
[the manual](https://git.oriole.systems/ywalk/about/ywalk.1).


<figure>
	<img class="round" width="90%" src="img/morrowind-khuul.jpg"
	alt="A screenshot of Morrowind in the port of Khuul."/>
	<figcaption>Can't wait to get out of this place.</figcaption>
</figure>

Let's see it in action! Consider a regular character that has no problem with
land-based transport and can use the Mages Guild relays, but has no way of
invoking Almsivi or Divine Intervention and never even heard of a Propylon
chamber. In that case, we'd head over to Khuul and then start our journey:

```
$ ywalk -M almsivi,divine,propylon Khuul 'Tel Branora'
Start in Khuul
 then take the Silt Strider to Ald'ruhn (5 hours)
 then take the Guild Guide to Vivec
 then take the Boat to Tel Branora (5 hours)
Arrive in Tel Branora after 10 hours.
```

<figure>
	<img class="round" width="90%" src="img/morrowind-propylon.jpg"
	alt="A screenshot of Morrowind in Falasmaryon's Propylon chamber."/>
	<figcaption>The homely hum of crystals.</figcaption>
</figure>

Now for the stuck-up Telvanni that raided every single Dunmer stronghold and
completed their Propylon Index collection. We start in Falasmaryon in that case
and avoid Mages Guild relays like the Corprus disease:

```
$ ywalk -M guide Falasmaryon 'Tel Branora'
Start in Falasmaryon
 then travel by Propylon to Caldera
 then travel by Propylon to Telasero
 then invoke Almsivi Intervention to Molag Mar
 then take the Boat to Tel Branora (2 hours)
Arrive in Tel Branora after 2 hours.
```

<figure>
	<img class="round" width="90%" src="img/morrowind-swamp.jpg"
	alt="A screenshot of Morrowind in the eastern swamp."/>
	<figcaption>On the way to Hla Oad.</figcaption>
</figure>

And finally for our sailor, again from Khuul:

```
$ ywalk -m boat Khuul 'Tel Branora'
Start in Khuul
 then take the Boat to Gnaar Mok (7 hours)
 then take the Boat to Hla Oad (4 hours)
 then take the Boat to Vivec (5 hours)
 then take the Boat to Tel Branora (5 hours)
Arrive in Tel Branora after 21 hours.
```

<figure>
	<img class="round" width="90%" src="img/morrowind-mora.jpg"
	alt="A screenshot of Morrowind in the port of Sadrith Mora."/>
	<figcaption>Arriving in Sadrith Mora.</figcaption>
</figure>

Let's say our character absolutely hates the swamp. We can make sure to avoid
Gnaar Mok with `-P`. This will lead to a journey around the eastern parts of
Vvardenfell:

```
$ ywalk -m boat -P 'Gnaar Mok' Khuul 'Tel Branora'
Start in Khuul
 then take the Boat to Dagon Fel (8 hours)
 then take the Boat to Sadrith Mora (10 hours)
 then take the Boat to Tel Branora (8 hours)
Arrive in Tel Branora after 26 hours.
```

By default, **ywalk** optimizes for least travel time. It recommends using
teleportation over regular Silt Strider or boat services even though using the
latter would usually decrease the number of hops needed. If you're interested
instead in a route with the least number of hops, you can change the weighting
method for the path-finding algorithm with `-w`.

<figure>
	<img class="round" width="90%" src="img/morrowind-branora.jpg"
	alt="A screenshot of Morrowind looking at Tel Branora."/>
	<figcaption>Our destination, with a slight hint of rotting Kwama Eggs.</figcaption>
</figure>

I hope you'll have fun trying this out. Feel free to send any improvements
along!

[^1]: Always better than a naked Nord, though. They probably all deserve it.
[^2]: Vos to Sadrith Mora, for example. Curiously, Tamriel Rebuilt removes this
  connection entirely.