Chaos Project

Game Development => Sea of Code => Topic started by: G_G on December 26, 2010, 01:39:13 pm

Title: [C#] Loading Libraries Outside of Project?
Post by: G_G on December 26, 2010, 01:39:13 pm
I want to be able to have a plugin system for my event editor or for later programs that can have customization and what not. So basically what I need (if its possible) is to be able to load a dll thats been coded in c# but I'll need to load it externally.

So basically I'll have a "Plugins" folder and the program will read all files from it and insert the plugin where its defined. My plugin template would look something like this for my event editor.
using Statements;
namespace Plugin_Name
{
    public class EvPlugin // Name may need to be specific depending if this system even works
    {
        // Variables must be named this way
        string event_name = ""; // Name of event command
        string event_code = ""; // Code that gets executed or something
       
    }
    public class EvPluginForm : System.Windows.Forms.Form // Form dialog that sets event command settings and what not
    {
        public EvPluginForm()
        {
           
        }
    }
}


Something like that. It'll be more advanced and have more options and stuff.
Title: Re: [C#] Loading Libraries Outside of Project?
Post by: Blizzard on February 25, 2011, 03:21:12 pm
Eh, monster necro here.

I can give you the source code of Class Tools. I have implemented a relatively simple plugin system. Adding an additional control to plugins isn't a problem.
Title: Re: [C#] Loading Libraries Outside of Project?
Post by: G_G on February 25, 2011, 05:29:43 pm
Oh please blizz that would be awesome <3
Title: Re: [C#] Loading Libraries Outside of Project?
Post by: Blizzard on February 25, 2011, 05:45:31 pm
Here you go:

http://dl.dropbox.com/u/20224394/ClassTools.rar

It's a very simple architecture.
Title: Re: [C#] Loading Libraries Outside of Project?
Post by: G_G on February 25, 2011, 06:09:11 pm
Blizz because of you I can now do what I've wanted to do.

Create a full fledge ToA config app. Each add-on has its own Form to configure the options which is coded in a DLL. I think imma start on it now. Which'll make updating the ToA app and add-ons much much easier when ToA gets updated.