Help from experienced modders to create a hidden lightning rod

Place to get help with not working mods / modding interface.
Hoochie
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed Jan 01, 2025 5:11 am
Contact:

Help from experienced modders to create a hidden lightning rod

Post by Hoochie »

Hi! Help me create a hidden lightning rod for a medium electric pole, I can't do it. I looked at examples of different loaders, but nothing worked.
I have almost no modding experience, maybe someone can help?
That is, a pillar that absorbs lightning is needed.
sarfact
Burner Inserter
Burner Inserter
Posts: 5
Joined: Mon Aug 19, 2024 9:35 am
Contact:

Re: Help from experienced modders to create a hidden lightning rod

Post by sarfact »

Hey, you can make a hidden lightning rod by creating a dummy electric pole entity with no graphics (__core__/graphics/empty.png) and no collision (collision_mask = {}). Give it a unique name like hidden-lightning-rod and spawn it with your medium pole using the on_built_entity event. Since Factorio doesn’t have lightning by default, you'd need to simulate the effect or use a mod that adds it.
robot256
Smart Inserter
Smart Inserter
Posts: 1201
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Help from experienced modders to create a hidden lightning rod

Post by robot256 »

For a better example of compound entity management, look at how Shortwave Fixed radios work, and how Cargo Ships oil rigs work.
Post Reply

Return to “Modding help”