Page 1 of 1

What defines contructable for const bots?

Posted: Thu Apr 28, 2016 9:28 am
by DeathTech
Hey guys, I was wondering if anyone knew.

I am basically working on my own mod, and I wanted to mod some trees that can be grown.
But however I can't seem to get my tree to be auto placed by the construction robots.

And I can not place a building ghost. Despite refusing to do this it does not prompt an error at all.

So does anyone know what I can do to make ghosts work for my trees / auto placing?
Any help would be greatly appreciated.

Re: What defines contructable for const bots?

Posted: Thu Apr 28, 2016 4:43 pm
by Adil
probably the flag "player-creation" is needed. Or maybe it's that "tree" type is hardcoded to be ignored in this respect.

If anything else fails, you can have a dummy entity of some surely buildable type and then replace it with real tree whenever player or bot places one.

Re: What defines contructable for const bots?

Posted: Fri Apr 29, 2016 12:28 pm
by DeathTech
Adil wrote:probably the flag "player-creation" is needed. Or maybe it's that "tree" type is hardcoded to be ignored in this respect.

If anything else fails, you can have a dummy entity of some surely buildable type and then replace it with real tree whenever player or bot places one.
Yeah i'm pretty sure something is hard coded against trees being constructible. Because my other custom made buildings are all auto constructible.
Though I've got no idea how to replace the construction on placement.

Re: What defines contructable for const bots?

Posted: Fri Apr 29, 2016 6:16 pm
by Adil
Well, maybe this mod will be educational. Or in klonan's mods you can see general approach to replacing buildings on build more clearly.

Re: What defines contructable for const bots?

Posted: Fri Apr 29, 2016 8:34 pm
by DeathTech
That mod is plenty to get the job done I think.

I have in the meantime already created a "placeable tree" using a modified solar panel.
If I modify some stuff I should be able to change this to replace the construction event and swap the constructions.

Thanks for the help.
I will let you guys know if I manage to make it work.

Thx for the help Adil.

EDIT: Finally managed after several hours (of sadly struggling with not noticing I wrote control.lua wrong) got the script working to replace my fake solar panel tree with my fake trees to get the auto place working has finally worked. #FactorioAPI_isALifesaver