Changes

Jump to navigation Jump to search
551 bytes added ,  12:30, 21 July 2020
no edit summary
Line 59: Line 59:  
== Full access ==
 
== Full access ==
 
By default, certain namespaces and types are off-limits to mods for security reasons. If you want to make a mod that writes to files or accesses the internet, you need to put a public static bool called GiveMeFreedom in your ModMeta implementation. Note that this only works for dll-based mods, which can't be uploaded to the Steam Workshop, and the user will be warned.
 
By default, certain namespaces and types are off-limits to mods for security reasons. If you want to make a mod that writes to files or accesses the internet, you need to put a public static bool called GiveMeFreedom in your ModMeta implementation. Note that this only works for dll-based mods, which can't be uploaded to the Steam Workshop, and the user will be warned.
 +
 +
== Dependencies ==
 +
 +
If you want to reference external dll files, you can either put them in the Software Inc_Data\Managed folder, or add this snipped to your ModMeta code to load dll's from a subfolder: (Note that this requires GiveMeFreedom)
 +
<pre>
 +
public override void Initialize(ModController.DLLMod parentMod)
 +
    {
 +
    AppDomain.CurrentDomain.AssemblyResolve += (x, y) => Assembly.LoadFrom(Path.Combine(parentMod.FolderPath(), "**SubFolder**\\" + y.Name.Substring(0, y.Name.IndexOf(",")) + ".dll"));
 +
    base.Initialize(parentMod);
 +
    }
 +
</pre>
 +
    
= Events =
 
= Events =

Navigation menu