I’ll first answer with a mechanism that uses the currently existing features of the SkookumIDE and the SkookumScript UE4 Plugin. New features could be added that could make end user modding even more flexible in the future.
The main idea is to have mods compiled on a server and have the compiled binaries with mods sent over to clients that want to use a particular mod.
You could theoretically have several different mods and their respective overlays applied in whatever combination that you like.
The trick and the unwritten part that you would need to write depending on the needs of your moddable project would be to transfer the script files for a mod to the server and to create some sort of a management system for the mods - which ones to apply for a given game etc.
On a modder’s system
A modder would need all the script files and a version of the game that still allows the SkookumIDE to connect to it to build up a mod. Modders could use the freely available Standard SkookumIDE or the future Pro SkookumIDE to build their mod. The game that allows SkookumIDE connections, the SkookumIDE and the scripts could be included with every version of the game or be a separate download for people that have decided to make a mod.
Each mod would use its own “overlay” to contain all the script files in their own directory that can easily be toggled on and off. Mods should probably be located between the “Engine” overlay and the “Project-Generated” overlay. Project overlays can be seen and modified in the SkookumIDE “Settings”->“Project Settings…” menu option.
Here is a related post on overlays:
Once a mod was working on a modders system, the overlay and all its script files would need to be uploaded to the game server. You might also want the server to ensure the name for a mod was unique, add a description or icon to represent the mod or any other custom details that make sense for your game.
It would probably be a good idea to be able to download mods and all their script files from the server so that modders could look at existing mods for ideas.
On the game server
The most efficient mechanism of getting mods to client systems would be for the game server to generate compiled binaries for various permutations of mods. Each compiled binary would have all the logic needed for the particular mods applied and all the rest of the game logic. Once a particular set of mods was chosen for a game the server would build the binary if it didn’t already exist and then each player would download the binary to play.
There are many features that could be added to the existing tech to help with this process, though you should be able to work with the current SkookumIDE without too much extra work.
A project file for the SkookumIDE stores the names and locations of all the overlays in a simplistic
.ini file usually called
Skookum-project.ini. We can supply the format of the project
.ini file in a follow post if needed. Your server could edit this file and add or remove mod overlays as needed and then run the SkookumIDE on the command line to generate the compiled binary.
Here are the command line options for the SkookumIDE - http://skookumscript.com/docs/v3.0/ide/command-line/
It might be nice to add a couple of extra command line options to make this process easier. New options that come to mind include reload project, load new project and quit SkookumIDE. We can work that out as needed.
The generated SkookumScript binaries should be a simple single file to transfer to the client. In the future we could add tech to compile just the code for a mod rather than the entire game + any mods. Even without that future tech making the SkookumScript binaries more modular the full binaries with the entire game + mods would still be pretty small. For example, the compiled binaries for the open world game Sleeping Dogs is about 6MB.
On modded client
The SkookumScript UE4 Plugin is currently written to look for the compiled binary in a particular content location and to load it once when a game starts. You could keep it that way if you could swap in the appropriate SkookumScript binary downloaded from the server. Alternatively you could modify the freely available SkookumScript UE4 Plugin C++ source so that it looks for the SkookumScript binary in different directories or file names for different mod combinations and it could reload the binary at different points rather than just at the game start.
Future modding tech and more info
It may be possible to get modding working mostly with the existing tech as described above, however we will be adding additional modding features to SkookumScript so don’t be shy to ask for features in this area if you think it will save you a bunch of work.
Likewise the descriptions above may need additional details or info to get you on the right track before you have a modding system 100% implemented and shippable.