Jump to content

Plugin System


Maki

Recommended Posts


  • Group:  Members
  • Topic Count:  146
  • Topics Per Day:  0.03
  • Content Count:  1195
  • Reputation:   467
  • Joined:  11/15/11
  • Last Seen:  

I'd like to discuss the implementation of a plugin/mod system; it would make updating rAthena much much easier for anyone who has a few+ source edits and has to do everything manually. It would be nice to have a list of pros/cons of the system.

All I have heard about implementing plugins is that it would slow down all of src and that we don't have a viable way of adding it (unless via ASM).

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  398
  • Reputation:   140
  • Joined:  01/04/12
  • Last Seen:  

^+1

Link to comment
Share on other sites


  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

I like the way anope achieves this - has a separate folder in /src/ and any files in there get included when performing ./configure && make. On the inside, 'include's are added for compiled addons in a super special secret file called addons.h (or whatever it was called) before anything else is checked. Could we do something similar?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   101
  • Joined:  11/13/11
  • Last Seen:  

I think that is not currently viable do this, sincerely, our source is the biggest mess I already saw, by design it wont work for a plugin system.

For simple custom atcommands/script commands this can be made by exporting a vtable with all needed functions to the plugin and create a private store on the session_data so each plugin can have a piece of data for each player.

  • Upvote 3
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  427
  • Reputation:   123
  • Joined:  11/17/11
  • Last Seen:  

Well, I think we should add a VERY! primitive plugin system.

It could work like this: the plugin system would be able to load plugins (so or dll based on platform), and that is. We would not add any callback or such.

This way one could provide a binary distributed plugin to protect her source code, and provide some headers and a patch file to the source code to add the neccessary calls to the code.

We would avoid messy callbacks, still provide users with a way to distribute proprietary content.

  • Upvote 1
Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  91
  • Topics Per Day:  0.02
  • Content Count:  325
  • Reputation:   34
  • Joined:  06/01/13
  • Last Seen:  

^or we could fix the mess up and then add the plugin system :3 +1 to the idea btw.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

^or we could fix the mess up and then add the plugin system :3 +1 to the idea btw.

Id have to agree here lol first fix the mess, its way better then it use to be back in old ea forums id say but still a mess but +1 for the plugin idea i just updated my src and had to manually install like 9k lines

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...