So I've spent the day attempting to get up to speed with the Galaxy Edit and couldn't help but notice something. I've also noticed that all the tutorials I've read in regards to Unit and Hero creation do not cover what is going on, and what everything is; they just explain how to do a specific task. I'm a theory guy, I'd rather learn the underlying theory and then formulate my own methods based on those theories.
In Unit and Hero creation, it seems as if Blizzard is using some kind of data abstraction method, much like the Pawn and Actor system that Unreal Engine uses. In Unreal engine, the "Pawn" is the visible avatar that you see rendered by the rendering engine, and is by Unreal terminology an actor. The "Controller," such as "uPlayerController" and "uAIController" are objects that "posses" the pawn, and is what governs its actions.
Now my question is how does the Actor relates to an actual unit in Galaxy Edit (of which I'm just gonna call Galaxy)?
A unit is the actual unit with health and attacks and abilities. An actor is a model/animation/graphic that can represent anything in the game. In other words, everything you can "see" in SC2 is an actor.
There is actually a great function in the editor you can use to help you with this. When you select a unit in the data editor, the structure of the unit is shown in bottom left by default. You can actually right click on anything there, say the actor and click "Explain Link". This will show how it links back to the unit.
For example, select the Marine Unit. Right click on the "Marine Attack" actor and press explain. It will show you that this particular actor links to the gauss rifle damage, which links to the Guass Rifle effect, which links to the Weapon, which finally links to the unit.
Now it is ALOT more complicated than the Wc3 editor to setup units, however it's also alot more flexible. It's not necessarily difficult but it does have a bigger learning curve.
After playing around, a basic unit works something like this.
The Unit has a reverse-linked Actor (call it Unit Actor)
The Unit has a linked Weapon
The Unit has some of it's own settings including Health, Movement Speed etc.
The Unit Actor controls the models, animations and sounds of the unit
The Weapon has it's own settings, sounds, effects, and also is reverse-linked to an Actor.
I say reverse-linked for the unit actor, because you actually need to create the actor and tell it what unit/weapon it belongs to. You can't actually have one actor that belongs to multiple units. Wheras with weapons, you select which weapon the unit uses, and more than one unit can use the same weapon.
So as mentioned above, actors are used everywhere, and I think it is a bit confusing because of the way they are linked. Rather than selecting a unit and choosing it's actor, you actually select the actor and choose its unit/weapon.
This is the kind of information I'm looking for, like how do different pieces of the data editor relate to each other, I've figured out as much as that Units have weapon(s) weapons have actors and actors have effects which can in turn have more effects. I also understood from trial and error that the unit must also have an actor but not until I read this I actually understood that it is the actor that has the unit. Why would they turn that one around anyway? And where does behavior come into play?
Perhaps I should start a new thread for this but I feel it is kinda related to this.
I have an idea for a map but before I even start I want to know how to properly create units, for the most part I think I can use existing units but in same cases I would like to create a few new ones. For example I want to have 3 types of marines; one normal, one shooting bc lasers and one shooting voidray beam. The first problem seems to be related to this question: what do I need to do to copy a unit, make it completely customizable and have it show up visually in both the editor and the game. To make it really simple: what it the very least you have to do to display a new unit (without any customization). I've actually succeeded at this but to duplicate the complete unit and just duplicate the unit+actor and using as much as possible from the original unit.
The second problem on how to change weapon properly; I can easily change the weapon to any existing weapon such as the BC ATG or ATA laser battery but then it isn't possible to customize that weapon without customizing it for any other unit that is using it (such as the battlecruiser), so I've tried to copy the weapon and there I usually run into problem which seems to be very similar to the unit copying problem, the effects (both visual and actual) seems to disappear and it has been quite troublesome to get them to show up, even though I have through trial and error succeeded at that too.
The bottom line of the problems I have are that although I have managed to get close to the effect I wanted I'm not sure what it was that I did that did what I wanted to do so it is really difficult to replicate it.
And for now I will not even start with the voidray beam, it is at another level of editing and I will read some of the ideas on the forum before I ask more about that.
Actors are objects that can show models, effects, sounds etc. But they need to know where and when to show them self. Thats why you have events in each actor to set when to draw what and where ;)
You can create unit without model. It will exist and you can even select it (I think). Actor can draw you something where this logical unit is on the map.
So Unit is a logic structure and actor is a graphic/sound/... visualization.
This is also the kind of thing I need to fully understand.
Can someone please verify if these statements are correct? I'm having a nightmare getting my custom units to have models rendered on screen:
1) Units do not define what is rendered on screen to represent themselves, this is defined by an actor to which it is linked.
2) Actors (1) -> (Many) Units.
If these are correct, then which fields for which objects define the links?
So far I have been unable to deduce this from looking at Blizzard's default stuff (to a satisfactory degree anyway).
My default approach for actors - a sad necessity atm - is to duplicate them all when I duplicate a basic unit from which I define my custom unit. The problem with this is that I end up with masses of actors with nonsensical names that can even crash Starcraft if there's too many (or some other issue emerges), as per the post I just wrote in the post-1.1 patch thread.
I am greatly appreciative of any help folks can give me in this area.
When you duplicate things such as weapons or units, generally the actors are not modified correctly to match the units/weapon names.
You could try duplicating for the actor since the actors are the Top level of the data hierarchy. ( but im not sure if that works.)
If you turn on raw data and look at a units actor. At the top there is a value called Unit ID this is the ID of the unit that the actor is suppose to react to.
This ID is then used in the ACTOR EVENTS.
The ACTOR EVENTS are pretty amazing they can do alot of things heres a quick list but not limited to...
Create Models on things such as units, weapons , effects, terrain,
They can actually create other units
they make things look pretty
They can tint the standard textures of models
They can Destroy units/ other actors
They can determine where a model will be attached to other actors/ units
the list goes on and on (im still learning myself)
But With unit actors generally the Unit ID is used as a variable in the ACTOR EVENTS and because it is wrong after the duplication process you have to change it manually. They may be fixing this with newer patches who knows.
On other Actors when they are duplicated such as actors for effects, you may need to manually change the events to use the new /effects/behaviors ID's.
I suggest you take a look at making a dummy behavior for a unit and then create an actor that shows a model on a unit with the dummy behavior on it. My process of learning how to make a buff with a model for it, taught me a lot about how actors work.
Thanks Soul!
Tokens!
The fucking quasi-visible tokens with the "unitName" field is the penny-drop key I've needed to the whole mess my data was in.
I do NOT like the 'Duplicate Object' wizard at all.
This tutorial helped a lot, too: http://forums.sc2mapster.com/resources/tutorials/5096-data-creating-new-units-easy/#posts
The sense of BlackMagic:Logic is starting to tip the right way ;)
I will do my best to follow your footsteps regarding actors/behaviours, too.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
So I've spent the day attempting to get up to speed with the Galaxy Edit and couldn't help but notice something. I've also noticed that all the tutorials I've read in regards to Unit and Hero creation do not cover what is going on, and what everything is; they just explain how to do a specific task. I'm a theory guy, I'd rather learn the underlying theory and then formulate my own methods based on those theories.
In Unit and Hero creation, it seems as if Blizzard is using some kind of data abstraction method, much like the Pawn and Actor system that Unreal Engine uses. In Unreal engine, the "Pawn" is the visible avatar that you see rendered by the rendering engine, and is by Unreal terminology an actor. The "Controller," such as "uPlayerController" and "uAIController" are objects that "posses" the pawn, and is what governs its actions.
Now my question is how does the Actor relates to an actual unit in Galaxy Edit (of which I'm just gonna call Galaxy)?
@DarkWarrior45: Go
A unit is the actual unit with health and attacks and abilities. An actor is a model/animation/graphic that can represent anything in the game. In other words, everything you can "see" in SC2 is an actor.
@shardfenix: Go
Thank you, I was thinking that was it, but wasn't exactly sure.
There is actually a great function in the editor you can use to help you with this. When you select a unit in the data editor, the structure of the unit is shown in bottom left by default. You can actually right click on anything there, say the actor and click "Explain Link". This will show how it links back to the unit.
For example, select the Marine Unit. Right click on the "Marine Attack" actor and press explain. It will show you that this particular actor links to the gauss rifle damage, which links to the Guass Rifle effect, which links to the Weapon, which finally links to the unit.
Now it is ALOT more complicated than the Wc3 editor to setup units, however it's also alot more flexible. It's not necessarily difficult but it does have a bigger learning curve.
After playing around, a basic unit works something like this.
The Unit has a reverse-linked Actor (call it Unit Actor) The Unit has a linked Weapon The Unit has some of it's own settings including Health, Movement Speed etc.
The Unit Actor controls the models, animations and sounds of the unit The Weapon has it's own settings, sounds, effects, and also is reverse-linked to an Actor.
I say reverse-linked for the unit actor, because you actually need to create the actor and tell it what unit/weapon it belongs to. You can't actually have one actor that belongs to multiple units. Wheras with weapons, you select which weapon the unit uses, and more than one unit can use the same weapon.
So as mentioned above, actors are used everywhere, and I think it is a bit confusing because of the way they are linked. Rather than selecting a unit and choosing it's actor, you actually select the actor and choose its unit/weapon.
@KratsAU: Go
This is the kind of information I'm looking for, like how do different pieces of the data editor relate to each other, I've figured out as much as that Units have weapon(s) weapons have actors and actors have effects which can in turn have more effects. I also understood from trial and error that the unit must also have an actor but not until I read this I actually understood that it is the actor that has the unit. Why would they turn that one around anyway? And where does behavior come into play?
Perhaps I should start a new thread for this but I feel it is kinda related to this.
I have an idea for a map but before I even start I want to know how to properly create units, for the most part I think I can use existing units but in same cases I would like to create a few new ones. For example I want to have 3 types of marines; one normal, one shooting bc lasers and one shooting voidray beam. The first problem seems to be related to this question: what do I need to do to copy a unit, make it completely customizable and have it show up visually in both the editor and the game. To make it really simple: what it the very least you have to do to display a new unit (without any customization). I've actually succeeded at this but to duplicate the complete unit and just duplicate the unit+actor and using as much as possible from the original unit.
The second problem on how to change weapon properly; I can easily change the weapon to any existing weapon such as the BC ATG or ATA laser battery but then it isn't possible to customize that weapon without customizing it for any other unit that is using it (such as the battlecruiser), so I've tried to copy the weapon and there I usually run into problem which seems to be very similar to the unit copying problem, the effects (both visual and actual) seems to disappear and it has been quite troublesome to get them to show up, even though I have through trial and error succeeded at that too.
The bottom line of the problems I have are that although I have managed to get close to the effect I wanted I'm not sure what it was that I did that did what I wanted to do so it is really difficult to replicate it.
And for now I will not even start with the voidray beam, it is at another level of editing and I will read some of the ideas on the forum before I ask more about that.
Actors are objects that can show models, effects, sounds etc. But they need to know where and when to show them self. Thats why you have events in each actor to set when to draw what and where ;) You can create unit without model. It will exist and you can even select it (I think). Actor can draw you something where this logical unit is on the map.
So Unit is a logic structure and actor is a graphic/sound/... visualization.
@DJSplendid: Go
When you duplicate things such as weapons or units, generally the actors are not modified correctly to match the units/weapon names.
You could try duplicating for the actor since the actors are the Top level of the data hierarchy. ( but im not sure if that works.)
If you turn on raw data and look at a units actor. At the top there is a value called Unit ID this is the ID of the unit that the actor is suppose to react to.
This ID is then used in the ACTOR EVENTS.
The ACTOR EVENTS are pretty amazing they can do alot of things heres a quick list but not limited to...
the list goes on and on (im still learning myself)
But With unit actors generally the Unit ID is used as a variable in the ACTOR EVENTS and because it is wrong after the duplication process you have to change it manually. They may be fixing this with newer patches who knows.
On other Actors when they are duplicated such as actors for effects, you may need to manually change the events to use the new /effects/behaviors ID's.
I suggest you take a look at making a dummy behavior for a unit and then create an actor that shows a model on a unit with the dummy behavior on it. My process of learning how to make a buff with a model for it, taught me a lot about how actors work.