diff --git a/binding-mri/binding-mri.cpp b/binding-mri/binding-mri.cpp
index 01599c8..00567eb 100644
--- a/binding-mri/binding-mri.cpp
+++ b/binding-mri/binding-mri.cpp
@@ -295,7 +295,8 @@ VALUE kernelLoadDataInt(const char *filename);
 
 static void runRMXPScripts()
 {
-	const std::string &scriptPack = shState->rtData().config.game.scripts;
+	const Config &conf = shState->rtData().config;
+	const std::string &scriptPack = conf.game.scripts;
 
 	if (scriptPack.empty())
 	{
@@ -371,6 +372,10 @@ static void runRMXPScripts()
 		rb_ary_store(script, 3, rb_str_new_cstr(decodeBuffer.c_str()));
 	}
 
+	/* Execute preloaded scripts */
+	for (size_t i = 0; i < conf.preloadScripts.size(); ++i)
+		runCustomScript(conf.preloadScripts[i]);
+
 	for (long i = 0; i < scriptCount; ++i)
 	{
 		VALUE script = rb_ary_entry(scriptArray, i);
@@ -379,7 +384,7 @@ static void runRMXPScripts()
 		                             RSTRING_LEN(scriptDecoded));
 
 		VALUE fname;
-		if (shState->rtData().config.useScriptNames)
+		if (conf.useScriptNames)
 		{
 			fname = rb_ary_entry(script, 1);
 		}
diff --git a/mkxp.conf.sample b/mkxp.conf.sample
index 602f551..819c0a6 100644
--- a/mkxp.conf.sample
+++ b/mkxp.conf.sample
@@ -100,6 +100,14 @@
 # customScript=/path/to/script.rb
 
 
+# Define raw scripts to be executed before the
+# actual Scripts.rxdata execution starts
+# (default: none)
+#
+# preloadScript=my_win32_wrapper.rb
+# preloadScript=ruby18_fixes.rb
+
+
 # Index all accesible assets via their lower case path
 # (emulates windows case insensitivity)
 # (default: enabled)
diff --git a/src/config.cpp b/src/config.cpp
index c11a593..ae1d71b 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -177,6 +177,7 @@ void Config::read(int argc, char *argv[])
 	po::options_description podesc;
 	podesc.add_options()
 	        PO_DESC_ALL
+	        ("preloadScript", po::value<StringVec>()->composing())
 	        ("RTP", po::value<StringVec>()->composing())
 	        ("fontSub", po::value<StringVec>()->composing())
 	        ("rubyLoadpath", po::value<StringVec>()->composing())
@@ -210,6 +211,8 @@ void Config::read(int argc, char *argv[])
 
 	PO_DESC_ALL;
 
+	GUARD_ALL( preloadScripts = vm["preloadScript"].as<StringVec>(); );
+
 	GUARD_ALL( rtps = vm["RTP"].as<StringVec>(); );
 
 	GUARD_ALL( fontSubs = vm["fontSub"].as<StringVec>(); );
diff --git a/src/config.h b/src/config.h
index 498a052..3f7143b 100644
--- a/src/config.h
+++ b/src/config.h
@@ -69,6 +69,7 @@ struct Config
 	bool useScriptNames;
 
 	std::string customScript;
+	std::vector<std::string> preloadScripts;
 	std::vector<std::string> rtps;
 
 	std::vector<std::string> fontSubs;