Page 1 of 1

Blueprint support for control replaced entities

Posted: Sun Nov 10, 2019 12:38 pm
by darkfrei
Mod example: Burner Offshore Pump
Linked topic: viewtopic.php?f=25&t=77514

I have a mod, where one entity says where I can place the entity, for example offshore pump can be placed only on the water edge. After placing it will be replaced with the assembling machine, that has some recipe.

Request: by selecting this assembling machine with the blueprint, the blueprint must get the offshore pump and item for it placing.

Re: Blueprint support for control replaced entities

Posted: Sun Nov 10, 2019 12:56 pm
by Klonan
You can replace the entities with script when the blueprint is captured

Re: Blueprint support for control replaced entities

Posted: Sun Nov 10, 2019 4:02 pm
by darkfrei
Klonan wrote: Sun Nov 10, 2019 12:56 pm You can replace the entities with script when the blueprint is captured
1. I don't know how, the linked topic was about it and here was no solution.
2. If it possible, it's nice to have the ready solution without script, just something like entity.blueprinted_as_entity_name = entity.name (or better name).

Re: Blueprint support for control replaced entities

Posted: Sun Nov 10, 2019 11:23 pm
by DaveMcW
darkfrei wrote: Sun Nov 10, 2019 4:02 pmsomething like entity.blueprinted_as_entity_name = entity.name (or better name).
entity.placeable_by

But maybe it doesn't work on offshore pumps?

Re: Blueprint support for control replaced entities

Posted: Mon Nov 11, 2019 12:27 am
by eradicator
DaveMcW wrote: Sun Nov 10, 2019 11:23 pm
darkfrei wrote: Sun Nov 10, 2019 4:02 pmsomething like entity.blueprinted_as_entity_name = entity.name (or better name).
entity.placeable_by

But maybe it doesn't work on offshore pumps?
As far as i remember placeable_by only changes what items the bots can use to revive the ghost, not what entity ghost becomes part of the blueprint.

Better management of placement restrictions is an age old dead request of mine btw: viewtopic.php?t=54014

Re: Blueprint support for control replaced entities

Posted: Mon Nov 11, 2019 1:10 am
by AmatorPhasma
eradicator wrote: Mon Nov 11, 2019 12:27 am
DaveMcW wrote: Sun Nov 10, 2019 11:23 pm
darkfrei wrote: Sun Nov 10, 2019 4:02 pmsomething like entity.blueprinted_as_entity_name = entity.name (or better name).
entity.placeable_by

But maybe it doesn't work on offshore pumps?
As far as i remember placeable_by only changes what items the bots can use to revive the ghost, not what entity ghost becomes part of the blueprint.
Yes this works, I have also two offshore pumps (burner / electric) in fact assembling machines placed by offshore pumps, and placeable_by on the assembling-machine prototype works perfekt with blueprints and Q-hotkey.

Thanks :)