Page 1 of 1

Restrict equipment to certain vehicles

Posted: Tue Sep 10, 2019 2:26 pm
by yeahtoast
I'm having an issue figuring out how to force new equipment items into being placed only in certain vehicles. Is this a property of the equipment-grid, or the equipment category, or the equipment item itself? Digging through mods where this has been accomplished has yielded no obvious solutions.

e.g. I want the recipe tooltip to say "Placed in: [locomotive icon]", rather than in every single vehicle and power armor. What's the best way to go about this?

Re: Restrict equipment to certain vehicles

Posted: Tue Sep 10, 2019 5:46 pm
by eradicator
You have to set matching categories on both the equipment and the grid prototypes.

https://wiki.factorio.com/Prototype/Equ ... categories
https://wiki.factorio.com/Prototype/Equ ... categories

Re: Restrict equipment to certain vehicles

Posted: Tue Sep 10, 2019 6:08 pm
by yeahtoast
Hmmm, I think this is already the case for my grid and equipment but I'll double check. How does this set the item to be vehicle specific? The grid has to be linked somehow to the vehicle prototype, right?

Re: Restrict equipment to certain vehicles

Posted: Tue Sep 10, 2019 8:33 pm
by eradicator
Yes, the vehicle prototype defines the name of the grid prototype it uses:
https://wiki.factorio.com/Prototype/Veh ... pment_grid