Changes

Jump to navigation Jump to search
Line 116: Line 116:  
== Reading external files ==
 
== Reading external files ==
 
Finally, all modbehaviours have access to their '''ParentMod''', this is the class that manages your mod, and through this you can load files using the methods '''LoadTexture'''(png, jpg, jpeg), '''LoadTydFile'''(tyd), '''LoadAudio'''(mp3, wav, ogg), '''LoadGLTF'''(gltf, glb) and '''LoadOBJ'''(obj). Note that these methods all use relative paths from where your mod is installed and using '''../''' won't work.
 
Finally, all modbehaviours have access to their '''ParentMod''', this is the class that manages your mod, and through this you can load files using the methods '''LoadTexture'''(png, jpg, jpeg), '''LoadTydFile'''(tyd), '''LoadAudio'''(mp3, wav, ogg), '''LoadGLTF'''(gltf, glb) and '''LoadOBJ'''(obj). Note that these methods all use relative paths from where your mod is installed and using '''../''' won't work.
 +
 +
== 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.
    
= Events =
 
= Events =

Navigation menu