Ind 945 Posted May 2, 2013 (edited) Introducing Hercules Plugin ManagerHello~! 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 Its being done, most of it is already available in our wiki Hercules Plugin Mananger Building HPM Plugin for MSVC Building HPM Plugin for GCC Links~! Hercules Console Input Update (HPM Friendly) Commit Visual Studio 2010 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) Edited February 7, 2017 by Ridley 14 Lanz, Jguy, Xgear and 11 others reacted to this Quote Share this post Link to post Share on other sites
Yommy 265 Posted May 2, 2013 You are awesome Will there be official hercules plugin releases? And a forum for them. Quote Share this post Link to post Share on other sites
Ind 945 Posted May 2, 2013 Will there be official hercules plugin releases?yes we have plans on adding some features as plugins (e.g. unit control script commands)And a forum for them.soon, yes :3You are awesome not as awesome as you <333 Quote Share this post Link to post Share on other sites
jTynne 101 Posted May 2, 2013 This is the best news. Ever. Best news ever. Right here. <3333333333 x's 5billion Quote Share this post Link to post Share on other sites
Relzz 32 Posted May 3, 2013 Im about to cum.. Oh.. ShEEE)tT !! This is greaaaat !! Quote Share this post Link to post Share on other sites
Lanz 0 Posted May 3, 2013 Awesome,Great,Cool this excite me more!.. Thanks Ind Quote Share this post Link to post Share on other sites
jTynne 101 Posted May 3, 2013 Im about to cum.. Oh.. ShEEE)tT !! This is greaaaat !! [email protected] Quote Share this post Link to post Share on other sites
Judas 100 Posted May 3, 2013 @ind, i think i get compile issues on using solution-12, 10 is fine Quote Share this post Link to post Share on other sites
Xantara 1 Posted May 3, 2013 (edited) 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 Edited May 3, 2013 by Xantara Quote Share this post Link to post Share on other sites
Susu 5 Posted May 15, 2013 (edited) 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. Edited May 15, 2013 by Susu Quote Share this post Link to post Share on other sites
Ind 945 Posted May 15, 2013 there should no problem when you use it like that, I think. Quote Share this post Link to post Share on other sites
Susu 5 Posted May 16, 2013 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. 1 jaBote reacted to this Quote Share this post Link to post Share on other sites
sketchyphoenix 15 Posted May 16, 2013 brb selling plugins Quote Share this post Link to post Share on other sites
Ind 945 Posted May 16, 2013 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 Quote Share this post Link to post Share on other sites
Xgear 44 Posted June 8, 2013 (edited) 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? Edited June 9, 2013 by Xgear 1 jaBote reacted to this Quote Share this post Link to post Share on other sites
jaBote 438 Posted June 9, 2013 I've thought about it before and kinda screwed up myself. It'd be quite nice if each plugin used its own function because it would be a mess otherwise, but the answer to that is on Ind's hands ot another one that can understand all the HPM code. Quote Share this post Link to post Share on other sites
Ind 945 Posted June 9, 2013 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? Currently that can be done by copying the pointer to the original, and then throwing it back at it after your custom stuff goes (check my example at the skill error message plugin test), but we have a HPM Hook implementation in the plans that'd make doing what you propose much easier. Quote Share this post Link to post Share on other sites
Cydh 9 Posted January 22, 2014 btw, how much is the minimum memory size to do "make plugins"? What I experienced just now, if I have server with 1GB of memory and with all normal stuffs installed (let's say, I use Asura Hosting and it ready to use with 512MB of physical memory and 512 Swap), it's not enough. > top > free -m > top (then do make plugins, and see the top result) > make plugins (the result of..) > make plugins Quote Share this post Link to post Share on other sites
evilpuncker 503 Posted January 22, 2014 btw, how much is the minimum memory size to do "make plugins"? What I experienced just now, if I have server with 1GB of memory and with all normal stuffs installed (let's say, I use Asura Hosting and it ready to use with 512MB of physical memory and 512 Swap), it's not enough. > top > free -m > top (then do make plugins, and see the top result) > make plugins (the result of..) > make plugins this may help you: http://herc.ws/board/tracker/issue-7803-hpmhookingc/ 2 Cydh and JulioCF reacted to this Quote Share this post Link to post Share on other sites