Emulate user input / trigger an event

Place to get help with not working mods / modding interface.
Post Reply
voddan
Fast Inserter
Fast Inserter
Posts: 124
Joined: Sat Jun 03, 2017 9:22 pm
Contact:

Emulate user input / trigger an event

Post by voddan »

Is there a way to trigger an arbitrary event or user input?

Basically I want to run a save of a game, but instead of playing with mouse and keyboard I would like it to follow a script with predefined commands.

I think I have read about the devs doing something similar when they were filming the intro clip for factorio, so I wonder if it is possible to do it with the modding api.

Any advice on that?


voddan
Fast Inserter
Fast Inserter
Posts: 124
Joined: Sat Jun 03, 2017 9:22 pm
Contact:

Re: Emulate user input / trigger an event

Post by voddan »

Oh, cool! That is almost exactly what I needed, thanks!

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Emulate user input / trigger an event

Post by Bilka »

Let me know if you want it updated to 0.16, my fork is the one where this would be happening.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

voddan
Fast Inserter
Fast Inserter
Posts: 124
Joined: Sat Jun 03, 2017 9:22 pm
Contact:

Re: Emulate user input / trigger an event

Post by voddan »

Bilka wrote:Let me know if you want it updated to 0.16, my fork is the one where this would be happening.
Yes, it would be great if it worked with the latest version of factorion!

What version is it working now thou? I don't see it mentioned

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Emulate user input / trigger an event

Post by Bilka »

voddan wrote:What version is it working now thou? I don't see it mentioned
I think we last used it in 0.15.35, but it should also work with 0.15.40.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Emulate user input / trigger an event

Post by Bilka »

A working 0.16 version can be found here: https://github.com/Bilka2/factorio-tas- ... /tree/0.16
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Modding help”