Power Satellites

by LCStark

Adds power satellites, which can be launched with the rocket silo to generate power and beam it down to receiver stations.

Content
a month ago
1.1 - 2.0
3.17K
Power

b [Solved?] Crash out error

2 months ago

The mod Power Satellites (0.2.4) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event PowerSats::on_nth_tick(60)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
[C]: in function 'index'
__PowerSats
/powersats.lua:301: in function 'UpdateCombinators'
PowerSats/powersats.lua:115: in function 'IterateSurface'
PowerSats/powersats.lua:99: in function 'IterateForce'
PowerSats/powersats.lua:93: in function 'UpdateTick'
PowerSats/control.lua:122: in function <PowerSats/control.lua:120>

Not sure what happened. Walked away from computer, come back and I had this error message pop up. I'm assuming it's to do with the decay of the power sats I had over a planet I wasn't currently on.

2 months ago
(updated 2 months ago)

Thanks for letting me know! Looks like there might be something fishy going on with powersat combinators. I'll take a closer look at it tomorrow and see what I can find. What other mods are you using in your game? If I can't find anything suspicious I'll try to look around if it might be some mod interaction problem that needs to be handled.

Edit
Oh, also, what version of the game are you running?

2 months ago

Latest stable version of the game, 2.0.39

a month ago

I can't seem to replicate this issue, whether with just this mod or the whole pack. Could you upload your save to Google Drive or Dropbox and send me the link? I'd like to see if I can find what could have made a combinator invalid in your game that I couldn't replicate myself, plus it will be helpful to test if my fix works. ;)

a month ago

I think you might have sent me the wrong save, this one is an old save from Factorio 1.1.33, without Space Age and doesn't use my mod:

https://i.imgur.com/VGOD218.png

a month ago
(updated a month ago)

Alright, I was able to reproduce it with just PowerSats and Creative Mod. It looks like creative mode isn't firing right events for entity creation / destruction. If you build a combinator normally, it gets added to the data, and if you then remove it with creative mode on, it doesn't get cleared from the data and leaves an invalid entity.

I'll have to look into how to handle creative mode, if it's going to be possible (and feasible) at all. For now, I've added some guards in my events to clear invalid entities from the data. That should fix your error.

Just be aware that any combinator and ground station you add with creative mode will probably not work. If you're looking for a way of testing it without assembling the machines yourself, the best way for now will probably be spawning them using an infinity chest and then placing them manually / with robots. If I figure a good way of handling creative mode entities, I'll post here to let you know about the new update. Thanks for reporting the issue!

a month ago

I just pulled it up. I sent test world rather then testing world. That's on me.

a month ago

I just pulled it up. I sent test world rather then testing world. That's on me.

https://www.dropbox.com/scl/fi/d8qgorqi1iipf6muefawp/Testing-World.zip?rlkey=lyyggkfz5aj4mskfu8wucdiis&st=juwbqe5i&dl=0

a month ago

Alright, tested the new version on your save and it looks like there are no errors anymore. Placing a new combinator clears the invalid entity, and the same should happen next time a satellite deorbits. As long as you'll take care not to place them in creative mode they should all work fine. ;)

a month ago

Also, undo in creative mode will make the entities invalid, but they will also run without errors and will get cleared next time a satellite deorbits or a new combinator is built. Redoing / rebuilding them looks to work fine. I'll keep on looking for how to properly handle creative mode, but for now that should do.

New response