Vehicle Equipment Grids

by Kryzeth

Adds equipment grids to vehicles in a sensible manner (no more exoskeleton legs in cars or trains or boats or planes), and adds a replacement vehicle specific speed booster equipment. Compatible with SE Space Trains, Fusion Trains, Flamethrower Wagon, Aircraft, AAI Vehicles, Cargo Ships, GunEquipment, Radar Equipment (and more!)

Tweaks
23 hours ago
1.1 - 2.0
2.82K
Transportation Trains

i [Pending] No longer works with AAI Vehicles: Ironclad

4 days ago
(updated 4 days ago)

Earandel's Ironclad now has its own equipment grid which accepts exoskeletons instead of this mod's engines.

Steps to reproduce:
1) Open an Ironclad's equipment grid
2) Attempt to put in an engine booster equipment
3) Attempt to put in an exoskeleton

Expected result:
The Ironclad's grid accepts the engine booster equipment and rejects the exoskeleton.

Actual result:
The Ironclad's grid accepts the exoskeleton and rejects the engine booster.

Notes:
I leave the "add equipment grids" options disabled, so I only get the original developer's intended experience with the vehicle. Don't know if it's relevant.

Amusing note:
I can only assume that the engineer is adding oars to the exoskeletons so they paddle alongside the propellers.

3 days ago
(updated 3 days ago)

Hmm, this is a bit of an awkward situation. The AAI Ironclad is using the same grid as the vanilla Power Armor, so without the "enable .. equipment grid" option enabled, my mod doesn't make any changes to it (since that would also modify the vanilla Power Armor)

This actually works the same way with the vanilla tank; if you disable the setting for grounded vehicle equipment grids, then the vanilla tank can no longer use speed booster equipment.

Though considering that you want the "original developer's intended experience", I would argue that this actually should be the expected result? Without this mod, the intended experience is that the vehicle uses exoskeleton legs, thus that should not change when the related equipment grid setting is disabled, right? I'm currently leaning towards marking this as Intentional Behavior, all things considered.

2 days ago

Oh, dear. I had assumed the Ironclad and the Tank both had their own unique grid. Them calling the Power Armor's equipment grid would indeed be troublesome.

By "developer's intended experience," I meant "their intended size and shape." So, if they gave it a 6x8, then I want it to still have a 6x8. If they didn't give it a grid at all, then I don't want it to have a grid. Looks like I'll be installing your customization mod so I can avoid giving the car an equipment grid.

[WONTFIX NOTABUG] it is!

Thanks for the info and quick reply.

2 days ago
(updated 2 days ago)

Unfortunately, the logic of the customization mod works the same way as this one; if the setting for a vehicle type is disabled, then it will make no changes to those vehicles. The only point for that one is to standardize the grid sizes by vehicle type, allowing for size customization (while this one makes a unique, but non-customizable grid for every single vehicle in the game). Either way, if they don't change the grid, they can't affect the equipments for that grid.

If you just want the speed booster equipment on vehicles, without adding any new grids on vehicles that didn't already have them, or affecting the sizes of those that did... It would be difficult, but not impossible. I have to work on a bugfix for the customization mod anyways, so I have reason to dive into the code again; I can look into the issue while I'm in there.

a day ago

Eh... making a version that neither changes the grid size nor adds grids to vehicles without them sounds like a lot of trouble. Other than reading every single mod-installed vehicle at startup, I can't think of a way to do it easily. I'm mostly a hobbyist coder, I don't really have much experience, so I don't know how feasible even that solution would be. If you want the challenge, go for it, but I won't ask for it. I don't think it's worth the effort.

I was pondering making my own mod that adds a vehicle-flavored exoskeleton (like your engine booster), and does nothing else. For what I said in my previous post, it would suffice. It wouldn't be able to force using the engine instead of the exoskeleton, but anyone who uses such a mod would pick the engine on principle, anyway.

I then remembered how much I hate untyped/implicitly typed languages. Lua, especially, because you can have as many variables with the same name as you have types. Its... quirks... are kind of necessary because of its original intended purpose, but that doesn't mean I like using it. Give me a C derivative every day of the week and twice on Sunday.

23 hours ago
(updated 22 hours ago)

Actually, it's gonna be super-easy, barely an inconvenience; I already had a loop going through every vehicle in the game, in order to add grids to vehicles that didn't already have them (if enabled via setting).

All I had to do was modify it to grab the equipment grid, check if it was a power armor grid and create a duplicate if so, changing the valid equipment categories to what they should be (per vehicle type). If it didn't have a grid, and the setting was disabled, then it would be ignored as usual. So grid with legs becomes grid with speed booster, while no grid remains as no grid (if the related grid setting is disabled)

I'd also been considering whether or not I should move the speed booster functionality to its own mod, but part of the reason I made this mod in the first place was so that I could add vehicle grids that used the speed booster instead of the exoskeleton legs. It'd be a bit silly (imo) to have one and not the other; the dual purposes are intertwined in my eyes.

I haven't had much of an opportunity to program in any other language but lua, so I personally have no reason to dislike it lol. Especially when dealing with Factorio (well, the data loading stage, at least), I have a ton of experience at this point with looping through the game's various prototypes and copying/changing properties.

Should be implemented in v2.1.11

New response