[MOD 0.12.11+] Auto Launch - Rocket launching mod

Topics and discussion about specific mods
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5290
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

[MOD 0.12.11+] Auto Launch - Rocket launching mod

Post by Klonan »

Type: Mod
Name: Auto Launch
Description: Launched your rockets
License:CC something i guess
Version: 0.1.0
Release:2015/12/14
Tested-With-Factorio-Version: 0.12.20
Category: Automation
Tags: Rockets
Latest Release:
Auto_Launch_0.1.0.zip
--Initial release
(1.27 KiB) Downloaded 717 times
On request
Easy peasy simple mod
Launches your rockets if they are ready (have satellite)
Not super tested
No gui toggle or anything, if you dont want rockets to automatically launch down enable the mod lol

If you got a huge map, the migration script might take a long time to run (maybe a minute?) so be patient. This will make sure it will work for any silos you have already placed down
Will notify when a rocket is launched
Let me know if you have any issues, bug etc.
slindenau
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Fri Mar 25, 2016 1:46 pm
Contact:

Re: [MOD 0.12.11+] Auto Launch - Rocket launching mod

Post by slindenau »

Mod works great!

The notification is a bit annoying when you're launching a LOT of rockets, can this be altered to notify every x (5, 10, 100) rockets launched?
Also i see the poll delay might become an issue with LOTs of silos, possibly having rockets ready before the next poll time. Can you make this a variable at the start of the script, so we can easily tweak it?
My mod: "Auto Deploy Destroyers" (follower robots) viewtopic.php?f=97&t=24545
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5290
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [MOD 0.12.11+] Auto Launch - Rocket launching mod

Post by Klonan »

slindenau wrote:Mod works great!

The notification is a bit annoying when you're launching a LOT of rockets, can this be altered to notify every x (5, 10, 100) rockets launched?
Also i see the poll delay might become an issue with LOTs of silos, possibly having rockets ready before the next poll time. Can you make this a variable at the start of the script, so we can easily tweak it?
Ok,

Would you like to test this for me?
Auto_Launch_0.1.1.zip
--Added config for check interval and notification interval
(1.42 KiB) Downloaded 174 times
User avatar
Thomasnotused
Filter Inserter
Filter Inserter
Posts: 262
Joined: Thu Jan 29, 2015 9:58 pm
Contact:

Re: [MOD 0.12.11+] Auto Launch - Rocket launching mod

Post by Thomasnotused »

Klonan wrote: Ok,

Would you like to test this for me?
Auto_Launch_0.1.1.zip
Hey, I went ahead and tested this (because why not, ya know) and after a little while, I got this error message:
0.1.0 worked fine, this only happened after updating.

Image
I have no idea what I'm doing.
slindenau
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Fri Mar 25, 2016 1:46 pm
Contact:

Re: [MOD 0.12.11+] Auto Launch - Rocket launching mod

Post by slindenau »

Looks like you forgot to initialize the global.satellite_sent variable.
Should be something similar to the init of global.silos?
My mod: "Auto Deploy Destroyers" (follower robots) viewtopic.php?f=97&t=24545
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5290
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [MOD 0.12.11+] Auto Launch - Rocket launching mod

Post by Klonan »

SuicidalKid wrote:
Klonan wrote: Ok,

Would you like to test this for me?
The attachment Auto_Launch_0.1.1.zip is no longer available
Hey, I went ahead and tested this (because why not, ya know) and after a little while, I got this error message:
0.1.0 worked fine, this only happened after updating.

Ok, i must have missed that, this version shouldn't error like this:
Auto_Launch_0.1.2.zip
added 3 whole lines
(1.43 KiB) Downloaded 176 times
slindenau
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Fri Mar 25, 2016 1:46 pm
Contact:

Re: [MOD 0.12.11+] Auto Launch - Rocket launching mod

Post by slindenau »

Prints 'First rocket has been launched' for every launch.

I tweaked around a bit, and adding this works (replaced force.name with a constant, because i believe it would otherwise count for each silo. could be wrong on this, no lua expert):
local force = silos.force
if global.satellite_sent["Rocket_Count"] == nil then
global.satellite_sent["Rocket_Count"] = 1
else
global.satellite_sent["Rocket_Count"] = global.satellite_sent["Rocket_Count"] + 1
end
...
if global.satellite_sent["Rocket_Count"] % notification_interval == 0 then
player.print(notification_interval.." rockets have been sent")
end
This does remove the log line of the first rocket being launched after starting, but i didn't mind that.

But maybe you can come up with a better way to fix it :).
My mod: "Auto Deploy Destroyers" (follower robots) viewtopic.php?f=97&t=24545
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5290
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [MOD 0.12.11+] Auto Launch - Rocket launching mod

Post by Klonan »

slindenau wrote:Prints 'First rocket has been launched' for every launch.

I tweaked around a bit, and adding this works (replaced force.name with a constant, because i believe it would otherwise count for each silo. could be wrong on this, no lua expert):
local force = silos.force
if global.satellite_sent["Rocket_Count"] == nil then
global.satellite_sent["Rocket_Count"] = 1
else
global.satellite_sent["Rocket_Count"] = global.satellite_sent["Rocket_Count"] + 1
end
...
if global.satellite_sent["Rocket_Count"] % notification_interval == 0 then
player.print(notification_interval.." rockets have been sent")
end
This does remove the log line of the first rocket being launched after starting, but i didn't mind that.

But maybe you can come up with a better way to fix it :).
Yep i see the issue now,
I thought the scenario global variable could be accessed by the mod global call whataver...

anyway this version should work no problemo:
Attachments
Auto_Launch_0.1.3.zip
--Fixed Global stuff
(1.44 KiB) Downloaded 279 times
slindenau
Long Handed Inserter
Long Handed Inserter
Posts: 73
Joined: Fri Mar 25, 2016 1:46 pm
Contact:

Re: [MOD 0.12.11+] Auto Launch - Rocket launching mod

Post by slindenau »

Tested with 8 silo's, watched 15 rockets launch. Seems to work like a charm now. Thanks a lot!
My mod: "Auto Deploy Destroyers" (follower robots) viewtopic.php?f=97&t=24545
bNarFProfCrazy
Fast Inserter
Fast Inserter
Posts: 194
Joined: Sat Apr 23, 2016 7:11 am
Contact:

Re: [MOD 0.12.11+] Auto Launch - Rocket launching mod

Post by bNarFProfCrazy »

Thanks for this helper mod. This really saves me some time, because I always forget to launch my rockets.

However I would like to ask you whether you can add support for this mod as well:
Orbital Ion Cannon

Maybe it is possible to support "any" rocket cargo.
Don't know much about factorio modding yet.
Anson
Fast Inserter
Fast Inserter
Posts: 249
Joined: Sun May 22, 2016 4:41 pm
Contact:

Re: [MOD 0.12.11+] Auto Launch - Rocket launching mod

Post by Anson »

Klonan (original top post) wrote:Version: 0.1.0
Release:2015/12/14
Tested-With-Factorio-Version: 0.12.20
Latest Release: Auto_Launch_0.1.0.zip
Is this still the official version, or can/should we use another of the test versions :
Klonan wrote:0.1.1 - Would you like to test this for me?
0.1.2 - this version shouldn't error like this
0.1.3 - anyway this version should work no problemo
probably 0.1.3 is "final" now ?
also for factorio 0.12.3x ?
but not usable for other payloads (yet) ?
Post Reply

Return to “Mods”