Simple Drone Tutorial

Got questions about Shipmaker? Get answers here. Please read the stickied topics first!

Moderators: th15, Moderators

Post Reply
User avatar
Zalausai
The Tutorialist
The Tutorialist
Posts: 939
Joined: Tue Feb 12, 2013 11:42 am
Location: Looking for angels in the Maze of the Dead.

Simple Drone Tutorial

Post by Zalausai »

Simple Drone Tutorial

This tutorial will teach a shipbuilder how to create a simple drone-type object. It is essentially a section of the ship that is launched outward and fights for you.
This tutorial will require you to read and understand the Advanced Documentation, specifically about triggers and moving sections.
This will do until a newbie-friendly version is created.
It is also necessary to understand Turrets

So, we have our Tutorial ship (You should know how they look by now, like crap)
Spoiler!
Drone Tutorial 1.png
All the pieces are laid out in the proper parenting relationship. Note the pattern. Round turret section, base section, round turret section, base section, etc. Each base section has a "Dummy gun". This will allow them to manipulate the "Drone" after it is "launched". Recreate it as shown.

Give each "dummy gun" a round section to drive. The center one will drive the first round section. This will put the "drone" in that direction near an enemy. The second one will keep the "drone" in front of the target ship. The third one will control the "drone's" positioning to face the target at all times.
Spoiler!
Drone Tutorial 2.png
Each square section has triggers.
Spoiler!
Drone Triggers.jpg
These are simple. Just copy them as shown into each square section. Their functions are explained below.
Trigger 1: When the weapon acquires a target, the section will move itself to a certain point.
Trigger 2: When the weapon loses its target (or the target dies), the section will return to its starting point.

However, each section and turret will need to be configured individually (articulated robot arms: deja vu)
Each turret will have to have a 180 degree firing arc to make sure the drone functions properly.

The turret attached to the center of the ship is the "Launch" turret. It's range determines the point at which your "drone" will "launch". (This one is 1500)
Each square section is "set on trigger 1" and "set on trigger 2" for this turret. Note the direction of the teal arrows.
Spoiler!
Drone Tutorial 3.png
The first square section (Bottom) will move outward a distance of half the range of the previous turret. Target Distance: 800
It needs to go out at an angle, so it doesn't overlap with the target. That would be retarded. Target Direction: 30
This will make it go out fairly far and at an angle to the ship's left. That's fine.

The first "dummy gun" (parented to the bottom square) is set an an angle of -60.
Since the section that it is on will be going to the left and outward, it will probably be to the side of the target as well. With the angle set to anticipate this (pointing to the ship's right and slightly ahead) it can place the "drone" slightly in front of the target.

The second square section (Middle) will ride along with the first. We need to get it in front of the target. Since the first if going off to the ship's left, it'll have to go to the ship's right instead. It is set up to go to the ship's right a distance equal to the Target Y of the first section.
Target Distance: 400
Target Angle: 270
This will keep it near the center of the front of the ship as it moves outward.

The second "dummy gun" (Parented to the middle square) will control the "drone" to keep it facing the target instead of putting it into position (that's taken care of by the previous sections and turrets). This one is facing the opposite direction (180). It doesn't really matter what direction that it faces, as long as it faces the same as the Target Angle of the following section. The range should be about half that of the previous turrets, so the "drone" doesn't get distracted.

The last square section (Top) will be the "Drone" itself. It should move outward a little from the previous setup to appear a autonomous. Just a little bit is okay for the look.
Target Distance: 100
Target Angle: 180 (Backwards)
It will launch back towards the ship (same as the second turret), but that is not really important, since the previous turret setup will spin it around towards the target anyway.

The last "dummy gun" (Parented to top square) will drive the "Drone" itself. It will choose the direction that the "Drone" shoots in. This one does not necessarily need a 180 degree firing arc like the others, but it does help out at times. Don't forget to put a weapon on the last round section that you intend for the "Drone" to actually use. Link it to the last "dummy gun" with the arrow going in the proper direction.


Now, hide all of them except the last round section and weapon (Don't forget to give them and the "dummy guns" some decent HP). This will complete the illusion of a "Drone" section. Alternatively, there is a particular sprite that makes things disappear (because it is entirely transparent), but they cannot be edited easily after that. That will not be covered here.
Spoiler!
Drone Tutorial 4.png
Now, when you're all done with testing and programming this particular "drone", put the first round section (highlighted in image 5) under the "dummy gun" that is in the center of the ship. All of the other sections, "dummy guns", and parts of the 'drone" system can be hidden under another section of the ship. It looks neater to put them all in the same coordinates, so it looks very clean overall. (Image 6)
Spoiler!
Drone Tutorial 5.png
Drone Tutorial 6.png
Here is the Test ship in the sandbox with a functioning "drone". It is still choppily animated compared to the original specimen, but it has been simplified.
Spoiler!
Drone Test Finale.jpg
Drone Test has everything laid out for editing and viewing (Still at alpha 0 though)
Drone Test 2 has everything hidden under the wing of the ship. (Image 6)
Drone Test.zip
(17.08 KiB) Downloaded 422 times
Original Specimen
Spoiler!
Drone Demo
Anonymous wrote: Demo 1 has all the "controller" sections visible so you can select them in SM. If you want to "unfold" them, go into preview mode (F11) and press W.

Demo 2 has everything as it should be: replaced with the blank sprites from the Repack
This tutorial was much more complex than most of my normal work. Please report any errors to me via PM so that I can correct them.
Zalausai
Last edited by Zalausai on Thu Apr 18, 2013 1:54 pm, edited 1 time in total.
Has written a series of tutorials for the newbies
Zalausai's Tutorial Index

Created: Elements of Discord, Heaven's Grace, and Hell's Last Battalion.

I stop in from time to time to check in on the community. Though I don't spend much time with shipmaker anymore.
Proud parent since: 8/15/2013 (Baby Boy)

Good shipbuilders never die . . . they just fade away.
Bad Boy
Vice Admiral
Vice Admiral
Posts: 1276
Joined: Mon Jan 21, 2008 4:34 am
Location: Halifax, Canada

Re: Simple Drone Tutorial

Post by Bad Boy »

Nicely done, when this came out I went through the trouble of figuring it out, so I know how much work it takes.
A couple things:
I may be wrong but I believe it was Eri Erin who made this, so the quote from Anonymous should probably be attributed to him.
Also, to make the section unshootable and invisible, he used a sprite that was all one colour. Since BSF takes its transparency colour from the top left pixel, this meant the whole thing was transparent.
Great stuff though, well written and it actually makes a difficult topic quite easy to understand.
User avatar
Zalausai
The Tutorialist
The Tutorialist
Posts: 939
Joined: Tue Feb 12, 2013 11:42 am
Location: Looking for angels in the Maze of the Dead.

Re: Simple Drone Tutorial

Post by Zalausai »

I fixed some typos and removed credit to the specimen. Credit will be rewritten when I can confirm who it came from.
Thanks for your support.
Has written a series of tutorials for the newbies
Zalausai's Tutorial Index

Created: Elements of Discord, Heaven's Grace, and Hell's Last Battalion.

I stop in from time to time to check in on the community. Though I don't spend much time with shipmaker anymore.
Proud parent since: 8/15/2013 (Baby Boy)

Good shipbuilders never die . . . they just fade away.
STARSTRUCK
Moderator
Posts: 342
Joined: Wed Mar 03, 2010 3:46 pm
Location: sent milady ;)

Re: Simple Drone Tutorial

Post by STARSTRUCK »

bretty good :DDDDD

I'm not quite sure it's a simplification, since (if I'm not mistaken) you've added two extra turrets that weren't there in the original. But you've put it in a properly followable tutorial form and that's great.
Post Reply