Hey ConstructorRichi, <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">
I made my own modified version of the SDK template files, with some extra information comments, and a more graphical style of divider comments to break up and mark the different sections of code.
I'm planning on making a tutorial to go along with my modified version of the SDK at some point, but I can upload a copy for you to take a look at now in case it might help. <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">
https://dl.dropboxusercontent.com/u/382 ... mplate.zip
You may alraedy know this, but the one really important step in creating a plugin is to make sure the "id" value you choose for the edittime.js file, matches two spots in the runtime.js file.
In my SDK mod the places that must match are marked in both files with the following placeholder text:
XXXXXXXXXXXXXXXX_MyPluginID_XXXXXXXXXXXXXXXX
(Note the "ID" in the placeholder text.)
edittime.js
(Note the first placeholder is for the NAME, not the ID. Only the ID has to match between files.)
//â•”â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•—
//â•‘/////////////////////////////// Settings ///////////////////////////////â•‘
//â•šâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
function GetPluginSettings()
{
return {
"name": "XXXXXXXXXXXXXXXX_MyPluginName_XXXXXXXXXXXXXXXX",
"id": "XXXXXXXXXXXXXXXX_MyPluginID_XXXXXXXXXXXXXXXX",[/code:28nntpg6]
[b]runtime.js[/b]
[i](You may need to scroll down a little to see both placeholder spots.)[/i]
[code:28nntpg6]//â•”â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•—
//â•‘///////////////////////////// Plugin class /////////////////////////////â•‘
//â•šâ•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
//----------------------------------------------------------------
// *** CHANGE THE PLUGIN ID HERE *** - must match the "id" property in edittime.js
// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
cr.plugins_.XXXXXXXXXXXXXXXX_MyPluginID_XXXXXXXXXXXXXXXX = function(runtime)
{
this.runtime = runtime;
};
//----------------------------------------------------------------
(function ()
{
/////////////////////////////////////
// *** CHANGE THE PLUGIN ID HERE *** - must match the "id" property in edittime.js
// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
var pluginProto = cr.plugins_.XXXXXXXXXXXXXXXX_MyPluginID_XXXXXXXXXXXXXXXX.prototype;[/code:28nntpg6]
[b]C2 plugin video tutorial - by John Velojet[/b]
I found this nice walk-through for setting up a super simple plugin from start to finish.
[youtube video="ZlgJ4ts00C4"]
[i](This is actually the first tutorial I use to make a working plugin, back when I started looking into making plugins.)[/i]