AAI Loaders: Bob's Mods deprecated


Adds loaders with configurable recipes for Bob's Logistics belts to AAI Loaders.

Content
1 year, 1 month ago
1.1
3.32K
Logistics

b Error during startup with non default mod settings

1 year, 3 months ago
(updated 1 year, 3 months ago)

After updating the mod to 1.0 Factorio fails to load with the following error message:

Failed to load mods: __aai-loaders-bobs__/data-updates.lua:71: attempt to perform arithmetic on a boolean value
stack traceback:
__aai-loaders-bobs__/data-updates.lua:71: in main chunk

Steps to reproduce:
1. Start Factorio
2. Enable only the following mods:
Base mod
Bob's Functions Library mod
Bob's Logistics mod
AAI Loaders
3. Confirm and restart Factorio
4. Reset the mod settings to default
5. In the mod settings change Startup settings > AAI Loaders > Operation mode to Expensive (no fluid usage)
6. Confirm and restart
7. Enable AAI Loaders: Bob's Mods
8. Confirm and restart
9. Observe the mentioned error

This also happens if Startup settings > AAI Loaders > Add lubricant recipe is not on Auto.
While assuming default settings for AAI Loaders is reasonable I still suggest adding some kind of check to the mod or a disclaimer on the information page at the Mod Portal. Furthermore it currently prevents playing on expensive mode.

1 year, 3 months ago

Thanks for reporting this! I'll look into this when I get a chance.

1 year, 3 months ago
(updated 1 year, 3 months ago)

Looks like an easy fix. The issue is in the if check for what fluid to use as lubricant.

The relevant code:

if ((earlyLube and 1) + index) < 3 then
     fluidToUse = "water"
end

The fix is to simply refactor this out into:

local earlyLubeCheck = 0
if earlyLube then
    earlyLubeCheck = 1
end
if (earlyLubeCheck + index) < 3 then
    fluidToUse = "water"
end

Something about using and in that way seems to be the cause.

1 year, 2 months ago

just change line 71 to : if (earlyLube == true) and (index < 2) then

1 year, 1 month ago

Mm that was my bad. Needed an or condition to guarantee it didn’t try to do math with earlyLube.

1 year, 1 month ago
(updated 1 year, 1 month ago)

just change line 71 to : if (earlyLube == true) and (index < 2) then

By the way, this is incorrect. That line is supposed to make lube required for tier 2+ belts if earlyLube is true, and 3+ otherwise. It's fixed by adding 'or 0' after the 'and 1'.

1 year, 1 month ago
(updated 1 year, 1 month ago)

After updating the mod to 1.0 Factorio fails to load with the following error message:
Failed to load mods: __aai-loaders-bobs__/data-updates.lua:71: attempt to perform arithmetic on a boolean value stack traceback: __aai-loaders-bobs__/data-updates.lua:71: in main chunk
Steps to reproduce:
1. Start Factorio
2. Enable only the following mods:
Base mod
Bob's Functions Library mod
Bob's Logistics mod
AAI Loaders
3. Confirm and restart Factorio
4. Reset the mod settings to default
5. In the mod settings change Startup settings > AAI Loaders > Operation mode to Expensive (no fluid usage)
6. Confirm and restart
7. Enable AAI Loaders: Bob's Mods
8. Confirm and restart
9. Observe the mentioned error

This also happens if Startup settings > AAI Loaders > Add lubricant recipe is not on Auto.
While assuming default settings for AAI Loaders is reasonable I still suggest adding some kind of check to the mod or a disclaimer on the information page at the Mod Portal. Furthermore it currently prevents playing on expensive mode.

Fixed this in 1.0.1, I think.

10 months ago

Thank you!

New response