Rockets Launch Stacks


Makes it so that rockets can always launch at least a full stack of any item. Can also modify rocket launch cost.

Tweaks
10 months ago
2.0
463
Logistics Cheats

b Not working as intended?

9 months ago

Hello, I dont know if the updates broke this, but for most of the items it actually decreases the max amount the rocket can carry. Looks like everything with tag "item" is borked.

9 months ago
(updated 9 months ago)

Seconding this. Plastic seems fine, but iron, copper and steel plates are broken for example

Edit: Seems to happen because the elseif is somehow triggered?
Which shouldn't actually be the case, since iron-plate should have a non-null value.

if item.weight ~= nil then
if item.weight > 1000/item.stack_size/weightmultiplier * kg then
item.weight = 1000/item.stack_size/weightmultiplier * kg
end
elseif item.stack_size ~= nil then
item.weight = 1000/item.stack_size/weightmultiplier * kg
end

Commenting it out fixes the issue, not sure what it was supposed to be there for in the first place, since accessing an item's stacksize happens in the first clause anyway.

8 months ago

Seconding this. Plastic seems fine, but iron, copper and steel plates are broken for example

Edit: Seems to happen because the elseif is somehow triggered?
Which shouldn't actually be the case, since iron-plate should have a non-null value.

if item.weight ~= nil then
if item.weight > 1000/item.stack_size/weightmultiplier * kg then
item.weight = 1000/item.stack_size/weightmultiplier * kg
end
elseif item.stack_size ~= nil then
item.weight = 1000/item.stack_size/weightmultiplier * kg
end

Commenting it out fixes the issue, not sure what it was supposed to be there for in the first place, since accessing an item's stacksize happens in the first clause anyway.

Thank you for this, I checked the code, but totally missed that. The mod behaves like expected after commenting it out.

8 months ago

While deleting that bit does fix the intermediates, it also breaks landfill and stone brick.

8 months ago

Quick note, only delete:

elseif item.stack_size ~= nil then
item.weight = 1000/item.stack_size/weightmultiplier * kg

Deleting the other bit not only doesn't help but also breaks the mod for every other tile as well like the concretes and the various ones from dectorio.

8 months ago

Sorry if I wasn't clear, I only said the elseif is the broken part, I just copied the whole block for it to be readable

8 months ago

Yeah, I sorta figured that out along the way, but I figured I'd leave a comment about my findings in case anyone else was trying to fix this. I was mostly experimenting around with it to see if I could fix the landfill/stonebrick issue (That i've also discovered affects a bunch of the random decoratives from dectorio). What's weird is that, without deleting the 'elseif' bit, the landfill/stonebrick/decoratives all function normally, with the rocket launch capacity set to their stack size. Personally, I'm going to leave the 'elseif' bit deleted as the high intermediate launch capacities is more important than the decoratives I don't use (still a shame about the landfill though); but I figured I should at least leave my finding here in case anyone else finds them useful.

7 months ago

Yeah, I don't exactly understand what is doing it, but its not just landfill affected, but the artificial soils and some other items like centrifuge, display, some combinators. It just makes the rocket capacity all over the place after deleting/commenting out the elseif. For now I am playing without the mod, since it appears that every update breaks more items.. I tried the rocket capacity mod as alternative, and while it works it makes sending some lighter items incredibly OP, which is not what I wanted. Just need to be able to send at least a stack, or vanilla amount if its bigger than stack

7 months ago

Nvm, I have figured it out.

The elseif part is there for items that by default do NOT have weight assigned (stack inserter, landfill, most of tiles, centrifuge, some materials besides others). Problem is, the elseif changes items without assigned weight to have weight so that exactly one stack is 1000kg. But this unfortunately makes it that rocket can carry less items in than in vanilla.

Example: Electronic circuit has no weight assigned. elseif in the mod looks at the stack size (200) and uses it for the weight calculation - 1000/200/1 * kg = 5kg, so your rocket can then carry exactly 200 of them.

I do not know how to tell the mod, that if the default rocket carry value is higher than stack, to ignore the mod calculation alltogether. I wonder if there is some internal value preprogrammed for certain items without weight (like the electronic circuit for example) that we could use to compare the elseif value to. Otherwise only way how to solve this that I see is to manually add weight to all items that currently do not have weight assigned.

New response