Have you ever wondered, "Is there a drop-dead easy way to download and execute scripts in my released app/game?"
If so, the answer is, "Yes!".
With patcher you can download scripts to effectively supersede scripts bundled with your app. You can also download new code and execute it.
-- Top of main.lua -- local patcher = require "plugin.patcher" patcher.export() -- Then, elsewhere in your patching management code (write it as you wish) ... -- local function onSuccess( event ) patcher.purge("scripts.myModule") require("scripts.myModule") end patcher.mkFolder( "scripts" ) local myPatch = "https://raw.githubusercontent.com/roaminggamer/RG_FreeStuff/master/myPluginSamples/patcher/myModule.lua" patcher.get( myPatch, "scripts.myModule", onSuccess )
Complete Example: patcher-example.zip
Disclaimer: You must still follow the guidelines outlined by individual app stores with regards to downloaded scripts.
You must read these guidelines on your own and decide on your own. I am not an expert on the current guidelines for every store and I don't constantly read them to stay up-to-date.
Edited by roaminggamer, 17 October 2017 - 07:40 AM.