Bob's Functions Library mod


Adds a series of useful functions used by Bob's Mods. These can easilly be used by other mods too.

Internal
11 months ago
0.13 - 1.1
397K

b Error with clockworks

4 years ago
(updated 4 years ago)

There seems to be an issue with "clocksworks". Can't really narrow it down what combination of mods it will trigger to fail!
Just disable/enable and this error will come up. Maybe it will help you to find its origin.
https://i.imgur.com/ZDKv6HJ.png

Modlist:
aai-industry_0.4.5
alien-biomes-hr-terrain_0.5.1
alien-biomes_0.5.2
angelsaddons-crawlertrain_0.1.1
angelsaddons-newlocales_0.2.18
angelsaddons-oresilos_0.6.0
angelsaddons-petrotrain_0.5.5
angelsaddons-pressuretanks_0.5.0
angelsaddons-smeltingtrain_0.3.4
angelsaddons-warehouses_0.5.0
angelsbioprocessing_0.7.7
angelsexploration_0.3.4
angelsindustries_0.3.9
angelspetrochem_0.9.7
angelsrefining_0.11.9
angelssmelting-extended-upgradet_0.0.8
angelssmelting_0.6.5
AsphaltRoads_1.1.9
AutoDeconstruct_0.1.17
automatic-belt-direction_1.3.1
Barrel-SizeLott_1.0.2
Bio_Industries_0.18.12
blueprint_flip_and_turn_18.3.7
bobassembly_0.18.4
bobclasses_0.18.5
bobelectronics_0.18.1
bobenemies_0.18.3
bobequipment_0.18.1
bobinserters_0.18.1
boblibrary_0.18.7
boblocale_0.18.1
boblogistics_0.18.8
bobmining_0.18.1
bobmodules_0.18.2
bobores_0.18.2
bobplates_0.18.7
bobpower_0.18.5
bobrevamp_0.18.3
bobsflowcontrol-updated_1.0.6
bobtech_0.18.3
bobvehicleequipment_0.18.1
bobwarfare_0.18.4
Clockwork_0.18.3
clock_0.18.0
Clowns-AngelBob-Nuclear_1.1.13
Clowns-Extended-Minerals_1.1.11
Clowns-Nuclear_1.3.8
Clowns-Processing_1.3.10
Clowns-Science_1.0.20
CoverupFIX_1.0.2
creative-mod_1.3.3
deadlock-beltboxes-loaders_2.3.5
deadlock-stacking-crating-bobs_0.8.1
DeadlockLargerLamp_1.3.1
Dirt_Path_1.3.3
Enhanced_Map_Colors_1.5.1
even-distribution_0.3.17
EvoGUI_0.4.501
Evolution Reduction_0.18.0
extendedangels_0.3.3
FARL_4.0.1
Flow Control_3.0.6
FluidMustFlow_1.2.4
GhostInHand_1.0.5
jetpack_0.1.13
LogisticTrainNetwork_1.13.1
look-where-i-look_1.0.4
LTN_Combinator_0.6.1
manual-inventory-sort_2.2.1
miniloader_1.11.1
mod-list.json
mod-settings.dat
more-petrochem-hell_0.18.2
Nanobots_3.2.5
NextGenEvolution_1.0.0
Noxys_StackSizeMultiplier_0.2.1
only-smelting_0.2.5
PCPRedux_0.18.3
QoL-TempStations_0.5.4
QueueToFrontNG_0.18.0
RealisticDecorationCleanup_0.18.0
robot_attrition_0.4.2
rso-mod_6.0.7
ShinyAngelGFX_0.18.2
ShinyBobGFX_0.18.3
ShinyIcons_0.18.1
Squeak Through_1.8.0
stdlib_1.4.2
Teleporters_0.2.2
textplates_0.5.2
there-is-my-ghost_0.18.2
Todo-List_18.0.1
tree_collision_0.6.1
VehicleSnap_1.18.1
vtk-armor-reach_1.8.0
what-is-it-really-used-for_1.5.12
yemtositemcount_0.1.5

4 years ago

So, the error is on line 391 of the library technology-functions file
This is line 391: if data.raw.technology[technology].prerequisites then

considering if a prerequisite exists, it calls itself with each prerequisite as the next technology, my conclusion is that SOMETHING somewhere has a technology with a prerequisite that doesn't exist!

I, for some reason, deleted the "Checking and error logging" part of these functions, probably in an effort to speed them up. I'm thinking I should put that part back in, so instead of crashing it would then log an error.

Do me a favor. After I release an update for the library, send me a copy of the log, or at least respond with any lines in the log starting with Script @__boblibrary__

4 years ago

78.763 Loading mod boblibrary 0.18.8 (data-final-fixes.lua)
78.764 Script @boblibrary/technology-functions.lua:464: Running technology prerequisite cleanup...
78.768 Script @boblibrary/technology-functions.lua:408: stack traceback:
boblibrary/technology-functions.lua:408: in function 'get_prerequisites_in_tree_cached'
boblibrary/technology-functions.lua:423: in function 'has_prerequisite_in_tree_only_cached'
boblibrary/technology-functions.lua:448: in function 'get_redundant_prerequisites_smart_cached'
boblibrary/technology-functions.lua:466: in function 'prerequisite_cleanup'
boblibrary/data-final-fixes.lua:1: in main chunk
78.768 Script @boblibrary/error-functions.lua:13: Technology night-vision-equipment does not exist.
78.769 Error ModManager.cpp:1471: Failed to load mod "boblibrary": boblibrary/technology-functions.lua:398: attempt to index field '?' (a nil value)
stack traceback:
boblibrary/technology-functions.lua:398: in function 'get_prerequisites_in_tree_cached'
boblibrary/technology-functions.lua:423: in function 'has_prerequisite_in_tree_only_cached'
boblibrary/technology-functions.lua:448: in function 'get_redundant_prerequisites_smart_cached'
boblibrary/technology-functions.lua:466: in function 'prerequisite_cleanup'
boblibrary/data-final-fixes.lua:1: in main chunk


https://i.imgur.com/XOmk6Jl.png
Clockworks has an option to disable the nightvision technology that your library requires. :/

4 years ago
(updated 4 years ago)

Nothing I can really do about him having an option to disable night vision... Deleting things is basically "breaking other mods on purpose"

The correct approach would be to hide the technology and remove the recipe unlock from it. Maybe delete the recipe but the more you remove, the higher the chance you're breaking other mods.

This is also why a lot of things like this end up on options, so that different mods CAN work together.
It's why my burner phase option is off by default.

As for the library issue... I'm working on it. Please do the same with the log file.

New response