TheKingJo 40k vehicles mods AAI fix

by swap

Fix for 3 vehicles of TheKingJo mods. It lets the Predator tank, Leman Russ tank and Dreadnought walk with the AAI controller. Also makes the technology recipe a bit cheaper and only dependent on tank technology

Tweaks
2 years ago
1.1
2.90K

i Modify instead of extend

2 years ago

Hi there,

first of all, yes you have my permission to have this mod. Just for everyone's information.

But you may want to change your approach to the whole situation. You might wanna modify the vehicles instead of extending the data.raw with the whole vehicle with slightly adjusted values.

Instead of:
if ThisOneModExists then
data:extend({
the whole vehicle with adjusted values
})
end

Do:
data.raw["car"]["NameOfTheVehicle"].consumption = "123kW"
where "consumption" can be any property that a "car" prototype has. Such as "braking_power", "selection_box", "max_health", etc.

This avoids problems that could occure.

2 years ago

ok thanks. I will take a look at it. I am no programmer, so I just looked at how other mods do it.

2 years ago

I changed the code to how you proposed it.

By the way, you are free to use these values in your original mods if you want too :)

New response