I'm looking for a way to make my ARGB fans flash red when the on_entity_destroyed() event fires.
My ARGB software can link to a batch file, but factorio lua mods cannot execute batch files for mod safety reasons.
I'm wondering if anyone has suggestions for how I might get the ARGB software (Cooler Master's Master+) to talk to Factorio and know when on_entity_destroyed() is occurring.
Control ARGB fans on biter attack
-
- Burner Inserter
- Posts: 10
- Joined: Fri Sep 22, 2023 10:01 pm
- Contact:
-
- Burner Inserter
- Posts: 10
- Joined: Fri Sep 22, 2023 10:01 pm
- Contact:
Re: Control ARGB fans on biter attack
So I'm now thinking I can write a Python script to look for the red warning icon and trigger a batch file from that to control the ARGB. I'll post progress if I make it work.
Re: Control ARGB fans on biter attack
Probably easier to use a mod in the game to log when the alert warning occurs, and have something monitor the factorio log for new lines and trigger the batch file if it sees that line appear. Does require a mod in-game though.
Re: Control ARGB fans on biter attack
Mods writing to the log file and then a process outside the game reading the log file is a common approach for something like this.
-
- Burner Inserter
- Posts: 10
- Joined: Fri Sep 22, 2023 10:01 pm
- Contact:
Re: Control ARGB fans on biter attack
Thank you for the suggestions, I'll try both approaches and see what works best. I like the idea of not needing to mod the game so I can still get steam achievements and have it work on online servers, but I see that writing to a log file would be a much more reliable way of achieving this result.
-
- Burner Inserter
- Posts: 10
- Joined: Fri Sep 22, 2023 10:01 pm
- Contact:
Re: Control ARGB fans on biter attack
For anyone browsing the internet looking for something like this, I'll post a github link to a python library where I've hacked together something that works using pyautogui to monitor the Factorio UI and click on a program in the background (the argb controller) to make changes. I hope it is of use to someone.
https://github.com/borgiedude/FactorioA ... Controller
https://github.com/borgiedude/FactorioA ... Controller