Ash


Adds ash and ash processing.

Content
21 days ago
1.1 - 2.0
278
Manufacturing

i Ash as droppable resource on bug kill

4 months ago

Since biters that you burn with flamethrowers leave corpses of ash, is it possible to create some resources this way that could be used by the mod?
I am currently using the mod "biters drop ore" where global resource patches are significantly rarer and smaller but biters will drop resources when killed. Early on just iron ore, copper ore, stone and coal, later they also drop barrels with raw oil etc. So this got me thinking when I saw your mod, biters could drop ash when they are killed via flamethrowers :)

4 months ago

Thank you for the comment and idea!

I've looked at biters drop ore. Please bare in mind I'm hardly a Factorio modding expert... This is achieved in via control stage scripting, which I don't really know well at all. I does look reasonably trivial to make biters drop arbitrary loot (including or exclusively a randomized amount of ash).

However, what I don't know how to do is to detect a biter's cause of death, i.e. only drop ash if they died from fire damage. There is probably a way -- hooking a script in that triggers when a biter catches fire that then checks each tick for whether that biter will die and drop ash if yes. But I don't know how to do that, and that method does not seem like it will scale well with large combats as it would be bad for UPS.

Another complication is: if you wanted different ash drop rates per biter type, then supporting all the mods that add new biters becomes a large task.

It would be cool, though. Also, if biters drop ash when the burn, trees -- the real enemy -- certainly should.

I doubt I'll be implementing this, but someone else is more than welcome to write a mod that depends on this one to implement the idea.

4 months ago

Well, the game already distinguish between regular deaths and bugs being burned to ash because they leave two different corpses. Maybe just change the corpse to your ash? Anyway, I am even less of a Modder and have no clue if that helps :)
A mod that changes corpses is "Zombie Horde", maybe that helps.

4 months ago

This is included in 0.2.1. Be sure to enable the setting provided.

2 months ago

Thanks, love it :)

a month ago

ammm... It causes an error xd

The mod Ash (2.1.0) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event atan-ash::on_entity_died (ID 4)
atan-ash/control.lua:49: Arguments count error for 'spill_item_stack': Expected 1 argument but 3 were given
stack traceback:
[C]: in function 'spill_item_stack'
atan-ash/control.lua:49: in function 'drop_ash'
atan-ash/control.lua:63: in function <atan-ash/control.lua:53>

a month ago

Thank you for the report.

This is fixed in 2.1.1.

New response