Effectively implementing two pollution's on one surface
Posted: Fri Nov 01, 2024 4:20 pm
Hi all, I really want biters and pentapods to be able to exist on the same surface and be affected by their respective pollution types.
My basic idea of implementing is copy the surface but only include biter spawners. Any pollution that would be added to the main surface chunk is instead added to the copied surface.
When the spawners on the copied surface would trigger an attack, that would instead trigger on the main surface.
Seems simple enough. Sure, it's not memory efficient, but space exploration has many surfaces, each with way more complexity.
I've dug in the modding API, and The thing is, I am not seeing a clean way to interact with spawners. There doesn't seem to be ways to manually add pollution to a spawner, and there doesn't seem to be a way to intercept the attack trigger command let alone manually trigger an attack from a spawner. I do see you can just command individual units to attack.
This would be my first foray into modding (though I am confident I can pick it up) so I have some questions...
Is what I am proposing possible?
Can you think of work around if not?
If the methods that do what I want don't exist on enemyspawner types, is that something I can add with modding?
I am quite fixated on this idea right now, but I think it would be really cool! It's a fun idea that I think could enable a lot more stuff for other modders, and there is enough complexity for me to feel interested enough to start modding!
Thanks for the insight everyone.
My basic idea of implementing is copy the surface but only include biter spawners. Any pollution that would be added to the main surface chunk is instead added to the copied surface.
When the spawners on the copied surface would trigger an attack, that would instead trigger on the main surface.
Seems simple enough. Sure, it's not memory efficient, but space exploration has many surfaces, each with way more complexity.
I've dug in the modding API, and The thing is, I am not seeing a clean way to interact with spawners. There doesn't seem to be ways to manually add pollution to a spawner, and there doesn't seem to be a way to intercept the attack trigger command let alone manually trigger an attack from a spawner. I do see you can just command individual units to attack.
This would be my first foray into modding (though I am confident I can pick it up) so I have some questions...
Is what I am proposing possible?
Can you think of work around if not?
If the methods that do what I want don't exist on enemyspawner types, is that something I can add with modding?
I am quite fixated on this idea right now, but I think it would be really cool! It's a fun idea that I think could enable a lot more stuff for other modders, and there is enough complexity for me to feel interested enough to start modding!
Thanks for the insight everyone.