Can Rocket silo product items?

Place to get help with not working mods / modding interface.
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Can Rocket silo product items?

Post by Hannu »

I would like to try some kind of space research. I thought to make a special research satellite which is loaded with the science bottles and launched with the rocket instead of the stock satellite. But I do not know how I could get results back. Is it possible to mod the rocket silo to produce a special item (for example a yellow science bottle) depending on what satellite was on rocket?
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Can Rocket silo product items?

Post by aubergine18 »

Do you specifically want to bring stuff back, or simply limit certain research to off-planet labs?

If you want off-planet labs, you could create a surface and maybe custom lab buildings http://lua-api.factorio.com/latest/LuaSurface.html
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Can Rocket silo product items?

Post by Hannu »

I did not intend whole new world. That would be far too hard project. I am quite noob in modding, mostly copied and changed parts from other mods. I thought effective weapons for late game biter base clearing but I want that they are very expensive to get. Using of the rockets would give variety into game instead of just insane number of normal science bottles or new species with huge cost but practically the same logistics.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Can Rocket silo product items?

Post by aubergine18 »

The Beyond mod does something similar to what you are requesting - only they have a mining rocket. Send it up with a mining drill and a landing pad will get 400 resources. You could maybe take a look at the code or chat with the author via forum thread.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Can Rocket silo product items?

Post by Hannu »

Thanks for the tip. I have to take a look.

This far I have succeeded to use on_rocket_launched -event. I can read the payload of the rocket. I made also a satellite communication station. I will try to put a data item to comm station when script detects that the rocket has been launched with research satellite. The data item and other expensive stuff is then used to make microgravity science bottles.

I noticed one problem. If I launch the rocket with the custom satellite it gives the error message "Rocket launched without satellite". How can I tell to game that my own satellite is satellite?
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Can Rocket silo product items?

Post by aubergine18 »

Lots of people have run in to that problem - it's hard coded in the scenario script and there's no way to turn it off without changing base game files :/

Code: Select all

else
    if (#game.players <= 1) then
      game.show_message_dialog{text = {"gui-rocket-silo.rocket-launched-without-satellite"}}
    else
      for index, player in pairs(force.players) do
        player.print({"gui-rocket-silo.rocket-launched-without-satellite"})
      end
    end
  end
Now... If they altered that to first check whether `global.satellite_sent` is defined and only show the warning if it's not, then at least the message won't keep popping up so long as player has sent at least one satellite.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Can Rocket silo product items?

Post by Hannu »

OK. Then I have to live with it. Thanks again for informing me about that mod. I learned couple of useful things from it. I have tried to look some larger mods but they are so messy that it is difficult to find what I want.

Now I have basic functionality. I have a microgravity research -technology after the rocket silo. It gives the research sat and the satellite communication station. If I launch the rocket with the research satellite it gives a memory card in the communication station (which is practically a chest with large ugly graphics). I can use the card to produce new yellow science and unlock some weapons that even the behemoth biters will learn to fear (or they can laugh when I kill myself with my new superweapons).
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Can Rocket silo product items?

Post by Hannu »

Is there any interest if I make this mod public? It changes the mid game to introducing aluminium. Aluminium ore is more rare than iron and it is not needed such massive amounts. Aluminium is refined in electrolysers and plates is used in all flying things, light structures and some armor equipment. Bots and defenders are more expensive than in vanilla. There are also some recipe changes but their influence is relatively small. For example the rails need wood and are more expensive, but I think that normal rail building produces still more wood than consumes.

Then there is satellite research in space which gives technologies for heavy rocket launcher (like stock but have larger range) and heavy rockets and nerve agent capsules which are like poison but much more effective. These late game weapons are intended to make area clearing easier in the phase when player begin to scale rocket production up.

The most important motivation is to give more challenge suitable in my playstyle. I like to handle large masses of materials. Probably this is not suitable for those who want to concentrate in warfare or surviving with limited resources. And those who wants exact ratios may have problems, I have intentionally made production and consumption rates such that simple ratios between assemblers are not perfect.

Reason why I ask and just not publish is that I have taken some graphics from other mods. It is no problem in my personal use but of course I can not use them in published work. I do not like making of graphics. It takes much more time than scripting even models are simple boxes, and I do not want to make them if nobody is interesting. Do not expect any eye candy.
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Can Rocket silo product items?

Post by Deadly-Bagel »

Hannu wrote:mostly copied and changed parts from other mods.
Before you even consider making this public you need to check ALL the mods you copied from for their licensing. For example anything copied from Bob's Mods would be a breach of licence.

There's not necessarily any harm in checking how other modders have achieved something, but you need to rewrite it for your own requirements rather than copy it directly.
Money might be the root of all evil, but ignorance is the heart.
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Can Rocket silo product items?

Post by Hannu »

Do not worry. I did not mean exact copying but learning how things are done in lua and making same things. Trivial things, like how to make a function to change something in the recipe, can not be licenced things. I am also going to do my own graphics (if I decide to publish it), except modified stock graphics because it seems that owners practically allow it.
Daid
Fast Inserter
Fast Inserter
Posts: 217
Joined: Sun Jul 03, 2016 7:42 am
Contact:

Re: Can Rocket silo product items?

Post by Daid »

aubergine18 wrote:Lots of people have run in to that problem - it's hard coded in the scenario script and there's no way to turn it off without changing base game files :/
My mod space-platform: https://mods.factorio.com/mods/daid/space-platform
Contains a workaround for the message. If it detects a rocket launch indented for my mod, it stores the used cargo and replaces it with a satellite. A bit hacky, but it works.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: Can Rocket silo product items?

Post by Nexela »

Daid wrote: My mod space-platform: https://mods.factorio.com/mods/daid/space-platform
Contains a workaround for the message. If it detects a rocket launch indented for my mod, it stores the used cargo and replaces it with a satellite. A bit hacky, but it works.
Brilliant way to suppress the message but my guess is it also increases the satellite count :(
Daid
Fast Inserter
Fast Inserter
Posts: 217
Joined: Sun Jul 03, 2016 7:42 am
Contact:

Re: Can Rocket silo product items?

Post by Daid »

Nexela wrote:
Daid wrote: My mod space-platform: https://mods.factorio.com/mods/daid/space-platform
Contains a workaround for the message. If it detects a rocket launch indented for my mod, it stores the used cargo and replaces it with a satellite. A bit hacky, but it works.
Brilliant way to suppress the message but my guess is it also increases the satellite count :(
Oh, yes, but my mod also hides the satellite count :lol:
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Can Rocket silo product items?

Post by Hannu »

Thanks. I have to check it tomorrow. I tried to replace my own satellite with a stock satellite in launch event too, but it seems that I made some error.
Post Reply

Return to “Modding help”