Infinite train research for better braking


Adds a extra research to increase train braking force.

Content
3 years ago
0.16 - 1.1
9.82K
Transportation

b "Failed to load mods: Technology braking-force: Infinite research followed by level 9"

5 years ago

Hi,

I had the above error when loading multiple mods. I have not played Factorio in a while so I can not remember if I tested this mod with my setup.

I noticed in the "technology.lua" that "braking-force-8" is the highest level.

Thanks,
Mark.

5 years ago

hmm ill test it again and see what happens
also many techs in the mod have a short side branch!

5 years ago

it works fine here maybe send some screen shots might help

5 years ago

How do I post a screenshot?

I don't think it will help you as it a box that pops up during startup showing the error along with 3 buttons:
[Disable all user mods] [Restart] [Exit].

Strangely it does not have the 4th button [Disable listed user mods], nor does it show the name of your mod - I only found it was your mod when I manually removed it from the mods folder.

Let me know how to post a screenshot if this explanation does not make sense - it is probably having a conflict with another mod so it really is not important I guess, just thought I'd mention it.

5 years ago

press print screen key (top right somewhere)
then open paint ctrl v in there
save it as jpg or png somewhere
open imgur
upload it there
post the link you get after upload here

3 years ago
(updated 3 years ago)

I had the same issue. Turns out another mod was adding some braking force research as well.

https://github.com/LuziferSenpai/Battle-Locomotives/issues/2

I commented out the research in Battle Trains to get the two mods to play nicely.

3 years ago

ok , i will try to fix it

3 years ago

can you please show me the error report ?
since i am sort of tring to find the problem going in blind

2 years ago

Here's my interpretation of what went wrong:

Battle Locomotives adds technologies for breaking force 8 and 9, and your mod adds breaking force 8.
Because Battle_Locomotives is loaded before train_tech (alphabetical), breaking force 8 and 9 are created, but then this mod makes braking force 8 infinite.

The game doesn't like that, as now there's an infinite technology with another technology after it, and so they collide.

The solution would be to make a check for breaking force 8 and not add it (and perhaps also add breaking force 10) if it already exists.
You can do this using
if data.raw["technology"]["breaking-force-8"] then
...
end
as nil is treated as false.

1 year, 3 months ago

THX
ill see how well the fix works and maybe upload a fix soon

New response