Working with Hosting and Site Operations
Author: ProzaicMuze (sc2mapster.com)Tags: advanced data attachments  
Source: http://forums.sc2mapster.com/resour...Added 13 years ago 

As part of the Creature Contest, I thought it would be a great idea to cover Hosting and Site Operations in extensive detail. I'll be demonstrating how you can use multiple Site Operations and the Host/Hosting Fields to attach units to each other, designate launch/impact locations and otherwise create your own patchwork units. For our example we'll be covering the Uberlisk despite there already being multiple tutorials out for it. The reason for this is my Uberlisk actually has the 6 spine crawlers it's supposed to in the locations they are supposed to be. I've also improved upon the concept and adjusted the spine crawlers further to show you just how realistic you can make attachments appear.

Example map: (link)

Take a look:

(I'm lazy and don't have video recording, but video tutorialist OneTwo was awesome enough to make this for me!)

Also, as a warning, this tutorial is quite lengthy and as such it is entirely likely that I made several typos or forgot a step. If you see such an instance let me know right away so I can fix it. Do not hesitate to ask questions either as I'll be available to help as best I can :)



The Basics

Hosting and Site Operations are nothing more than points of reference for alignment instructions. Either you're linking two objects together with references so that they can "speak" to each other, or you're telling an object that it needs to be here and/or moved to there. If actors are the puppeteers, units are the puppets and behaviors/effects are the puppets features then hosting/site operations are the strings. They tell everything where they need to be.

Before we begin, it's important to understand how Local Offset, Explicit Rotation and Variance Rotation Site Operations work as a large part of combined models involves them. To help visualize, open any unit in the previewer and move the camera until you are facing the front of your unit. Now overlay the the coordinate system in your mind and that's how these Site Operations will base their directional adjustments.

Local Offsets

This Site Operation moves objects in any direction while preserving its facing and rotational axis. Using the objects original point as the origin:

+X is right of the object, -X is left of the object
+Y is towards/into the object, -Y is away from/out of the object
+Z is above the object, -Z is below the object

One thing to note is that while it preserves its rotational axis, some anchor (attachment) points will actually tilt this axis to align it with the plane it's attached to. In other words, if you attach it to a surface that's at a 45 degree angle to ground, the attached model will also be at a 45 degree angle. Thus it's important to pick the right anchor point to move from before applying offsets.

Explicit (Static) Rotation

This Site Operation changes and locks an objects facing and/or rotational axis. The directions from offsets are the same, but instead of moving the object you are going to create new vectors. Forward is the facing vector and Up is the rotational axis vector. Some examples:

Face North
Forward - (X: 0.0,Y: 1.0, Z: 0.0)
Up - (X: 0.0,Y: 0.0, Z: 1.0)

Face Up
Forward - (X: 0.0, Y: 0.0, Z: 1.0)
Up - (X: 0.0, Y: 0.0, Z: 1.0)

Face South West
Forward - (X: -1.0, Y: -1.0, Z: 0.0)
Up - (X: 0.0,Y: 0.0, Z: 1.0)

Tilt West
Forward - (X: 0.0, Y: 1.0, Z: 0.0)
Up - (X: -1.0, Y: 0.0, Z: 0.0)

Tilt North East
Forward - (X: 0.0, Y: 1.0, Z: 0.0)
Up - (X: 1.0, Y: 1.0, Z: 0.0)

Flip Upside Down
Forward - (X: 0.0, Y: 1.0, Z: 0.0)
Up - (X: 0.0, Y: 0.0, Z: -1.0)

It's important to note that the actor won't rotate with its host if used on attachments. In order to function like an attachment should, you must enable Local. If you do not, the rotations will be use the map coordinates instead of the unit's facing as a reference.

Variance (Dynamic) Rotation

Unlike Explicit Rotation, this Site Operation does not change a units facing or rotational axis. Instead, it changes its relationship with its existing facing and axis. More specifically, it allows you to tilt a unit away from its facing/axis without being locked in that direction. This makes it ideal for attachments to mobile objects. While still facing your unit, the Up Angle tilts it to the left of its axis and the Forward Angle tilts it up from its facing. Given that both fields are only angles, it's pretty easy to tilt as desired once you understand what direction you are tilting.

One very important disclaimer is that this Site Operation is currently very buggy. Sometimes the angle will tilt the object in the opposite direction which is bad for Forward Angles as it puts their face in the ground. If used with other Site Operations, especially if you attach to an anchor, the model will slowly "fall" into the ground as the object moves about. This can be especially frustrating if you have the perfect setup and suddenly the attachment droops. That being said, be sure to test repeatedly to make sure you achieve the desired effect. As of now, I don't know any way to ensure 100% success and I suspect it's just another area of the editor Blizzard isn't finished fleshing out.



The Uberlisk

First and foremost, I have not included the Uberlisk's abilities because they are not related to the tutorial and would just be extra work. I am willing to update the tutorial by attaching a 2nd map that has the abilities incorporated if this is the popular demand, but I won't be adding them to this tutorial. In a future tutorial I might pull that map off this thread and create an Actor/Ability tutorial that walks through making those abilities for the Uberlisk you've already created with this tutorial. I won't make any promises at this point in time, however. For now, focus on the Hosting and Site Operations as those are what allow the Uberlisk to function.

Effects Tab

(Because we have a lot to make I'll be having you duplicate frequently.)

Simply match the Damage to its Missile. We'll come back and pick our ammo unit later on.

Models Tab

Weapons Tab

Damage Point determines when during the period a weapon attacks. By layering them like this the attacks will attack consecutively rather than in one volley

Units Tab

Duplicate Ultralisk and check the following boxes:

Ultralisk

Start by renaming the Ultralisk model Uberlisk. Go on to rename the actor Uberlisk and the weapons Kaiser Blades ("Uberlisk -" in the Editor Prefix field) and Head Attack ("Uberlisk -" in the Editor Prefix field). Now delete any abilities, command card buttons or behaviors you don't want and decide on your stats (HP, armor etc). Finish by renaming the unit Uberlisk and the effects Cleave (Damage) ("Uberlisk -" in the Editor Prefix field) and Head Attack (Damage) ("Uberlisk -" in the Editor Prefix field).

Go to the Kaiser Blades weapon

It's important that Backswing is 0.0 because this number determines how the unit can fire any of its weapons after using this weapon. If it's anything but 0.0, other weapons used after it will be delayed. It's also important to uncheck Linked Cooldown so that multiple weapons can fire at once.

Go to the Head Attack weapon


Actors Tab

Because we have a lot of actors and each one has an important role, we're going to divide this tab into multiple sections so that we can better understand what is happening.

Site Operation Actors

These two actors are going to "anchor" our Spine Crawlers to the Uberlisk's attachment points so that they move with its animations. Without these, the attached actors will just float in the air where you put them while following the Uberlisk around. We won't need to make one for each Spine Crawler because these simply pick the starting point and the angle relative to the Uberlisk.

These actors are what move the Spine Crawlers from their anchor point. I've already done the tweaking part, but normally you would guess where you want them and then slowly nudge them until you've got the model where you want it. By combining these actors you can move a model anywhere along the Uberlisk's head. If you want another part of the body, simply change the anchor point and adjust the offsets.



Model Actors

Now there is currently a bug that prevents you from adding a SubName to Signal events. So we're going to have to manually edit them with Raw Data View. Press Ctrl + D and double click on Events +. This will now allow you to type anything you want into this field. Find both instances of "Signal" and change them to "Signal.*.Returned" so that the event will work properly. Once finished, press Ctrl + D again to clear Raw Data View. DOUBLE CHECK THAT YOU MADE THE CORRECT CHANGES. Now it's time to explain what all the Hosting fields and Signals are for.

Host + determines what the actor will attach itself to. By adding the alias _Unit, this actor will find an actor with this alias (in our case the Uberlisk) and attach itself when it is created. You DO have the option of picking a specific actor and sometimes this is better than using aliases. A good example would be when you are attaching multiple objects together that share aliases. If your main model has _Unit and the first attachment has _Unit, the next attached model might be confused on which to attach to and end up attached to the wrong model. Specifying the actor helps avoid this.

Host Site Operations + determines where on the "Host" actor this actor will attach itself. The Site Operations we have tell the unit to anchor itself at the given location and then adjust itself by the given values. This puts our Spine Crawler where it needs to be. It is VERY important that you include a space between each operation otherwise it won't stick when you click ok. Furthermore, the ONLY way to use multiple Site Ops is by using a space between them. Many mappers have made the false conclusion that you can't use more than one Site Op because they didn't figure out that you have to use a space instead of a comma or semi-colon. Don't let this be you!

Hosted Attachments + is somewhat complicated, but the basic idea is that it allows the actor to be a reference point for other actors. In our case, it will allow the Tentacle's attack actor to animate the "stretch" attack. Without this hosted attachment, the tentacle won't stretch to the target at all. It will just "wiggle" a little each attack. Additionally you can use this field to create multiple reference points for complex multi-attachment units.

Lastly, Signal's are how the Tentacle Missile and the Spine Crawler will communicate. One event will tell the Spine Crawler to play an animation every time it receives the signal named "Returned" and the other will clear the reference point (the Hosted Attachment) after each attack. If you don't clear the reference point after each attack, all animations will work as intended, but after attacking the tentacle will be pinned to the air above where the Spine Crawler is until it attacks again. If there is nothing to attack, it will stay there while you walk away to another target, stretching the entire way until it has an opportunity to attack something. (If your missile doesn't return, you don't need signals!)

This duplication process is the most common source of errors for this actor and all following actors. Be sure to double check that you have associated all L1s with L1s, L2s with L2s and so forth at each step so that your tentacles will attack properly.



Site Actors

This particular actor is what will allow your tentacle to fire from location we want. It attaches itself to the Spine Crawler actor at the given anchor point. This anchor point is where an actual Spine Crawler's tentacle originates from so naturally we want our tentacles to originate from this point as well.



Missile Actors

These events aren't your typical events, but they are very important. Motion Phase Start is how your missile will reference the Spine Crawler it shoots from, allowing it to stretch from the hosted attachment (SpineL1Tentacle) to the target. Once it reaches the target, Missile Tentacle Return is what allows the tentacle to retract back to the Spine Crawler. Without this it will simply stretch out and "pin" itself to the target, twitching periodically to signal attacks. Knowing this, you can actually use this to purposely pin targets with this animation so long as you ensure that the missile only fires once. Then you can have Missile Tentacle Return action occur when the effect that immobilizes the target ends. Thus the missile fires, sticks the target which is immobilized by an effect and then retracts when the effect ends or the target dies. Think "Neural Parasite" but without that annoying infestor.

Host Return + is simple. This is the actor the tentacle returns to. Without this the tentacle might drag along the ground, shoot off screen or any number of things depending on what you have and haven't setup correctly. (If your missile doesn't return, skip this!)

Host Return Site Operations + is how you specifically pick what part of the actor the tentacle returns to. If you've specified the host return but not the Site Op then your tentacle will, again, drag along the ground awkwardly. Limp tentacle is a serious problem >:( (If your missile doesn't return, skip this!)

Host Supporter + there isn't really a great way to explain what this does exactly as it has a lot of uses, but with our Uberlisk, this is how you let the events that target "::Supporter" know what actor you're talking about. Even if you pick the actors attachment, you still need this to complete the "reference." If the hosted attachment is one board and the missile actor is the board you want to attach to it, the host supporter is the nails/screws that hold them together. Event if you put them side by side and they know what to do, they won't stick together without it. (If your missile doesn't return, skip this!)



Attack Actors



Wrapping Up

At this point it's a good idea to double check everything. All your data objects should be created so quickly flipping through and making sure they only reference other data objects with the same L# or R# is easy to do. Save your map, throw some victims on the map and unleash your Uberlisk! :D

If you encounter problems that you can't fix, let me know about it here and we'll figure out what happened.



Feel free to use the attached Test Map or contact me via forum post, PM or IRC (#SC2Mapster on chat.freenode.net:6667) if you encounter problems. Keep in mind that I'm a busy person so I may not reply right away, but I'll do my best to answer all questions/concerns that I am aware of :)








Star Depot
Contact      Login