General Best way to Add a plugin
Reply
Best way to Add a plugin
Hi All,

Whats the best way to add a plugin to MQ2? I tried downloading the source files to compile the new plugin, how ever the source files seem to be missing the other common plugins (melee,cast, ecT).

Is there a place we can download the source code, including the default packaged plugins? I would like to add a custom plugin I had developed to see if it will work with rof2.

Thanks
Wed Jul 01, 2015 1:17 pm
I added you to the developer forum, most of the public code should be in there. Make sure you get the RoF2 ones. If you think something is missing just post a request and I can add it. I'm not usually as slow as I have been this week (daughters birthday, wedding aniversary, and the holiday).



Just copy and paste the code into a fresh plugin source. Since you've already written your code you probably already know how to create a new plugin, but just in case:

  1. Open a command prompt and navigate to your MQ source folder.
  2. From there execute a "mkplugin MQ2Cast". This will create a folder with a new plugin template--it includes a MQ2Cast.cpp
  3. Add that project to your solution.
    1. Open the Macroquest2.sln in visual studio.
    2. In the Solution Explorer window right click the solution and then click Add->Existing Project...
    3. Browse to and select the MQ2Cast.dsp that was created in step 2.
    4. Follow the prompts to add it

  4. In the Solution Explorer open MQ2Cast->Source Files->MQ2Cast.cpp
  5. Delete all the code in that file and replace it with the source code you want to use.
  6. Compile
  7. Finally, when you realize that I probably forgot some crucial step and this walkthrough doesn't work, come back and post.


It's kind of a pain, but if you get a rhythm going it only takes 10 or 15 min. I'm not aware of anywhere that has trusted packages that includes the extra plugins. I imagine they are prepackaged out there somewhere though. You might be able to find them on some file sharing services or a torrent.
Sat Jul 04, 2015 11:16 am
Project Lead
Is there still a dev forum? A while ago, someone mentioned Aggressive, and a couple other important/very helpful offsets that are available in the latest MQ2 build from the official (?) website. Namely, aggressive, Target information, and Me.PctAggro, not to mention being able to call a function with the array syntax without using ${Macro.Return}.

I would really like to add these features to your build, but it would require changes to MQ2Main (as I'm sure you're aware). Are you open to pull requests? Could you add these features? Would it help if I copy and pasted the relevant additions?
Fri Jan 11, 2019 10:44 pm
General Best way to Add a plugin
Reply