diff --git a/build.php b/build.php
index 84ea513..009e99d 100644
--- a/build.php
+++ b/build.php
@@ -61,7 +61,8 @@ function register_module($settings)
 		"lastupdate" => filemtime("modules/" . $settings["id"] . ".php"),
 		// May not be set. Defaults to false
 		"optional" => $settings["optional"] ?? false,
-		"extra_data" => $settings["extra_data"] ?? []
+		"extra_data" => $settings["extra_data"] ?? [],
+		"depends" => $settings["depends"] ?? []
 	];
 	$module_index[] = $newmodule;
 }
diff --git a/modules/feature-search.php b/modules/feature-search.php
index 692b33d..96b4514 100644
--- a/modules/feature-search.php
+++ b/modules/feature-search.php
@@ -5,6 +5,7 @@ register_module([
 	"author" => "Starbeamrainbowlabs",
 	"description" => "Adds proper search functionality to Pepperminty Wiki using an inverted index to provide a full text search engine. If pages don't show up, then you might have hit a stop word. If not, try requesting the `invindex-rebuild` action to rebuild the inverted index from scratch.",
 	"id" => "feature-search",
+	// "depends" => [ "search-engine" ],
 	"code" => function() {
 		global $settings, $paths;
 		
diff --git a/pack.php b/pack.php
index a1a652c..429c13b 100644
--- a/pack.php
+++ b/pack.php
@@ -27,6 +27,20 @@ function log_str(string $line) {
 	//else error_log($line);
 }
 
+/*
+███    ███  ██████  ██████  ██    ██ ██      ███████
+████  ████ ██    ██ ██   ██ ██    ██ ██      ██
+██ ████ ██ ██    ██ ██   ██ ██    ██ ██      █████
+██  ██  ██ ██    ██ ██   ██ ██    ██ ██      ██
+██      ██  ██████  ██████   ██████  ███████ ███████
+
+██       ██████   █████  ██████  ██ ███    ██  ██████
+██      ██    ██ ██   ██ ██   ██ ██ ████   ██ ██
+██      ██    ██ ███████ ██   ██ ██ ██ ██  ██ ██   ███
+██      ██    ██ ██   ██ ██   ██ ██ ██  ██ ██ ██    ██
+███████  ██████  ██   ██ ██████  ██ ██   ████  ██████
+*/
+	
 log_str("*** Beginning main build sequence ***\n");
 log_str("Reading in module index...\n");
 
@@ -67,11 +81,69 @@ foreach($module_index as $module) {
 	$module_list[] = $module;
 }
 
+/*
+██████  ███████ ██████  ███████ ███    ██ ██████  ███████ ███    ██  ██████ ██    ██
+██   ██ ██      ██   ██ ██      ████   ██ ██   ██ ██      ████   ██ ██       ██  ██
+██   ██ █████   ██████  █████   ██ ██  ██ ██   ██ █████   ██ ██  ██ ██        ████
+██   ██ ██      ██      ██      ██  ██ ██ ██   ██ ██      ██  ██ ██ ██         ██
+██████  ███████ ██      ███████ ██   ████ ██████  ███████ ██   ████  ██████    ██
+
+███████  ██████  █████  ███    ██ ███    ██ ██ ███    ██  ██████
+██      ██      ██   ██ ████   ██ ████   ██ ██ ████   ██ ██
+███████ ██      ███████ ██ ██  ██ ██ ██  ██ ██ ██ ██  ██ ██   ███
+     ██ ██      ██   ██ ██  ██ ██ ██  ██ ██ ██ ██  ██ ██ ██    ██
+███████  ██████ ██   ██ ██   ████ ██   ████ ██ ██   ████  ██████
+*/
+
+	
+function module_list_search(array $list, string $id) : bool {
+	foreach($list as $item) {
+		if($item->id === $id)
+			return true;
+	}
+	return false;
+}
+function module_list_find(array $list, string $id) {
+	foreach($list as $item) {
+		if($item->id === $id)
+			return $item;
+	}
+	return null;
+}
+
+log_str("Scanning for dependencies...\n");
+$module_count = count($module_list);
+for($i = 0; $i < $module_count; $i++) {
+	foreach($module_list[$i]->depends as $dependency) {
+		echo("scanning {$module_list[$i]->id}: $dependency\n");
+		if(!module_list_search($module_list, $dependency)) {
+			log_str("Adding missing dependency $dependency for {$module_list[$i]->id}\n");
+			$missing_dependency = module_list_find($module_index, $dependency);
+			if($missing_dependency == null) {
+				if(php_sapi_name() != "cli") header("content-type: text/plain");
+				echo("Error: {$module_list[$i]->id} requires $dependency as a dependency, but it couldn't be found in the module index. This looks like a bug.\n");
+				if(php_sapi_name() == "cli") exit(2);
+				else exit();
+			}
+			$module_list[] = $missing_dependency;
+			$module_count++;
+		}
+	}
+}
+
 if(php_sapi_name() != "cli") {
 	header("content-type: text/php");
 	header("content-disposition: attachment; filename=\"index.php\"");
 }
 
+
+/*
+ ██████  ██████  ██████  ███████
+██      ██    ██ ██   ██ ██
+██      ██    ██ ██████  █████
+██      ██    ██ ██   ██ ██
+ ██████  ██████  ██   ██ ███████
+*/
 log_str("Reading in core files...\n");
 
 $core_files_list = glob("core/*.php"); natsort($core_files_list);
@@ -95,6 +167,15 @@ $core = str_replace([
 
 $result = $core;
 
+
+/*
+██████   █████   ██████ ██   ██ ███████ ██████
+██   ██ ██   ██ ██      ██  ██  ██      ██   ██
+██████  ███████ ██      █████   █████   ██████
+██      ██   ██ ██      ██  ██  ██      ██   ██
+██      ██   ██  ██████ ██   ██ ███████ ██   ██
+*/
+
 $extra_data_archive = new ZipArchive();
 // Use dev/shm if possible (it's *always* in memory). PHP will default to the system's temporary directory if it's not available
 $temp_filename = tempnam("/dev/shm", "pepperminty-wiki-pack");
@@ -145,6 +226,15 @@ log_str("\n");
 
 $extra_data_archive->close();
 
+
+/*
+███████ ██ ███    ██ ██ ███████ ██   ██ ███████ ██████
+██      ██ ████   ██ ██ ██      ██   ██ ██      ██   ██
+█████   ██ ██ ██  ██ ██ ███████ ███████ █████   ██████
+██      ██ ██  ██ ██ ██      ██ ██   ██ ██      ██   ██
+██      ██ ██   ████ ██ ███████ ██   ██ ███████ ██   ██
+*/
+
 $archive_stream = fopen($temp_filename, "r");
 
 $output_stream = null;
