Very simple mod in concept. Whenever a Nuclear Missile Launcher or Anti-Nuke Launcher is built, automatically queue up the appropriate missile and set it to infinite build. Would be very helpful.
I was thinking about that before. I wonder if it is possible to intercept the nuke built notification and hold the unit in an array. Then the mod could do the auto factory thing and wait until nothing is selected to select all the recently built nukes/antinukes and set a queue. I don't have time for this myself, but I bet it can be done.
It sort of is, but that mod only builds something when eco is at a surplus. If you don't use the mod currently then you can use it to do what you want. Just: Install the mod Change the metal and energy thresholds to 1 Set every factory to build nothing, except for nukes and anti-nukes
Two installs of the mod then? Just change the folder names, id, and any variable names and it should work.
Maybe, but the way the mod works, I can see that ending in disaster. You could do that if we had an automation API, but two mods going around selecting things, giving orders, and deselecting at the same time will cause concurrency issues unless there is some sort of lock variable in the global namespace.
true. I guess you could just mod the mod to make it work but that would require a decent chunk of coding.
I think javascript is single threaded, so it would work fine as code from mods, the UI etc never run simultaneously (which makes sense). How about each factory type having its own metal and energy thresholds? That way you could set nukes and anti-nukes to build when eco>1%, and set the others to whatever you wanted independently. I'll look into it at the weekend.
Auto Factory has been updated with the above, and should now do what you want it to. It should be live on PAMM later today, I'm having 'fun' with github and need someone more knowledgeable to see it and hold my hand
Woohoo! Killer update. Does it start the missiles as soon as the launcher is built? Or is it tied into positive economy?
As normal for the mod it's tied to positive economy, and nothing can be selected when it checks (every second) to auto-build. When it's live, just set the nuke and anti-nuke thresholds to 1%. BTW when there's another substantial update, I might set the minimum the thresholds can be to 0% instead of 1%. It's not really a problem but it's starting to bug me.