I'm currently working on an equipment mod that I think would be better off if I just removed the ability for it to be placed in vehicle grids. I was wondering if anyone had any insight as to what I should be looking into or how to accomplish this. I know the jetpack mod does this, and through my cursory scan of the lua files for it I have not seen (or I completely missed it) how it accomplishes not allowing jetpacks in vehicle grids.
I appreciate any and all help/insight.
Hope whoever is reading this is having a great day!
Creating Player Only Equipment
Re: Creating Player Only Equipment
Equipment placement is based on the categories of the equipment and the grid - if any category is shared between them, it can fit.
So basically you'd want to make a new category just for your equipment, then find all the equipment grid prototypes used in people armor and add that category to it. Since the vehicle grids don't have that category, they can't.
So basically you'd want to make a new category just for your equipment, then find all the equipment grid prototypes used in people armor and add that category to it. Since the vehicle grids don't have that category, they can't.
Re: Creating Player Only Equipment
I'd likely need to do this during the prototype stage in order to add that category to all of the equipment_grids in armor. I thought the prototype stage was literally just using the data.lua file to hardcode, well, data. Is there some way, or am I allowed to put logic in that file?
Re: Creating Player Only Equipment
data.lua is a lua file. It's executed as lua like any other lua code. The difference between data.lua and control.lua is what API's are available (and when it is executed).
Put as much logic in it as you want. Read the API docs to learn more (link at top of the website!)
Put as much logic in it as you want. Read the API docs to learn more (link at top of the website!)
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
-
- Smart Inserter
- Posts: 2767
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Creating Player Only Equipment
I think this deserves stressing as in the prototype stage there are 3 different data lua files that get executed at different times.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: Creating Player Only Equipment
Thanks for the information. That helped a ton!