Space Platform Groups

by rycieos

Adds space platform group functionality like train groups.

Utilities
3 months ago
2.0
295
Factorio: Space Age Icon Space Age Mod
Logistics

b Group Change Error

2 days ago

Heyo, so I just tried to change the group of a platform and got this result:

Error while running event space_platform_groups::on_gui_click (ID 1)
space_platform_groups/scripts/schedule.lua:125: attempt to index local 'from_platform' (a nil value)
stack traceback:
space_platform_groups/scripts/schedule.lua:125: in function 'sync_schedules'
space_platform_groups/scripts/platform_data.lua:249: in function 'sync_schedule_to'
space_platform_groups/scripts/platform_data.lua:146: in function 'add_platform_to_group'
space_platform_groups/scripts/change_group_gui.lua:93: in function 'on_confirm_gui'
space_platform_groups/scripts/change_group_gui.lua:107: in function 'handler'
space_platform_groups/scripts/gui_lib.lua:136: in function <space_platform_groups/scripts/gui_lib.lua:126>

I tried 3 times now and yeah, apparently not just a fluke.

2 days ago

Could you upload the save file? Or at least the log file?

2 days ago

Actually, I think I might know what is happening. It seems like the group you are adding a platform to is empty (which shouldn't be possible). Could you verify if that is the case?

2 days ago

Then again, the code seems to be able to handle that. So I am not sure exactly what is going on. The save file would still be the most helpful.

a day ago
(updated a day ago)

It seems the group I tried to change into is a phantom. I had a major platform fleet downsizing in my eternal war against the UPS and one of the groups remained after all the assigned platforms have been deleted (I love to do the impossible).
So it should be fine when I figure out how to just delete that group.

But I can also share any log or savefile if you can explain me what log exactly, and/or on wich platform to share.
Also I'd rather just share my log, u'd bee majorly flooded by mods if u try to use my save :')

a day ago

Run this command in your save, which will dump some info to the log file:

/c __space_platform_groups__ log(serpent.block(storage))

It will disable achievements, so reload a save after. Also make sure to do it in the before state where if you changed the platform's group it would crash.

Here is a page to help find the log file: https://wiki.factorio.com/Log_file

a day ago

I am unable to make the game generate anything with the given command.
Assuming you are talking about the ''factorio-current.log''.

a day ago

Nvm, I guess I just needed to close the whole app.

That should be the section u want:

324.854 Info AppManagerStates.cpp:2111: Saving finished
460.192 Script log(serpent.block(storage)):1: {
force_data = {
{
groups = {
["Calcite Farmer "] = {
force = 1,
name = "Calcite Farmer ",
platform_count = 2,
platforms = {
[10] = {
group = "SERPENT PLACEHOLDER",
platform_index = 10,
ticks_in_station = 0
},
[11] = {
group = "SERPENT PLACEHOLDER",
platform_index = 11,
ticks_in_station = 0
}
},
space_location_queues = {}
},
["[item=calcite]Farmer"] = {
force = 1,
name = "[item=calcite]Farmer",
platform_count = 1,
platforms = {
[23] = {
group = "SERPENT PLACEHOLDER",
location = "nauvis",
location_queue_index = 1,
location_queue_size = 1,
platform_index = 23,
ticks_in_station = 0
}
},
space_location_queues = {}
},
["[quality=epic]Farmer"] = {
force = 1,
name = "[quality=epic]Farmer",
platform_count = 3,
platforms = {
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
{
group = "SERPENT PLACEHOLDER",
location = "nauvis",
location_queue_index = 1,
location_queue_size = 3,
platform_index = 16,
ticks_in_station = 6704438
},
{
group = "SERPENT PLACEHOLDER",
location = "nauvis",
location_queue_index = 2,
location_queue_size = 3,
platform_index = 17,
ticks_in_station = 6704114
},
{
group = "SERPENT PLACEHOLDER",
location = "nauvis",
location_queue_index = 3,
location_queue_size = 3,
platform_index = 18,
ticks_in_station = 6625788
}
},
space_location_queues = {}
}
},
platforms = {
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
"SERPENT PLACEHOLDER",
"SERPENT PLACEHOLDER",
nil,
nil,
nil,
nil,
"SERPENT PLACEHOLDER",
"SERPENT PLACEHOLDER",
"SERPENT PLACEHOLDER",
[23] = "SERPENT PLACEHOLDER"
}
}
},
player_data = {
{
change_group_guis = {},
hub_guis = {},
platform_index = 23
}
}
}
622.425 Script log(serpent.block(storage)):1: {
force_data = {
{
groups = {
["Calcite Farmer "] = {
force = 1,
name = "Calcite Farmer ",
platform_count = 2,
platforms = {
[10] = {
group = "SERPENT PLACEHOLDER",
platform_index = 10,
ticks_in_station = 0
},
[11] = {
group = "SERPENT PLACEHOLDER",
platform_index = 11,
ticks_in_station = 0
}
},
space_location_queues = {}
},
["[item=calcite]Farmer"] = {
force = 1,
name = "[item=calcite]Farmer",
platform_count = 1,
platforms = {
[23] = {
group = "SERPENT PLACEHOLDER",
location = "nauvis",
location_queue_index = 1,
location_queue_size = 1,
platform_index = 23,
ticks_in_station = 0
}
},
space_location_queues = {}
},
["[quality=epic]Farmer"] = {
force = 1,
name = "[quality=epic]Farmer",
platform_count = 3,
platforms = {
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
{
group = "SERPENT PLACEHOLDER",
location = "nauvis",
location_queue_index = 1,
location_queue_size = 3,
platform_index = 16,
ticks_in_station = 6704438
},
{
group = "SERPENT PLACEHOLDER",
location = "nauvis",
location_queue_index = 2,
location_queue_size = 3,
platform_index = 17,
ticks_in_station = 6704114
},
{
group = "SERPENT PLACEHOLDER",
location = "nauvis",
location_queue_index = 3,
location_queue_size = 3,
platform_index = 18,
ticks_in_station = 6625788
}
},
space_location_queues = {}
}
},
platforms = {
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
nil,
"SERPENT PLACEHOLDER",
"SERPENT PLACEHOLDER",
nil,
nil,
nil,
nil,
"SERPENT PLACEHOLDER",
"SERPENT PLACEHOLDER",
"SERPENT PLACEHOLDER",
[23] = "SERPENT PLACEHOLDER"
}
}
},
player_data = {
{
change_group_guis = {},
hub_guis = {},
platform_index = 23
}
}
}
631.450 Info AppManager.cpp:352: Deleting active scenario.
953.625 Quitting: user-quit.
955.038 Goodbye

a day ago

Yes. You can try

/c __space_platform_groups__ game.player.print(serpent.block(storage))

instead, which should print the data to the screen. If you see something, then the previous command should be putting something into the log file.

a day ago

That looks quite normal. Which group were you trying to add to that caused the crash?

a day ago

I wanted to add a ship to the "Calcite Farmer " group.
And now made a new group that is "[item=calcite]Farmer" instead.

New response