Member Controls

Goto page 1 2      Next
Developers > Plugins
Inge JonesLink to postposted: Sat Jun 25, 2005 11:10 am

Member since:
 2005-03-06
Posts:
 1900
At the moment, the BHAV plugin that is distributed with SimPe is all one dll that does BHAV, TTAB, BCON etc etc. If we split that down into separate editors for each type of resource, will SimPe be able to use them all? Will users be able to choose between Peter's editor and Quaxi's editor on a resource by resource basis?

Our BHAV editor is almost ready for public testing, but people would still need to use the original for the other filetypes at the moment.
quaxiLink to postposted: Sat Jun 25, 2005 1:31 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
You can of course split the diffrent Editors in seperated dll's. As long as the Files end with plugin.dll and contain a IWrapperFactory class, SimPe will load them.

In order to not conflict with the original SimPe dll's. You have to take car of the WrapperDescription generated by each Wrapper (Member of the IWrapper Interface).
Each Wrapper is identified by a unique ID (that is used to load the Wrapper and to determin the Wrapper order the user specified in the"Installed Plugins" Dialog. That ID is generaed by the Author and Name Property of the (Abstract)WrapperDescription. So you have to change at least the Author Value in that Description for your Wrappers. Otherwise your Editors generate the same UID and conflict with the original ones.

SimPe is not able to select the Wrapper on per Resource basis (which would mean, that you have to choose the Wrapper SimPe is using after clicking on a Resource, which can be anoying). You can only determin which Wrapper is prefered, by changing the order in the "Installed plugins" Dialog (Wrappers on top have a higher priority and therefor are selected first), or by Disabling the unwanted Wrapper in the same Dialog.

Plugins that were unknown to SimPe are allways placed on top of that List. So usually Custom Plugins have automatically a higher Priority than the SimPe ones.
quaxiLink to postposted: Sat Jun 25, 2005 1:40 pm
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
The last post mainly was about the effects on the UI. Which UI SimPe is choosing when you open a Resource.

The other thing is the internal SimPe. Which does not bother about duplicate Wrappers. Let's say you have a second String Wrapper in your dll's. Your Editors can make use of them by calling it directly.
The rest of SimPe, is still using the original String Wrapper, as it calls that pne directly (not through the Registry that is used to determin the UI for a Resource!)

So If your Wrappers are designed as real Plugins, you can include any reimplemented class in them, without breaking SimPE, it's original wrappers and Tools.
pljonesLink to postposted: Sat Jun 25, 2005 4:13 pm

Member since:
 2005-04-02
Posts:
 616
That works for replacing simpe.bhav.plugin in SimPe 0.35.

So if I want to replace Clst, the best bet is just to make it into an "external" plugin and it'll be picked up (for the Plugin tab)?
pljonesLink to postposted: Sat Jun 25, 2005 6:13 pm

Member since:
 2005-04-02
Posts:
 616
It also appears one of the interfaces has changed name (this from the BHAV plugin WrapperFactory.cs):
SimPe 0.39:
#region IToolFactory Member

public ITool[] KnownTools

SimPe 0.41:
#region IToolFactory Member

public IToolPlugin[] KnownTools

I've not tried compiling against 0.41 yet, so I don't know if this is a problem (yet).

<later>
Okay, I've got it compiling against the latest QA (binary) release as building the source seemed broken (there appear to be a few missing files on CVS).

GlobWrapper changed to remove IPackedFileProperties and "UpdateUI" became "RefreshUI". Apart from that, there were no (significant) changes.
quaxiLink to postposted: Sun Jun 26, 2005 12:32 am
Avator for quaxi

Member since:
 2006-04-28
Posts:
 3154
Didn't UpdateUI bacome LoadUI?

So if I want to replace Clst, the best bet is just to make it into an "external" plugin and it'll be picked up (for the Plugin tab)?


Well, Clst contains more than one wrapper if i remember right. But technically yes.
If you put any of the wrappers contained in the simpe.clst.plugin.dll into a new project, and move it to the plugins folder. It wil override the default plugin for the UI.
EmilyLink to postposted: Sun Jun 26, 2005 12:50 am

Member since:
 2006-04-17
Posts:
 361
Ups :roll:

renaming iTool and removing IPackedFileProperties. That was me :oops:.

The idea quaxi had for IPackedFileProperties didn't make sense anymore, so I removed it. The ITool Loader (you can stop reading if you are not interested in our plans ;)) is way more differentiated in the new SimPe.

There are normal (read classic) Tools (like OW), then we have action Tools (like the ByteViwer is going to be, or extract, add, delete... are) and doackable Tools (Sim Surgery is going to be on of theese).
We will also add resource Tools, which wil integrate new ResourceTrees into SimPE (we plan a integrated Neighborhood/Sims Tree, and something like the OW for that)
pljonesLink to postposted: Sun Jun 26, 2005 12:52 am

Member since:
 2005-04-02
Posts:
 616
"quaxi" wrote:
Didn't UpdateUI bacome LoadUI?

Not according to CVS. Have you tried clearing your working directory and updating from CVS lately, by the way? I'm building against the binary QA release (in part) because I couldn't get HEAD to build.
EmilyLink to postposted: Sun Jun 26, 2005 1:03 am

Member since:
 2006-04-17
Posts:
 361
To build head, you need to download the extra dll's by divElements (http://www.divil.co.uk/net/) and SteepValley (http://www.steepvalley.net/). (You can of cours also copy them from the binary release to link them)

Or are there any other Problems?
pljonesLink to postposted: Sun Jun 26, 2005 9:55 am

Member since:
 2005-04-02
Posts:
 616
"Emily" wrote:
Or are there any other Problems?

Yeah - I think a few of the c# source files were missing (ones I'd renamed/deleted when I was working on SimPe, which later got reverted). It looks like they didn't get committed to CVS after going back to the old versions.
Goto page 1 2      Next


viewthread, 0, 0, Plugins