Endgame Combat

by Reika

Adds more powerful combat capability to keep up with numerous and/or powerful enemies and huge biter bases.

Content
2 years ago
0.15 - 1.1
46.3K
Combat

i error handling

6 years ago

noticed in compound-ammo that line72: checks to make sure that when a technology would unlock a recipe, there actually is a recipe for that item, or it triggers an error and stops the game from loading.

Is there a way to format that error better so it checks for the name of the mod that the technology is added by? is that possible?
I know the game GUI can tell players what mod either adds or modifies an item when you hover over it in game, but that doesn't necessarily mean there is a way to know which mod adds a technology during the loading phase of the game.

If it IS possible, i suggest editing the error check sections of code to let players know what mod adds an item/technology/etc that triggered the crash. If not, i suppose there isn't anything else that can be done. All in all, i was actually kinda impressed with the way compound-ammo.lua was done :)

6 years ago
(updated 6 years ago)

an update today triggered a crash due to this same line and once i read the line, and realized what it meant, it didn't take long to figure out what went wrong. So i mean, the way it is already done is GOOD, but if it's possible to determine the name of the mod that adds the technology that actually triggers the crash because the recipe doesn't exist, i'd try and do that :)

6 years ago

So were you able to come up with a solution? I am having the same problem.

6 years ago

AFGHANPSYCHO, Reika managed to find a way to parse through all research and then prevent loading of the game if any technology has an a unlock_recipe effect added which points to a recipe that hasn't been created (a very elegant solution, but lacks mod info in the crash log so it's hard to trace WHICH mod is the actual cause), the only solution to it right now that i know of is disabling first whatever mods you most-recently updated, and then --taking notes---remove mods a few at a time until it loads properly and using that process of elimination to determine what mod has a technology that is trying to unlock a recipe that doesn't exist.

6 years ago
(updated 6 years ago)

i wish it were as simple as doing forEach[mod]in data.raw[mods], check that forEach{technology}.effects, none => nil. If effect = recipe and recipe = nil, print "[modname].[technology-name] errored while trying to set effect = to recipe unlock that hasn't been declared."

6 years ago

AFGHANPSYCHO, the method i use to trace what mod is actually causing it takes a 20-30 tries of loading the game based upon how many mods you are running, but first: disable endgame combat to get the game to skip that section of error-checking. create a new world save file and name it something simple that you can remember was used for error testing. after you've saved a new world. exit and disable half of your mods you first expect are not the cause of the crash (before exiting, also re-enable endgame combat). if it crashes, go ahead and re-disable endgame combat, and allow it to load. create a new save with the fewer mods and repeat. eventually you should get to the point where you find what mods combined with endgame combat result in a crash and, with this particular error, it's usually the other mod's fault.

6 years ago
(updated 6 years ago)

right now, per my testing, wormmus config is causing the ammo-crate crash with Endgame combat in Factorio v16.41. But that doesn't mean that other mods won't be having this same error. as i've written earlier, it is nice to know that somewhere, a mod has a technology that is attempting to unlock a recipe that doesn't exist, but it takes some time to trace down what changes need to be made under each new issue to get the game to load again, and that can be a bit tiresome