Hi All,<br><br>A fairly lengthy description follows of why we cant currently create loadable Modules that provide extra script functions...<br><br>I currently have an Opensim publish subscribe module that exposes its functionality through new scripting commands osPublish and osSubscribe, unfortunately i cannot release it into the main OpenSim project yet for licensing reasons. I'd managed to <br>
develop the module without having to alter any existing code from the main OpenSim codebase, but i still had to merge changes in the prebuild file every time i synched with SVN.<br><br>Tonight I finally got round to attempting to separate it out from the main OpenSim codebase into a dll module of its own, all was going well until I got to the point of testing and found that my scripting methods (osPublish,osSubscribe) were no longer being recognised when the scripts were compiled in world. <br>
<br>I poked around a bit and found that the ApiManager class only search within the active dll assembly for API classes, I altered this so that it searched all assemblies. At this point it was finding my API interface and successfully initing it. However once<br>
again the osPublish,osSubscribe methods were not found when compiling a test script in world.<br><br>More tracing and I found that the Compiler.cs class has hard coded references to two ScriptEngine dlls<br><br>parameters.ReferencedAssemblies.Add(Path.Combine(rootPath,<br>
                    "OpenSim.Region.ScriptEngine.Shared.dll"));<br>parameters.ReferencedAssemblies.Add(Path.Combine(rootPath,<br>                    "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll"));<br>
<br><br>I temporarily added a reference to my module DLL so that it was on the compile path for scripts (not sure how to get round this yet)<br><br>at this time i now get...<br><br>The imported type `OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass' is defined multiple times<br>
<br>Because ScriptBaseClass is made up of several partial classes...<br>i.e.  OSSL_Stub.cs, LSL_Stub.cs<br><br>I discovered that partial classes cannot be spread across DLLs, so currently we have a limitation that prevents us producing loadable modules that provide extra script functions.<br>
<br>My opinion is that this is a fairly major restriction in the module system, well... actually its a limitation of the script engine...<br><br>Any ideas on a solution to this ? hoping for an easy solution, but my suspicion is it may involve some re-architecting.<br>
<br>cheers,<br>Rob Smart<br>(Yossarian Seattle)<br>