[MOD] Travel Options

A curated forum for compatible and maintained mods. Users are unable to create new topics in this forum but can reply to existing topics. Please message a moderator to have your mod moved into this forum area.
Post Reply
User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

[MOD] Travel Options

Post by Hazelnut »

Travel Options, by Hazelnut

Description

This mod provides options for travelling around the Iliac Bay, allowing for either fast travel or time accelerated real travel modes depending on player choice. The normal vanilla map and travel popup are used, with the various travel options (speed, transport, stopping at night) governing whether it will be normal Daggerfall fast travel or use time accelerated real travel depending on configuration.

Press 'H' for help with key binds and actions when either in travel map or accelerated travel UI. The key for path following can be set to a small list of defaults or you can specify a custom key bind. Refer to this document for valid key codes: https://docs.unity3d.com/ScriptReference/KeyCode.html. Make sure you use the same capitalization. If your key code fails to parse then it will default to F.

During time accelerated travelling, the HUD has a vanilla style UI control panel (similar in operation to Tedious Travel) allowing the player to see where they're headed, adjust the time acceleration multiple, open the map to check location (and possibly change destination), pause the journey to camp, or exit the journey completely. Enemy encounters will auto pause travel, and encountering locations can also be set to pause travel if desired.

Selecting recklessly by foot/horse with camp out options will always initiate time accelerated travel mode, however the rest is configurable. The default settings are balanced so you have to sail from a port or stop at inns for the vanilla fast travel to be used, with all other options using the time accelerated real travel mode. However, if you use a minimal configuration (e.g. freedom preset) then travel is identical to vanilla unless the player specifically chooses to travel recklessly by foot/horse and camping out, in which case the time accelerated travel mode will be used. Cautious travel is slower as you move more carefully, but gives a chance of avoiding random encounters. The chance percentage is luck + stealth - 20 capped at 95% max. (configurable between 80 and 100%)

This mod is integrated with the Basic Roads mod, so if that mod is installed and enabled in settings then the travel map is enhanced to show larger towns as bigger squares as well as showing roads and tracks. There are toggle buttons for both in the top left corner. This does require a higher resolution to display and so may not look great at resolutions below 1600x1000, but it will still work. Location outlines still work but look quite heavyweight. If a key is set, default 'F', then you can follow paths by standing on them and facing the direction you want to travel and pressing the key to initiate time accelerated travel. The same key stops travel, or the UI controls can be used instead. Travel will automatically stop when a location or junction with more than two paths. Locations can be circumnavigated by following the path around, which will automatically stop when another path is reached. (note that this works even for dirt tracks which don't visibly ring locations) The maximum time acceleration is limited to half the standard limit for following roads or tracks, so max of 50x if you set 100x in the settings. Also a speed of 15 is used for circumnavigation if you have it set higher, just because otherwise it can be very disorienting.

A new feature in v1.4 is a junction mini-map overlay which pops up when path following stops at a junction. This is to allow quick easy selection of the next direction from a planned route and avoids the need to constantly open the travel map while travelling. It's fully customisable with four presets for centre, top centre, top left and top right.

Credit to Jedidia for the autopilot class and some other logic I reused from Tedious Travel.

Presets

The mod ships with some presets which can be used to setup the gameplay with this mod. The 3 Travel presets only affect player controlled cautious and stop at inns travel, and also the ship travel settings.
  • DefaultSettings - This defaults all settings to original values.
  • BalancedTravel - Balanced integration of time acceleration into the base game of Daggerfall. (recommended)
  • FreedomTravel - Freely choose whether you use normal fast travel or time accelerated travel by selecting reckless, foot/horse, and camp out options. (minimal integration)
  • TediousTravel - Travel is more tedious, and close to the Tedious Travel mod but without the shipping logic from that mod. (only fast travel on ships to/from ports)

Configuration
(note settings marked with * won't take effect without restarting DFU)

Cautious Travel:
  • Player Controlled - This enables the cautious speed option to initiate time accelerated travel, and provides additional safety for the cost of some travel speed. You have a chance to avoid random encounters and it pauses the journey if health or fatigue drop below configurable levels.
  • Speed Penalty - Speed penalty for travelling cautiously, as a percentage, default is 20% (i.e. 80% of full speed)
  • Max Chance To Avoid Encounter - Maximum chance to avoid an encounter when travelling cautiously, as a percentage, defaults to 95%.
  • Health Minimum Percentage - Level of health that will automatically pause the journey when travelling cautiously, as a percentage, defaults to 5%.
  • Fatigue Minimum Value - Level of fatigue that will automatically pause the journey when travelling cautiously, absolute value, defaults to 5.
Ship Travel:
  • Only From Ports - This enforces that you can only select ship transportation from a location that has a port. A filter button for ports appears on the travel map if this is set so you can find places that have ports easily.
  • Only To Ports - This enforces that you can only select ship transportation if your destination is a location with a port. Only functions if the above setting is enabled.
Stop At Inns Travel:
  • Player Controlled - This enables the stop for night at inns option to also initiate time accelerated travel, basically disabling vanilla fast travel completely unless sailing.
General Options:
  • Allow Weather - Allows weather when using time accelerated real travel mode for performance and effect weirdness reasons.
  • Allow Sounds - Allows annoying sounds (horse neighing and footsteps) when using time accelerated real travel mode for the sake of players ears and sanity.
  • Allow Real Grass - Allows the real grass mod when using time accelerated real travel mode for performance.
  • Location Pause - Selects the mode for pausing upon encountering locations during time accelerated real travel. Three modes: off, nearby, and entered. Nearby pauses when player moves into a map pixel containing a location, and entered pauses only once the locations' rectangle is entered.
Time Acceleration:
  • Default Starting Acceleration - Set the time acceleration first used when initiating a journey.
  • Always Use Starting Acceleration - Always uses the default starting acceleration when initiating a journey, rather than the last journey's value.
  • Acceleration Limit - Sets the maximum time acceleration that can be used. Defaults to x40 as maximum but can be raised or lowered depending on computer and other mods being used. Set this apropriately so DFU can keep up with the speed of travel and generate the terrain in time. Warning: raising this can cause players to fall off the terrain and into the void. Set the limit accordingly for your system & setup.
Roads Integration:
  • Enable* - Enables integration with Basic Roads mod, showing roads and tracks on the travel map, as well as larger locations with bigger dots.
  • Variable Size Dots* - All locations, except for cities & towns, are rendered as smaller dots.
  • Follow Paths Key - The key used to start/stop path following. Can be set to none, F, G, K, O,or X which should hopefully suit any key bind setup.
  • Follow Paths Custom Key Bind - Custom key bind for following paths used if CustomBind set above
Roads Junction Map:
  • Enable* - Enables a popup mini-map overlay for road junctions to assist in selecting the next direction to follow a road or track.
  • Screen Size* - The size of the junction map on screen.
  • Screen Position X & Y* - The placement of the junction map on screen.
  • Filter Mode - The pixel filter mode used for rendering.
  • Circular - Renders the map in a circle rather than rectangle. (doesn't apply to the background color when opaque)
  • Player Color - The colour used for the player position and direction indicator line.
  • Opaque* - Render the mini-map with an opaque background color. (not useful for centre screen placement as you wont be able to see where you're looking)
  • Background Color* - The opaque background color to use for the mini-map.
Teleportation:
  • Enable* - Enable mages guild teleportation service to be availible to all members, at a cost.
Tedious Travel - comparison

This mod is similar to the Tedious Travel mod, and in fact uses the same autopilot class under the covers. Travel Options is more configurable and flexible, but doesn't have the shipping logic from Tedious Travel where the type of location governs cost and ease of sailing. If you want that, then you should use Tedious Travel instead. The disease detection from Tedious Travel is included.

Travel Opions does come with a tedious preset which configures it to work almost like Tedious Travel, but without the shipping logic and this mod uses the vanilla time calculations and UI instead. Additionally I took a different approach to port detection, so there's no initial lock up like TT has on first run to extract the data, however the extra ports are still included so all islands can be reached.

Tedious Travel discussion thread: viewtopic.php?f=27&t=1293


Other Mods - pausing a journey etc

Other mods can pause travel by sending a message like this direct to the mod via message interface, I believe this is something several mod authors have wanted to be able to do with TT. This is only needed if you want to stop travel without a UI window being shown, e.g. a HUD text message.

Code: Select all

ModManager.Instance.SendModMessage("TravelOptions", "pauseTravel");
Any UI windows shown will automatically stop the time accelerated travel, whether from DFU or mods. If you want to control whether travel is halted from your mod, then use this message where window is a reference to the UI window that you are about to show. (e.g. a message box) This will allow a single window to be shown without stopping travel. Note only one window can be registered at a time.

Code: Select all

ModManager.Instance.SendModMessage("TravelOptions", "noStopForUIWindow", window);
Then to remove a UI window once it's not being shown any more. Not essential but will remove the reference and allow the window instance to be garbage collected.

Code: Select all

ModManager.Instance.SendModMessage("TravelOptions", "removeNoStopWindow", window);
The following status queries can also be made to get whether time accelerated travel is active, is it following a path (either road or track), and is it following a road. The following road doesn't indicate that travel is active, but path following does.

Code: Select all

ModManager.Instance.SendModMessage("TravelOptions", "isTravelActive", callBack);
ModManager.Instance.SendModMessage("TravelOptions", "isPathFollowing", callBack);
ModManager.Instance.SendModMessage("TravelOptions", "isFollowingRoad", callBack);
Example:

Code: Select all

ModManager.Instance.SendModMessage("TravelOptions", "isTravelActive", null,
    (string message, object data) =>  { bool activeTravel = (bool)data; });
To show a text message on the screen during travel without stopping, this mod message can be used since the standard HUD text is disabled and requires pauseTravel first. The message will show for 3 seconds but will be replaced if another message is shown - there's no queue.

Code: Select all

ModManager.Instance.SendModMessage("TravelOptions", "showMessage", "This is fine!");
To query whether a location is a port town, including ports added to locations by this mod, call hasPort passing the mapId of the location. Map id can be retrieved from DFLocation.MapTableData.MapId or DFRegion.MapTable or ContentReader.MapSummary.ID with no need to worry about the masking, this mod will take care of that. Availible from v1.6 onwards.

Code: Select all

bool hasPort = false;
ModManager.Instance.SendModMessage("TravelOptions", "hasPort", mapId, (string message, object data) => { hasPort = (bool)data; });
Screenshots

TOtravel.JPG
TOtravel.JPG (543.6 KiB) Viewed 19109 times
TOdialog.JPG
TOdialog.JPG (174.55 KiB) Viewed 19109 times

Releases

Available now for DFU v0.13.5+ here:
https://www.nexusmods.com/daggerfallunity/mods/122/
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
emmathepony
Posts: 248
Joined: Sat Jun 29, 2019 5:26 pm

Re: [UPCOMING MOD] Travel Options

Post by emmathepony »

This is exactly what I've been waiting for, the choice to have vanilla fast travel or tedious travelling because sometimes I don't want to spend real life hours travelling from 1 province to another and would rather have the game handle it. I'd like to keep tedious travelling for shorter distances though. Also nice to see the ship to port and port town only options. :mrgreen:

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [UPCOMING MOD] Travel Options

Post by Hazelnut »

Glad to hear you're looking forward to it. Hopefully will be availible in the next couple of weeks, depending on the next DFU build release. I added a couple of screenshots so you can see what it will look like.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
King of Worms
Posts: 4751
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: [UPCOMING MOD] Travel Options

Post by King of Worms »

This looks proper 8-)

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: [UPCOMING MOD] Travel Options

Post by Interkarma »

This looks pretty special. I though you must have had something in the works looking at all those protection changes this morning. :D

User avatar
Aleryn
Posts: 91
Joined: Fri Dec 14, 2018 6:59 am

Re: [UPCOMING MOD] Travel Options

Post by Aleryn »

*twitches with excitement* Looks fantastic already. Thanks to you all for even considering the creation of something so considerable.

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [UPCOMING MOD] Travel Options

Post by Hazelnut »

I'm probably going to roll the encounter avoidance mechanic into cautious travel so it gets 2 benefits: monitors health & fatigue, and also allows the player to avoid encounters - with a chance based on running/stealth skills. The cost will be you move at only 80% of full speed.

Unless anyone convinces me otherwise I'll drop the question message box from TT altogether. (do you want to try to avoid?)

Thoughts?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: [UPCOMING MOD] Travel Options

Post by Ralzar »

That sounds like a really good and intuitive way of doing it. The popup for avoidance in TT is honestly pretty annoying.

User avatar
Hazelnut
Posts: 3015
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: [UPCOMING MOD] Travel Options

Post by Hazelnut »

With more thought I am going to have the chance be luck + stealth - 20 with a max cap that's configurable between 80-100. Default will set it to 95%. Like TT this is only for non-quest spawns, or so I understand from Jedidia's code comments.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
emmathepony
Posts: 248
Joined: Sat Jun 29, 2019 5:26 pm

Re: [UPCOMING MOD] Travel Options

Post by emmathepony »

I'm in favour of removing the pop up, annoying that it will pop up every 20 seconds when I want to just sit back and do stuff whilst I travel. Encounter calculations should be done in the background.

Post Reply