Introducing Hercules Plugin Manager

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.

 
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

Code:
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.
 
Last edited by a moderator:
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

rr1b.png


> free -m

EKqi5qh.png


> top

(then do make plugins, and see the top result)

> make plugins

iqet.png


(the result of..)

> make plugins

esCCzyt.png


 
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/

 
Back
Top