Introducing Hercules Plugin Manager

Ind

Development Administrator
Staff member
Messages
1,655
Points
113
Introducing Hercules Plugin Manager
Hello~! What?!

  • I can't express how awesome this is. It's awesome, so awesome.
  • ...Incredibly awesome, yet another awesome feature brought to you by Hercules
Thoughtfully Designed

  • This features' design began long ago, a precursor to this feature, which demonstrates for how long we've been planning it, is the Hercules Renewal Phase One
Usage Example

  • Can be used to create @commands
  • Can be used to create script commands
  • Can be used to create console commands
  • Can be used to replace core functions with your ownA example of how handy this can be: when any RO emu updates a section of the code that is used by a user's modifications, e.g. Harmony, no matter how silly the edit is (e.g. a tab alignment update) the user has to wait for his modification's developer to update his patch (unless he manages to update it on his own), if the developer in question starts to use the HPM for his hercules users instead of a patch file, his users using hercules will no longer have to wait for updates unless the way the code works changes on hercules' end.


All About It - Documentation


Links~!

2 Notes

  • The plugin "sample" is currently missing projects for msvc2010 and msvc2012, thats because I dont have them, this will be solved asap, once one of our developers who possesses them logs in.
  • Login/Char server plugin support is currently disabled, it should be enabled by the next release, which will also include Hooks support (as an alternative to overloading)
 
Last edited by a moderator:
You are awesome
default_biggrin.png


Will there be official hercules plugin releases? And a forum for them.

 
This is the best news. Ever. Best news ever. Right here.

<3333333333 x's 5billion

 
@ind, i think i get compile issues on using solution-12, 10 is fine

 
Amazing. Great work!

It's really too bad there was a split between rA and Hercules. *Still hopes you guys will "merge"* Don't hate, just a dream xP

 
Last edited by a moderator:
This plugin system is really awsome, I'm currently trying it and the possibilities are enormous.

Right now it's possible to use GET_SYMBOLE from plugins to import function/var, but will it be possible in the future to import function/var from plugins to Hercules ?

Edit: Actually it's already possible, you just have to export the HPM->share function, and use it in your plugin to share your own stuff with Hercules, but I don't know if it's OK to do it this way.

 
Last edited by a moderator:
there should no problem when you use it like that, I think.

 
I just find a critical error with the HPM.

The HPM->event(HPET_INIT) occurs BEFORE every other inits(atcommand, clif etc...) and because of that it's impossible to add new commands or even override functions.

When your plugin init is over and you atcommand are added, the do_init_atcommand() occurs, wich set the atcommand->db to NULL, wich erase the commands you previously add with your plugin.

The same goes for function ovveriding, because the *defaut() functions are called after your plugin init, wich erase (again) all your modifications.

I know it's not finished and you probalbly already found this bug, but I want to try to contribute because the HPM system really as a huge potentiel and a little help can't harm.

 
I just find a critical error with the HPM.

The HPM->event(HPET_INIT) occurs BEFORE every other inits(atcommand, clif etc...) and because of that it's impossible to add new commands or even override functions.

When your plugin init is over and you atcommand are added, the do_init_atcommand() occurs, wich set the atcommand->db to NULL, wich erase the commands you previously add with your plugin.

The same goes for function ovveriding, because the *defaut() functions are called after your plugin init, wich erase (again) all your modifications.

I know it's not finished and you probalbly already found this bug, but I want to try to contribute because the HPM system really as a huge potentiel and a little help can't harm.
It is not, your information is inaccurate, I've tested all HPM functionality prior to its release. that is exactly the reason why there is a init and a server_ready event, so you can replace the init functions to your liking if you so choose with a init event, or have the original ones trigger and have your code be run on a server_ready event.(btw the NULL thing took place after the release and was fixed)

but I want to try to contribute because the HPM system really as a huge potentiel and a little help can't harm.
I'm very happy to hear that
default_biggrin.png

 
Last edited by a moderator:
Before I forget for the nth time. 

Regarding HPM Function Overloading, is it possible *or would it be possible if it doesnt already* to have Hercule's core functions be loaded together with the plugin functions or would the plugin overwrite them?

Scenario: The PK Plugin checks if sd->state.pk is enabled (which would go under battle_check_target), while Faction system plugin would check for like sd->status.faction value to see wether target is friend or foe. If both plugins overwrite battle->check_target, would both checks remai or would one overwrite the other? And each one overwrite the original battle_check_target's code? 

Edit: Also in case the functions are not overwritten, would the new custom battle_check_target have to be completely the same  as the original one? or could I just add the pieces of code as I need them? Like for instance, could I simply do

int my_battle_check_target( struct block_list *src, struct block_list *target,int flag){ int16 m; //map int state = 0; //Initial state none int strip_enemy = 1; //Flag which marks whether to remove the BCT_ENEMY status if it's also friend/ally. struct block_list *s_bl = src, *t_bl = target; nullpo_ret(src); nullpo_ret(target); if (s_bl->type == BL_PC && !((TBL_PC*)s_bl)->state.pk) return false;}
for the PK plugin? 

 
Last edited by a moderator:
Back
Top