• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Data] Creating Units, weapons, and more

Level 8
Joined
May 26, 2007
Messages
214
This tutorial is currently outdated. Some parts of it may be viable still, but I will be updating it to be more accurate.

Getting Started
Before we get started with creating the unit, first you should check and make sure your data editor's settings are similar so you go through this guide with ease.
kb2Dlz22.png


What You Will Learn
  • How to create a unit
  • How to create an actor
  • How to associate the actor with a unit
  • How to create shooting animations for your unit
  • How to add sound to your unit
  • How to create a weapon and effect for your unit


Information
This post will be updated later with a library of field values in the data editor for you to work with.

Creating The Unit
To begin the tutorial, you're going to need to open your Data Editor and open the Units data type. Next, click the data dropdown menu (or right click in the data list), and add a new object. The unit for this tutorial will be based off of a Marine.

vNfFbiAO.png


Be sure your fields match the image above, if you wish to choose another unit change the field values setting to whichever unit you would like to base your new unit off of. Hit OK and your new unit will be created.

There is no model or sound information for your unit now, so that will be done in the next step.

Creating The Actor

Open the Actors data type, and now add a new object again.

IrBRQ9UB.png


Be sure your fields match the image above. Hit OK.

Now that you created the actor, you will need to link your actor to your newly created unit. As before, the unit in this tutorial was called UnitTest and it is based off of the Marine.

LAji4gSM.png


Change the field value for the unit name to your newly created unit, and scroll down to Art - Model, and adjust the model to the unit you chose. If you chose the Marine like I did, choose Marine and set it for Art - Model, Art - Model (Build), and Art - Model (Placement).

This is optional, but your unit does not have any sound. So scroll down to Sound - Group Sounds and Sound - Sounds and adjust your unit's sound to the unit you chose just like you did for the model. In this case, I set it to the marine.

cnoutB3Y.png


Now to move on to creating new weapon for your unit!

Creating The Weapon

This part of the tutorial will teach you how to create a weapon and adjust the damage of your weapon. Go to the Weapons data type, add a new object.

G86uz5wc.png


Be sure your field values match the image above.

Next, go to the Effects data type, and add a new object. You can name them the same if you want, it doesnt really matter what any of the objects are named.

BMo5EnPn.png


Be sure your field values match the image above.

Now go to your newly created effect and set the damage for your weapon at the Combat - Amount field value. You can choose any number you wish, and remember all units affiliated with this weapon will deal that much damage.

FE2hQdFr.png


Now we're going to go back to our weapon, so go to the Weapons data type. Go to your weapon you created earlier, and adjust the Effect - Effect field value to your newly created effect. This will change the damage your unit deals. Afterward, change the UI - Damage Display Effect field value to your newly created effect also. This shows the damage your unit deals on the user interface in the game. You can use the image below as a reference.

ne2OizsE.png


Weapon Attack Animations
Your weapon does not have an attack animation, so if your unit fights with their weapon it wont show any shooting even though they are shooting.

Go to the Actors data type, and add a new object. I chose the Marine earlier so I will base the attack animation off of Marine Attack.

mak8ypw.png


Be sure your field values match the image above.

Now we need to change the Attack Effect field value to the weapon we created earlier. My weapon was called WeaponTest, so the linked weapon will be WeaponTest. Afterward, your unit will have shooting animations and will actually look like they are firing their weapon and not moving their gun around. Use the image below as a reference.

TDekb5k.png


The End
That is the end of the tutorial, if you have any questions feel free to ask. I am willing to update this post with more information and add more than just creating a unit. I will probably slowly turn this into an overall unit creation guide in time. Feel free to post feedback and ask questions. Thanks for reading.
 
Last edited:
Level 4
Joined
Jun 22, 2008
Messages
62
This seemst to be working perfectly, without actually testing it in-game and stuff, making sure everything's allright.
However, in the data editor of my newly created unit, the weapon is still the Gauss Rifle and not the "Pulse Rifle" which was my custom weapon.
What did I do wrong?

Edit: The effect seemst to also be "Marine - Gauss Rifle (Damage)", and not my custom effect.

Edit 2: Where do I edit my stats (hp, energy, regen, armor) for my newly created unit?

Edit 3: Nevermind, found it X_X
Was just my brain playing tricks on me.

Edit 4: HAH! I FIGURED IT OUT!
I'll edit this for a fifth time if it doesn't work. Lol.
 
Last edited:
Level 8
Joined
May 26, 2007
Messages
214
This seemst to be working perfectly, without actually testing it in-game and stuff, making sure everything's allright.
However, in the data editor of my newly created unit, the weapon is still the Gauss Rifle and not the "Pulse Rifle" which was my custom weapon.
What did I do wrong?

Edit: The effect seemst to also be "Marine - Gauss Rifle (Damage)", and not my custom effect.

Edit 2: Where do I edit my stats (hp, energy, regen, armor) for my newly created unit?

Edit 3: Nevermind, found it X_X
Was just my brain playing tricks on me.

Edit 4: HAH! I FIGURED IT OUT!
I'll edit this for a fifth time if it doesn't work. Lol.

Change the stats on the unit itself, you also need to change the weapon on the unit too. If you find anything else I need to add be sure to tell me.
 
Top