What defines contructable for const bots?

Place to get help with not working mods / modding interface.
DeathTech
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Apr 28, 2016 9:23 am
Contact:

What defines contructable for const bots?

Post 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.
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: What defines contructable for const bots?

Post 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.
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.
DeathTech
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Apr 28, 2016 9:23 am
Contact:

Re: What defines contructable for const bots?

Post 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.
User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: What defines contructable for const bots?

Post 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.
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.
DeathTech
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Apr 28, 2016 9:23 am
Contact:

Re: What defines contructable for const bots?

Post 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
Post Reply

Return to “Modding help”