Packed Entity Prototype. for using multi entity to do custom function

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

kjrsysy
Burner Inserter
Burner Inserter
Posts: 8
Joined: Thu Oct 24, 2024 12:38 am
Contact:

Packed Entity Prototype. for using multi entity to do custom function

Post by kjrsysy »

TL;DR
for to make custom multi function entity, add prototype version of entity of stack-able and easy-to-link-script
What?
suggestion new prototype for multiple custom stack multiple entity with easy mange and script_able thing.

this is my idea with Rough text. (try to like api codex)
PackedEntitysPrototype
Why?
For Now modder who want custom entity whit storage data and function, (at least i know) working like this.
  1. find has function that moder want(similar) entity prototype and make base entity.
  2. check every init and link (and storage) data alo if single entity is not enough, add hidden other entity or scripting
  3. check data and using for each in list do each one by one.
  4. also check if entity is missing than removing all linked entity script add manually
to script manually to manged sub-entity and data (check and find all init to make sub entity and storage data and destroy when main entity is removed) is really annoying work for modder and also can easily missed.
example. for now entity built event has three thing . on_built(do player manually), on_robot_built_entity(do build robot) on_space_platform_built_entity(on space platform.) space-age-dlc add third thing, so who can say will never add forth or more?

also for now way of script_tick_function_entity using data list and for a in l has two problem.
one. for a in l in long list is really worse for ups.(specially for large factory, ups really bottleneck.)
two. to make it use less memory, one way is increase tick_update_late, but it make mod make some buggy.
also about dummy entity, i saw bug of some sub entity is left so i should destroy it manually. (specifically, shot by cannon).
Post Reply

Return to “Ideas and Suggestions”