Loot biters ! (dont download lol) deprecated

by UxoZii

Biters occasionally drop loot on death. The stronger they are, the better the loot. Whenever they drop something, a flame will spawn on their corpse. Disclaimer : There's a bug which causes a crash. update: this mod causes crashes and i dont think ill be fixing them anytime soon so this mod is ded

Content
5 years ago
0.16
4
Enemies

b Compat issue with Will-o'-the-Wisps

5 years ago

A yellow wisp from Will-o'-the-Wisps updated attacked me, and the game crashed with this:

701.296 Error MainLoop.cpp:1035: Exception at tick 40090: Error while running event Loot::on_entity_died (ID 4)
Key "name" not found in property tree at ROOT.stack
stack traceback:
Loot/control.lua:326: in function <Loot/control.lua:1>
701.296 Error ServerMultiplayerManager.cpp:96: MultiplayerManager failed: "Error while running event Loot::on_entity_died (ID 4)
Key "name" not found in property tree at ROOT.stack
stack traceback:
Loot/control.lua:326: in function <Loot/control.lua:1>"

5 years ago
(updated 5 years ago)

Looking at the code, and offending line 326 in particular:

event.entity.surface.create_entity{
  name="item-on-ground",
  position=event.entity.position,
  stack={name=dropped_item} }

...problem there seem to be that dropped_item is never set above, so nil is passed as "name", causing that "Key 'name' not found" error.

dropped_item is set via checks like "if event.entity.name == 'behemoth-spitter' then ... end", which naturally don't account for new types of units like wisps mod adds, and there's no fallback.

Can be fixed by adding "and dropped_item" check before creating loot, which will skip that process unless entity was recognized and dropped_item was set above correctly.

5 years ago

My bad, I'm still not good at modding, but I'm trying. I'm working on a new version with all the fixes the mod needs

4 years ago

Para mim ocorreu o mesmo erro, esse mod teve alguma correção ou alteração para correção do bug?

New response