-
Notifications
You must be signed in to change notification settings - Fork 3
Traveling Time Handling
Since PR #74, traveling now takes a little bit of time, making travel more challenging, and also making the game last longer. You may know that map points are considered to be 1 square mile big.
So, when you travel, you have a small task bar appearing, that lasts around a second. The time that is task bar finish to complete is called the traveling time. The traveling time is determined by this piece of code, located in the time_handling.py
class:
# Constants
TRAVELING_WAIT = (1 / 7.3)
def traveling_wait(traveling_coefficient):
traveling_time = traveling_coefficient * TRAVELING_WAIT
logger_sys.log_message(f"INFO: Running traveling waiting time: {traveling_time * 5} seconds of wait")
cout("...", end="\r")
time.sleep(traveling_time)
cout("ø..", end="\r")
time.sleep(traveling_time)
cout(".ø.", end="\r")
time.sleep(traveling_time)
cout("..ø", end="\r")
time.sleep(traveling_time)
cout("...")
time.sleep(traveling_time)
As you can see, there's a constant traveling time, which is equal to approximately .136986
. There's also a variable that can change, that can increase of decrease the time traveling.
Here's the second piece of code that determines this second variable, located in the main.py
class:
# Calculating traveling coefficient, depending
# on the player inventory size and its mounts
# stats, if he has one
global traveling_coefficient
traveling_coefficient = 1
player_inventory_weight = len(player["inventory"]) / 100
traveling_coefficient += player_inventory_weight
if player["current mount"] != " ":
mount_mph = player["mounts"][player["current mount"]]["mph"]
traveling_coefficient -= mount_mph / 100
As you can see, the traveling_coefficient is determined by your 'inventory weight', which is equal to the number of items in your inventory, divided by 100. The traveling coefficient variable, who's by default 1, gets increased by your 'inventory weight'. If you're currently riding a mount, this mount mph
stat, divided by 100 will decrease the traveling coefficient variable.
- Running The Game
- Gameplay Guide
- GitHub Discussions
- Building Source Code
- Game Preferences
- The Game Folder
- The World Of Bane Of Wargs
- Game Timeline Plot
- Yaml Syntax
- Creating Mods
- Creating Starts
- Creating Map Points
- Creating Enemies
- Creating Enemies Categories
- Creating Map Zones
- Creating Items
- Creating Drinks
- Writing Dialogs
- Creating Missions
- Creating Events
- Creating NPCS
- Creating Mounts
Additional Knowledge