Space Mining

This is the place to request new mods or give ideas about what could be done.
Post Reply
Mezmerro
Inserter
Inserter
Posts: 23
Joined: Tue Jul 19, 2016 4:42 pm
Contact:

Space Mining

Post by Mezmerro »

0.15 added ability to send things to space and recieave something back, yet it seems noone used this functionality so far.
Can someone who actually knows how modding works make a simple mod that uses this functionality?
I want to play with helum-3 mining satelites, but as I know close to nothing about Factorio programming language and learn it by reading other people code I have nowhere to look for in this case.

pieppiep
Fast Inserter
Fast Inserter
Posts: 170
Joined: Mon Mar 14, 2016 8:52 am
Contact:

Re: Space Mining

Post by pieppiep »

In data.lua place this,

Code: Select all

table.insert(data.raw["rocket-silo-rocket"]["rocket-silo-rocket"].result_items, {"atomic-bomb", 10, "iron-ore"})
table.insert(data.raw["rocket-silo-rocket"]["rocket-silo-rocket"].result_items, {"satellite", 10, "copper-ore"})
If you send 1 iron ore in a rocket you'll get 10 atomic bombs.
If you send 1 copper ore in a rocket you'll get 1 satellite because that's the max stacksize.
If you send 1 satellite you still get the 1000 space science packs since this code doesn't change it, only adds things.
If you want to change what a satellite gives you need to loop through the result_items array to find the array where the satellite result is defined.

Post Reply

Return to “Ideas and Requests For Mods”