updated burner production cannot satisfy the electric need until game restart

Place to get help with not working mods / modding interface.
Post Reply
rhynex
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Tue Apr 17, 2018 9:55 am
Contact:

updated burner production cannot satisfy the electric need until game restart

Post by rhynex »

hello,

I am trying to make a mod about a new burner generator (takes fuel and generates power). it supports some tech which upgrades stuff.

my problem is about the capacity when I replace the entity in code. in mod code I have multiple entities of furnaces, representing each versions. first furnace has 12MW power and second has 18MW and so on. when first upgrade happens I replace the existing entity with code using create entity and put it over the existing one. it works perfectly, no problem.

my problem is about power production. as I said first furnace can produce 12MW and second (upgraded) one can produce 18MW
when I complete research I can see entity is changed but the power production is stalled at former value, in my example 12MW.

interestingly restarting game or reloading the map after saving works perfectly.

what could be wrong? what do I miss?

thanks

mod is not in portal yet but here: https://github.com/gungorenu/factorio-frostpunk-theme
edit: I updated the repo with a temporary fix but I would like to know a better solution if there is any. commit f9e8c13 should repro below issue

repro steps:
- create empty map
- put a basic first level furnace, put fuel into it
- create some 12MW input, any mod is fine, use Editor Extensions for example
- then make a research, to upgrade its power.
- when research ends the entity is changed, and it becomes 18MW capable. everything works until now
- now increase the input to 18MW. furnace shall not be able to produce it even though it is supposed to.
- save game and load map again. now it shall be able to satisfy the need

also using editor mod and replacing the entity has same problem.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: updated burner production cannot satisfy the electric need until game restart

Post by Rseding91 »

The repo is private or the link is wrong.

This sounds like a base game bug so if you can show me how to reproduce it I can see if it is and try to fix it.
If you want to get ahold of me I'm almost always on Discord.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: updated burner production cannot satisfy the electric need until game restart

Post by Rseding91 »

Actually I was able to identify the issue and it's fixed for the next 1.1 release.
If you want to get ahold of me I'm almost always on Discord.

rhynex
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Tue Apr 17, 2018 9:55 am
Contact:

Re: updated burner production cannot satisfy the electric need until game restart

Post by rhynex »

hello Rseding91,

I changed visibility of the repo again. you can have a look if you still need to. you can check commit with f9e8c13 for repro. in first post I put a repro steps. sorry, my mod is still a mess and it is hard to make it work.
thanks for the fix.

Post Reply

Return to “Modding help”