In EG 0.5.0 I get this: Main.TellStickDuo.Soffa Knapp 2.OFF
Is there a way for me to get rid of Main., or do I have to change all of my macros that uses the old event? I have a lot of them, so I really would like to avoid that.
There is two things to do in the plugin, you can type in an event string to fire (whatever I write here, EG adds Main. this didn't happen in EG 0.4.1), and you can add a delay.
So, i think your going to need to change the events in your 5.0 tree.
- Site Admin
- Posts: 3469
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
We have reworked the TriggerEvent action "eg.plugins.EventGhost.TriggerEvent" not "eg.TriggerEvent"
The retooling of the action served multiple purposes. One was to enforce a prefix, suffix standard. the reason why this has been chosen to be done is because of the ability to use wild carding when adding an event to a macro. It makes this process far easier to understand and also manage.
We have also added a couple of other goodies as well. One of the downsides of how EG works is that all events run in a single thread. what this means is any time TriggerEvent (action or eg) gets called the event gets added to the end of the list of events waiting to get processed. Because EG only allows for a single event and thus a single macro to get processed at a time this can prove to be problematic for some users that like to have a really organized tree. Now I know that you can use jumping to accomplish an organized tree. but if you want to pass data you would have to use eg.globals. and this is where the organization would go out the window. Macros can get overly complicated and you would have to do a lot of attribute checking or set all of the globals at the startup of EG. It can get quite messy when all you want to do is share a single bit of data and not store it for the long term.
So we have set up a means to allow for Events to get triggered real time. what this means is even tho there is an event that is running. you have the ability to cause another to run while the first is still running. The benefit to this is if you pass say a dictionary or a list as the event payload if the payload is modified in any way the macro that triggered the event would be able to access the new/modified data. This is because python lists and dicts are mutable. if you make a change, the change happens to all copies of it.
Which leads me to the next thing.. i did say payload with the TriggerEvent action.. yes we also added the ability to do payloads as well. with evaluating what is passed to it. so if you wanted to pass a global you can.
We also added the prefix as well. this does a little legwork so we don't end up with a blank prefix. so if there is no prefix entered then it checks the suffix. and if there is no "." in the suffix then it will automatically add Main as the prefix. if there is a "." then everything before it becomes the prefix. and the prefix and suffix entry also evaluate the data passed.
I have also written a whole help section that is in the section for how to use the various components of it.