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.
Character corpse arbitrary color support
Character corpse arbitrary color support
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: Character corpse arbitrary color support
+1, bump. I would like to have a rainbow of character corpses scattered about
-
- Burner Inserter
- Posts: 14
- Joined: Mon Aug 24, 2020 1:02 pm
- Contact:
Re: Character corpse arbitrary color support
Bump. I still want this functionality for spider-vehicle corpses.
-
- Burner Inserter
- Posts: 14
- Joined: Mon Aug 24, 2020 1:02 pm
- Contact:
Re: Character corpse arbitrary color support
Okay, so I figured how to do this pretty easily.
The default spidertron corpse already keeps the color it had before it died.
So, in corpse.lua, change pictures to
and get rid of
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
}
Code: Select all
--data.raw.corpse["spidertron-remnants"].animation = nil
Re: Character corpse arbitrary color support
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
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: Character corpse arbitrary color support
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
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings