Page 1 of 1

How to make an entity blueprintable

Posted: Sat Apr 01, 2017 3:28 am
by blitz_skull
I've recently taken over a mod for someone and I'm doing my best to keep it maintained. However, I find the API very tough to figure out and there seems to be little-to-no way to learn except through trying random things which due to the terrible debug logging system, has been a pain.

Sorry, rant aside.

I need to know how to make a custom entity blueprintable. That is, I can blueprint it, and remove it using the deconstruction planner. Right now I've got some interesting issues where the deconstruction planner removes my entity (x2) but then it doesn't actually leave the ground. It's no longer selectable and the robot "took" it. But for all intents and purposes. It's still there.

What gives?

Re: How to make an entity blueprintable

Posted: Sat Apr 01, 2017 7:00 am
by gheift
Which mod?

Re: How to make an entity blueprintable

Posted: Mon Apr 03, 2017 3:06 pm
by blitz_skull
It's the Smart Display mod originally by Binbinhfr
You can find the mod description at the link below. I've made some modifications to the way the entity works, but I don't think it ever had the ability to be blueprinted.

viewtopic.php?f=93&t=24720

Re: How to make an entity blueprintable

Posted: Mon Apr 10, 2017 8:04 am
by AndrewIRL
Any experienced modders who can help with this?

Re: How to make an entity blueprintable

Posted: Mon Apr 10, 2017 8:39 am
by Bilka
I had a quick look at the code and I don't get what entity you want to blueprint. I'm not an experienced modder though so I was mostly unable to understand the code. (Maybe because there are literally no comments.....)
Anyways, here is my idea: Since the display seems to consist of three entities + text you'll have to set it up so that the entity that can be blueprinted (the lamp or the radar probably) needs to trigger an event when it's placed to place all the other entites. Same goes for deconstruction, if the main entity (the one the player places) is deconstructed, destroy the other entities. There should already be some events set up for that because the player can mine and place the entity so you should just have to copy the functions from those events to the robot related events.