Bob's Warfare


Make things for warfare.

Content
a month ago
0.13 - 1.1
240K
Combat

g Incompatibility with Krastorio 2

4 years ago

Hi! One of our users told us that this mod is incompatibile with Krastorio 2(K2), because gun turrets in K2 use custom ammos categories (normal one is removed).
We have decide to not start make compatibilities with Bobs mods because doing it for one would mean start doing it for all, and we have not time for all big Bobs modpack. If you too don't want make it compatible, I suggest you to mark K2 as incompatible.
Have a nice modding.

4 years ago
(updated 4 years ago)

I don't mean to be rude with this response, it just reflect my personal opinion, and what I would consider to be the "correct" way to go about solving the problem.

Removing something from the base game is you openly declaring that you are breaking something on purpose, therefore accounting for it being removed isn't something I should be expected to do. I mean, I could do it, but what happens if random unknown modder decides to make a mod adding a gun-turret-MK2 that is just a copy of base game's turret code with a few tweaks (Kinda like mine are, but it's more complex than that), and that breaks? are you going to hunt down every mod that has a gun turret that crashes when your mod is installed and ask them to write in an exception for your mod?

In such a case where my mod would remove or change a base game thing that other mods might expect to exist, my usual procedure is something as follows, and I would suggest Krastorio do similar:

In data-updates phase (since entities, items and the like are expected to exist by the start of this phase, in bob's mods they do, even recipes, even if their ingredients or results aren't set yet.), do a for in pairs loop on data.raw["ammo-turret"], which would basically run through every gun turret defined
Check for attack_parameters and attack_parameters.ammo_category == "bullet" (the category you removed)
change that ammo_category to... something you would expect to be used instead.
Do the same for item type gun, and item type ammo as needed.

what I suggested would not only solve your problem with my mods, but in theory every other mod that Assumes a base game variable still exists.

I'm not saying you should, but if you were to browse through the entirety of my mod's code, especially in the data-updates stage, you'll notice these loops and checks dotted around through the entire mod pack.
It's not uncommon that I get bug reports, but It is very rare that I get any kind of mention at all about these kinds of changes.

4 years ago

I already think about this changes, Krastor has treated this part of K2 and he is a bit less expert about compatibility, I will improve this in future. We constanlty try to make K2 more compatibile as possible but how can imagine from ur experience, is not easy when the mod touch deep the base game.

Anyway, we receive constantly reports about incompatibility with ur modpack that is an expensive work, and instead do an hard decision like in the case of Industrial Revolution of mark ur main library as incompatible to say openly "I don't want care about this problem", I prefer inform you about the problem.

My apologies. Have a nice modding.

4 years ago
(updated 4 years ago)

I'm sorry if I offended in any way.
Yes, I do understand this problem, and I am willing to make tweaks for compatibility.
If for example you had already written such a function and it still didn't work, I'd probably look into it and make changes, or you were requesting I add a function to check if your category exists and then change my turrets to use it, then, I probably would do such a thing too. (I'm just guessing here, but I'm assuming the reason why you're removing bullet is to have a different type for hand guns, and turret guns.)

Instead I offered advice on how you could try and fix it on your end first.

And, yes, I often do try and solve these kinds of issues when brought to my attention. I eventually changed my Burner Phase mode of bobtech to be off by default, with a big warning in the popup tooltip stating that it isn't compatible with AAI Industry. (I couldn't get them to work together, because his mod loads after mine, and breaks things in the data-final-fixes stage, After my final stage of access)
I personally rarely even use data-final-fixes to avoid such issues.

4 years ago
4 years ago
(updated 4 years ago)

Yes, that should help... that part you removed at the end of the file is the sort of change I was suggesting you should add, but for the turrets. (still assuming they use different ammo than hand-guns)

but at the least, if you're not removing the base game ammo category, then it becomes a default.

New response