Setting the initial scene...

Place to get help with not working mods / modding interface.
Post Reply
kdmorse
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Dec 28, 2023 7:48 am
Contact:

Setting the initial scene...

Post by kdmorse »

I've seen other mods do this. i know it can be done. I just haven't the foggiest idea what the right way to accomplish this is. A pointer to a simple example, or a general description of what I should manipulate in which stage would be appreciated.

In vanilla, the player is presented with a crashed space ship, and some recoverable items.

I wish to add to this, to make it appear as if the space ship crashed into someone's solar field (complete with accumulators, this is important). I also probably want a few gun turrets, preloaded with uranium ammo, each with it's own requester chest requesting more ammo. (None will ever arrive, as you crashed into the logistics area and destroyed the roboports - so what you find is what you got. Much of this is expected to be damaged/destroyed, but the player should be able to:

1. Either use in place, or collect and redeploy a number of accumulators and solar panels first thing. (Some free solar electricity, and free surge buffering.) - The player is expected to begin to grasp some of the electrical oddities of this mod.
2. Notice the unusual turrets fully loaded are quickly the only thing keeping the base alive. And dedicate some time to keeping them loaded, and then build more.
3. Be able to leverage the solar/accumulators provided to even further shorten the burner phase to near nothing.

But, I know how to do none of this, even centering on Vanilla. For other mods, that have their own setup (ie, IR3, maybe K2), I'm really at a loss as to how to do it in a mod agnostic, safe way.

Thoughts?

Bilka
Factorio Staff
Factorio Staff
Posts: 3155
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Setting the initial scene...

Post by Bilka »

For the unmodded game, you'll want to look at the freeplay remote interface for setting starting items, see \data\base\scenarios\freeplay\freeplay.lua, which would be runtime stage. The remote interface provides methods to set which entities ("ship parts") should be spawned.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

Post Reply

Return to “Modding help”