overriding existing prototypes

Place to get help with not working mods / modding interface.
sthalik
Long Handed Inserter
Long Handed Inserter
Posts: 56
Joined: Tue May 01, 2018 9:32 am
Contact:

overriding existing prototypes

Post by sthalik »

Hey,

I can't understand modifying existing entities and their parameters. I'd like to change the collision box for some biters. Does it work (and is supported API usage) to find the entity in data.raw and replace the values? Otherwise, would that work?

- make an object with given value set to what I want
- set its prototype to the object I want to override
- stuff it in data:extend(...)

Would it take precedence over the old prototype? Of course modifying the existing prototype is simpler and shorter, thus I'd like to try that first.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: overriding existing prototypes

Post by eradicator »

Duplicate of your own thread:
viewtopic.php?f=33&t=60393
Post Reply

Return to “Modding help”