Panglia Planet BETA5

by snouz

[BETA5] Panglia is a planet that follows Moshine in the quest for even more intelligence. It's a strange alien planet that contains Branbalite, a phosphorescent plant, and panglite, a strange metal. Some zones are experiencing much faster time, which will allow you to experiment with cloning, then keep clones in simulations and upload them. You'll need to fill the huge electric needs with dangerous roots that expand and attack your base.

Content
28 days ago
2.0
2.39K
Factorio: Space Age Icon Space Age Mod
Planets Enemies Mining Fluids Logistic network Manufacturing Power

b Problem with Express belts

30 days ago

Hey, so I found this issue that breaks the blueprint upgrade planners for express belts/undergrounds/splitters.
Basically, when editing a blueprint and you try to upgrade/downgrade from express belts, they get stuck not able to be changed.

Steps to reproduce:
1. Create a blueprint consisting of express belts/undergrounds/splitters.
2. Open the blueprint editor. Use the default upgrade planner to upgrade it to a turbo belt or downgrade to fast belt.
4. Now Upgrade/downgrade the belts back to express belts. You'll notice the belt speed changed to much faster visually, but the planner still shows them as being express belts. If you try to place this blueprint down as a ghost, it'll actually place an identical looking copy of an express belt but the entity is from Panglia rather than base game.
5. If you instead try to upgrade/downgrade the blueprint again it will fail and stay as an express belt (except the underground for some reason.) The blueprint is now broken and cannot be modified properly.

27 days ago

I followed your instructions and everything is working. When setting up the Upgrade Planner, keep in mind there are two belt tabs, one for the base belts and another for Panglia. It looks like you might be picking the faster Panglia belts by mistake: https://imgur.com/a/GEmxVNN

27 days ago

I'm talking about using the default upgrade planner, where you don't set any specific upgrade paths. What I found out is that when upgrading from fast or downgrading from turbo, it instead replaces the belts with the Panglia specific express belt variant, which then bricks the upgrade planner from changing it again since it's a different entity with a different belt speed. This shouldn't be the case and it should only upgrade/downgrade to the vanilla belt, not the Panglia variant by default.

27 days ago

Here's some examples of the issues happening.
https://drive.google.com/file/d/115_ult1WLS8ej1s51bSh8QrtjwxMs7vO/view?usp=sharing
In this clip you can see how downgrading from express -> fast causes it to replace the fast belt with the Panglia variant, causing it to now be unable to be normally upgraded again.

https://drive.google.com/file/d/1z0RSfCJeh4qDpuIFAlSr6Ue-35z2BbyT/view?usp=sharing
Here there is some weirdness going on in editor mode, where downgrading to the fast belt spits out the original belts on the floor rather than being swapped inplace, which only happens when a belt is being upgraded/downgraded to a Panglia variant instead of the original.

27 days ago
(updated 27 days ago)

Hmm, its working for me :D

https://drive.google.com/file/d/1WPgSUI1E78wCPDAxZO_RIG42XNd-52wI/view?usp=drive_link

Upgraded from basic to turbo, and downgraded from turbo to basic. Default planner. Maybe another mod interferes with belt upgrades.

27 days ago

Try it on ghosts only, or in a blueprint, that seems to be where it goes wrong. The reason I noticed it to begin with was when I was mass upgrading my belt balancer book, some of them got stuck not able to be upgraded. When the belt is upgraded as a nonghost it's immediately replaced by the correct version, and thus it would function correctly there.

27 days ago

You're right, it's strange that it only works when you downgrade from turbo - I rushed the testing.

27 days ago
(updated 27 days ago)

I believe the issue lies in the code below, as the mod uses deepcopy without changing the next_upgrade attribute, which may cause the game to see two transport belts that share the same upgrade.

for i, belt in pairs(data.raw["transport-belt"]) do
if not string.find(belt.name, "_panglia_fast_version") then
local newbelt = table.deepcopy(belt)
newbelt.name = belt.name .. "_panglia_fast_version"
--newbelt.original_name = belt.name
newbelt.localised_name = {"entity-name." .. belt.name}
newbelt.localised_description = {"entity-name." .. belt.name}
newbelt.speed = belt.speed * beacon_multiplier
newbelt.hidden = true
newbelt.subgroup = "panglia-sped-up-entities"
if belt.minable and belt.minable.result then
newbelt.placeable_by = {item = belt.minable.result, count = 1}
end
data:extend({newbelt})
end
end

I’ll make a quick patch in a separate mod and see if that’s the right diagnosis.

27 days ago
(updated 27 days ago)

Its working now :)

https://drive.google.com/file/d/1tUEUUJUNpFkUIM9MVE1kROQZElBM_YUS/view?usp=drive_link

The issue also affects inserters.

@Snouz Could you update both loops in data-final-fixes that generate the faster copies of inserters, splitters and belts? The next_upgrade field needs to point to the fast variant. Setting it to nil works as a quick test, but ideally use a real target, e.g.:

newbelt.next_upgrade = belt.next_upgrade .. “_panglia_fast_version”.

You probably also need to check if “next_upgrade” is not nil - the case of turbo belts.

27 days ago

Nice, thanks for helping figure it out :)

27 days ago
(updated 27 days ago)

UltraJohn You can use this file until the mod gets updated. Just replace the file in the zip archive ( panglia_planet_0.5.5.zip ):

https://drive.google.com/file/d/1EJi9D0rxITAPZrrYRruQPrqwEhd77zu2/view?usp=drive_link

Fixed belts, inserters and splitters.

@Snouz, you can use it as a ready-made solution. :D

New response