Aller au contenu

Photo

Event Manager


  • Veuillez vous connecter pour répondre
1 réponse à ce sujet

#1
anakin5

anakin5
  • Members
  • 258 messages
Because it also concern scripting, I am making some pub here as well. I have the hope to talk about it as well and why not find new ideas.

Well the project is Event Manager and proposes a common way to override and listen events.
So I am trying to spread the idea because if there is only 4 or 5 modders that use it, the goal will not be reached.

The project propose a common script to use in engineevents.gda table to override events. This script is in fact in charge of broadcasting the event to all mods that make use of it.


There is a subscription system, which use a new .gda table where modders can describe what they are doing with which event. You can override the default handler of the event or just choose to listen for an event.
The common script read this table and send the event to mods that subscribe it.


The first advantage is that a mod that use this system is working like it was before using the Event Manager. The difference is made when 2 mods override the same event and use the Event Manager.

The second advantage is that it is really easy to convert his mod because it is just a matter of filling the Event Manager table. Script remain the sames most of the time.

The third advantage is that it is light. The system by itself has 2 files (2ko and 1ko). That makes 3 new files per project if I include the Event Manager 2da table of the mod.

All that to say : there is no reason to not, at least, try it.


It also offer some advanced possibilities. For example it allow 2 mods to override the default handler of an event in the same time. It is a simple system of lock that is released or not by mod that override an event in order to let other mods to do their job.

Modifié par anakin5, 08 février 2010 - 02:41 .


#2
Phaenan

Phaenan
  • Members
  • 315 messages
Hmm.
Sounds interesting. Actually, seeing how common engineevents overrides are, it's kinda surprising nobody tried to write the same kind of code before.

I'll prolly be overriding one combat/death related event soon so unless I decide to trick my way around the engineevents for compatibility sake, I'll be giving your lib a shot. ^_^

Modifié par Phaenan, 08 février 2010 - 09:52 .