Quote: "it's the modularity, the reusability that I was after."
That's along the lines of what I am looking for as well. I originally played around with each neuron keeping it's own timer/delay value, but that would be very inefficient. So, I started on the track of a global timer(s) that would set neurons to fire as needed.
I am trying to keep the neurons as small as possible and I am down to a nibble for the "firing mechenism". It's the rest of the neuron that seems to be taking up space. 1 nibble for a charge value, 1 nibble for a threshold value, and a final nibble for a weight value. And finally, 4 bytes to track which of up to 32 neurons to link to.
Adding a time-delay would be a second huge cost (add a DWord for each neuron) to track things like when to sleep, when to go to work, and so on. But a global queue of "events" created by something like your trigger mechenism would probably do the trick. All the neuron would really have to record is which event value to wait for, or better yet, program the event to give specified neurons a "charge."
So, events might be along the lines of "spend energy" (which translates into "get hungrier"). Another event would be it's morning, noon, or night. Another event might be a nearby npc is cooking food ("mmm-mmm, smell that cooking"). All of these may, or may not, add a charge onto the 'stop whatever you are doing, and eat' neuron. Once that neuron has a sufficient charge - it 'fires', then npc stops and eats food.
Anyway, forgive the rambling. Just trying to work it all out. My way saying I like what you have there.
Open MMORPG: It's your game!