Character corpse arbitrary color support

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Xorimuth
Filter Inserter
Filter Inserter
Posts: 697
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Character corpse arbitrary color support

Post by Xorimuth »

Currently you can only set the color of a "character-corpse" by setting character_corpse_player_index (or with player_index in create_entity). This only allows them to be color the same color as an existing player. I'd like to be able to set a corpse to any color using entity.color.

Why? I'm creating spidertron corpses using "character-corpse" so that their inventories are not lost when they are killed.
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
asher_sky
Long Handed Inserter
Long Handed Inserter
Posts: 58
Joined: Sun Oct 18, 2020 7:13 pm
Contact:

Re: Character corpse arbitrary color support

Post by asher_sky »

+1, bump. I would like to have a rainbow of character corpses scattered about :D
PrestonLeeC
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Aug 24, 2020 1:02 pm
Contact:

Re: Character corpse arbitrary color support

Post by PrestonLeeC »

Bump. I still want this functionality for spider-vehicle corpses.
PrestonLeeC
Burner Inserter
Burner Inserter
Posts: 14
Joined: Mon Aug 24, 2020 1:02 pm
Contact:

Re: Character corpse arbitrary color support

Post by PrestonLeeC »

Okay, so I figured how to do this pretty easily.

Image

The default spidertron corpse already keeps the color it had before it died.

So, in corpse.lua, change pictures to

Code: Select all

picture = {
        filename = "__core__/graphics/empty.png",
        height = 1,
        priority = "extra-high",
        width = 1
      }
and get rid of

Code: Select all

--data.raw.corpse["spidertron-remnants"].animation = nil
Xorimuth
Filter Inserter
Filter Inserter
Posts: 697
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Character corpse arbitrary color support

Post by Xorimuth »

Thanks for the suggestion, that is genius! It needs some scripting to remove the corpse once the (invisible) character corpse has been emptied, but that should be straightforward. I’ll release the update tonight :)
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Xorimuth
Filter Inserter
Filter Inserter
Posts: 697
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Character corpse arbitrary color support

Post by Xorimuth »

Implemented in Spidertron Enhancements 1.8.6: https://github.com/tburrows13/Spidertro ... 27b8deba4a
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Post Reply

Return to “Modding interface requests”