AAI Loaders: Bob's Mods


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

Content
9 months ago
1.1
2.90K
Logistics

b Error during startup with non default mod settings

10 months ago
(updated 10 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.

10 months ago

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

10 months ago
(updated 10 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.

9 months ago

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

Braxbro ☆
9 months ago

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

Braxbro ☆
9 months ago
(updated 9 months 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'.

Braxbro ☆
9 months ago
(updated 9 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.

Fixed this in 1.0.1, I think.

5 months ago

Thank you!

New response