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.
What defines contructable for const bots?
Re: What defines contructable for const bots?
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.
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.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: What defines contructable for const bots?
Yeah i'm pretty sure something is hard coded against trees being constructible. Because my other custom made buildings are all auto constructible.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.
Though I've got no idea how to replace the construction on placement.
Re: What defines contructable for const bots?
Well, maybe this mod will be educational. Or in klonan's mods you can see general approach to replacing buildings on build more clearly.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.
I also update mods, some of them even work.
Recently I did a mod tutorial.
Re: What defines contructable for const bots?
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
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