Make a folder called SolarPanelOutput_0.0.1 and add a file data.lua with the following contents:
Code: Select all
data.raw["solar-panel"]["solar-panel"]["production"] = "30kW"
That's it. That is the complete code needed to halve the production. You then only have to add a second file info.json that contains information about the mod (author, requirements, ...). See any other mod or the attached one for details. Then zip it up, this isn't required but makes the mod easier to distribute and faster to load.
EDIT: In case you are wondering how I got to that line of code and want to know more:
You use
https://wiki.factorio.com/index.php?title=Data.raw to look up the type and name of your entity.
Then you open the file data\base\prototypes\entity\entities.lua in your Factorio folder (possibly in some nearby file for some entities, use a file search if unsure), where you see in line 1822 for the solar-panel
production = "60kW", where "production" is the property you want to change.
Now you assemble the found information in the form
Code: Select all
data.raw["type"]["name"]["property"] = value
and you've written a mod that changes the property of an entity.