Add triggers/aliases/timers from Lua on startup?

Posted by Zolomon on Tue 09 Jun 2015 10:47 AM — 2 posts, 12,969 views.

#0
Hi!

I play from many different computers/platforms, and would like to have a single Lua file stored in Dropbox between computers, that will programmatically setup my world on startup.

So I wonder if there are any nice hooks I can use to add triggers/aliases/timers manually?

For example, on one computer I don't have any speakers and wish to control whether sounds triggers should be enabled and so on.

Also, it is much easier to have a single place to edit instead of modifying duplicated code in different places.

My initial solution would be to have an alias that will install/uninstall itself, but would prefer a solution where I didn't have to do that.
Amended on Tue 09 Jun 2015 10:56 AM by Zolomon
Australia Forum Administrator #1
One approach is to use Git (git pull) to update your local files before a session, play, then push your changes back to a central spot (git push). See: http://www.gammon.com.au/forum/?id=12432

The central spot doesn't have to be GitHub - any local or remote directory can be used.

You can import stuff (http://www.gammon.com.au/scripts/doc.php?function=ImportXML). However that tends to stay there afterwards.

You could use plugins - but you still need a mechanism for exchanging changes.