King Jo's War Rig Truck


Adds the War Rig Truck from Mad Max Fury Road as car and as locomotive. There's also a cargo and a fluid trailer for the locomotive version. Oh and road rails are added as well.

Content
13 days ago
1.1 - 2.0
6.76K
Transportation Trains

b Problem with Bio Industries and Krastorio2

3 years ago

I become a error message when I use this mod combination:
- Bio Industries
- Krastorio2
- King Jo's War Rig Truck

All of your other mods work, only this combination does not.

Error Message: File not found: kj_warrig/graphics/entity/curved-rail/hr-curved-rail-horizontal-left-bottom-backplates-remnants.png

3 years ago
(updated 3 years ago)

I've contacted the mod author because somehow their mod is modifying my rails...

3 years ago

Should be fixed now.

3 years ago

Thank you!
But there is now a display problem.
When I use your mod, all rails from Bio Industries are not displayed correctly.

3 years ago

Looking into that. Very strange...

3 years ago
(updated 3 years ago)

When I use your mod, all rails from Bio Industries are not displayed correctly.

It was not the rails from this mod that had missing icons, but the BI rails. We didn't declare rail_pictures() and rail_pictures_internal(), as these are functions provided by Factorio. This mod overwrites the functions, and rail_pictures_internal now contains

filename = string.format("__kj_warrig__/graphics/entity/%s/%s-%s-%s.png", dashkey, dashkey, key[2], elem[2]),

Just edit prototypes/entity/rails.lua and make these functions local:

-- line 56:
local rail_pictures_internal = function(elems)

-- line 145:
local rail_pictures = function()

The BI rails will use their own pictures again then. :-)

The reason why this bug only occurred with BI + K2 + War Rig Truck is that BI has an optional dependency on K2. Usually, BI would be loaded before War Rig, but when all three mods are used together, the order changes to War Rig --> K2 --> BI, so we suddenly used the functions that had been modified by War Rig, and with the new blank pictures in place, used these instead of our own.

3 years ago
(updated 3 years ago)

God dammit. Fun fact: I don't even use those functions... And didn't get the idea that it might cause problems to leave them in there...

Gonna fix it quickly.

3 years ago

Thanks! I think you can also remove the new blank images again. :-)

Fun fact: In my first mod, I used a function called "debug" for logging stuff, without making it local. And sometimes I still find it convenient to check for data.raw[type][name]. The scope is usually limited, but calling type(something) will crash … :-)

3 years ago

Thank you both and thanks for your great work :)

This thread has been locked.