We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2007
    Location
    Seattle, WA
    Posts
    7,599

    Cross plugin communication

    Can't find the thread from this, but is it possible for a plugin to execute a shell command (/do something)?
    Maley Oakensage, Captain of Elendilmir

    Alas Elendilmir, may you *jingle jangle* forever in the Forgotten West

  2. #2

    Re: Cross plugin communication

    No, it's not possible for a plugin to take any player action that's not initiated by the player. This includes issuing commands normally entered by players in the chat box. A plugin could create a quickslot and put a shortcut in it, so that the player could click it and issue the command.

    I'm not sure what this has to do with cross plugin communication. Perhaps you could clarify what you're trying to do and some other authors could give you some hints.

  3. #3
    Join Date
    Dec 2007
    Location
    Seattle, WA
    Posts
    7,599

    Re: Cross plugin communication

    An idea I have a sinking feeling that this is not technically possible at this time.... I've been looking at the API, and can't seem to find anything that would point me in the right direction...

    So the idea.... Plugin A is loaded first.

    Plugin B, is loaded second. B, while in it's load method, executes code that tells A information so A can do something with the information, so the "conversation" would look like:
    B: A, ya there?
    A: Yes, what's the info?
    B: <info>
    **A does something**

    About the only other thing I can think of is reading/writing to some sort of shared data file in PluginsData.... but without some way to know if something's reading/writing to said data file, I can see this getting messy really quickly.
    Last edited by Almagnus1; Feb 03 2011 at 03:30 AM.
    Maley Oakensage, Captain of Elendilmir

    Alas Elendilmir, may you *jingle jangle* forever in the Forgotten West

  4. #4

    Re: Cross plugin communication

    You're in luck!

    As long as both plugins are loaded in the same execution context (i.e., "script state"), they can easily share information via globally declared variables. A single table containing all of the shared information is often used for this purpose.

    Although there isn't a strict system of dependencies, plugin A can check to see if plugin B is loaded in the same context (and vice-versa), or even force it to load. (You might think that this is a plugin automating a user action, but it's not. The user has to take a specific action to load one plugin, which in turn can extend that action to loading another plugin.)

    It's also possible for two plugins to share the same external .plugindata file, but I'd recommend not doing that. First of all, there's a delay; secondly, there's no mechanism to ensure that reads and writes take place in a specific order, so messages might get lost if you don't implement your own "queueing" mechanism.

    There are lots of possible ways to handle your situation, so I'd urge you to keep experimenting.

  5. #5
    Join Date
    Dec 2007
    Location
    Seattle, WA
    Posts
    7,599

    Re: Cross plugin communication

    In other words.... I need to start dissecting the Plugin Manager...

    Spiffy, at least I have a starting point now =)
    Maley Oakensage, Captain of Elendilmir

    Alas Elendilmir, may you *jingle jangle* forever in the Forgotten West

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

This form's session has expired. You need to reload the page.

Reload