How to - Attach Weapons without Modelling

konerboy

Run piggy Run!
Reaction score
95
.
.
.
.

[tutorial]how to attach weapons to units that allready have weapons without modelling


I noticed allot of people didn't know how to do this and some thought it was impossible to do this without modeling. then i decided to write this tutorial. enjoy. plus i have added the final map if anyone need to see it through.

credits:

Lord_T for his awesome dragon sword that i used all along.

Chapter 1 removing Weapons



  • Step 1: removing the existing weapon

  • Step 2: converting and importing


things you need for chapter 1:

  • Warcraft 3 Frozen throne
  • a image editing program that can edit and save in Tga. Format ( I will guide Photoshop users)
  • Wc3 extractor
  • warcraft 3 viewer or any other program that can convert Tga. To blp.


Chapter 2 different ways of attaching weapons

  • a. make a ability so that the attachment will be on the hero/unit forever
  • b. when the Hero picks up a item he will get the attachment

  • c. when the hero uses an ability he will get the attachment on

  • d. when the hero uses an AOE ability units around it get's a attachment

  • e. when you finnishes a upgrade all units change weapon


things you need for chapter 2:

the only thing you need for completing chapter 2 is

  • Warcraft 3 Frozen throne



Chapter 1 removing Weapons





Step 1: removing the existing weapon


Open up your Wc3 extractor and locate the unit you want to add weapons to save the skin. in this case im going to use Illidan Evil (textures\illidan.blp)

Open the picked skin (your skin.blp) with your image editing program

Illidancopy.jpg



Now we need to make the existing weapons disappear we are going to do that by using alpha channels. Locate the weapons/weapon parts, this Illidan model only have 2 weapon parts the blade and the panda seal. Grab your marking tool and mark closely the weapon parts.

Illidan2.jpg


When this is marked go to the alpha channel... Photoshop users should press Ctrl + 4

Alpha channel menu example

images


My Illidan skin's alpha channel looks like this

Illidanalpha.jpg


Alpha channels are used to cut unnecessary things out, example in this panda seal the artist didn't wanted the black square around it into the model.

Back to work..

grab a pencil/brush and paint the marked area black like this.

Illidanalpha2.jpg


now the graphics is done. now we need to convert and import this new skin.


step 2: converting and importing


open Wc3 viewer and press "Convert files --> bmp, tga or jpeg --> blp."
choose "your skin.tga" and save it as a Blp. file.

Now we need to import our new modified skin, start your World editor and go to “import manager” then “import file” browse through your computer and find the skin.
I hope you remember the path for the unit because you’re going to need it now, if not then open Wc3 extractor again use the search function to find the path faster.

Check the “use custom path” bottom and write the path that fits with your skin, in my case it’s “Textures\illidan.blp”

withoutweapons.jpg


Yahoo we successfully removed the weapons from this illidan model. If there are anything floating around where the weapon should be you should try to locate those thing and remove them from you Tga. File, remember every time you edit the Tga. You need to convert it to Blp. One more time and import it again.
If nothing is gone from the weapon you have entered the wrong path, try to locate it again or post here so I can help you find it.

If you already know how to attach a weapon to a unit then this is the end for you.



Chapter 2 different ways of attaching weapons

if you wanna see a video instead of reading this video show you how to make a ability with attachment points.

[YOUTUBE]7mGKW4lU94s[/YOUTUBE]
http://www.youtube.com/watch?v=7mGKW4lU94s

Attachment Points for units

first you need to get a little idea of where you can set your attachments, here are some examples and explanations

attachmentpoints.jpg


overhead (floats over the heroes head, but it dosn't follow the unit)
head (used for mask/helmet for the unit)
chest (the center of the unit, used for armors/capes/jetpacks/wings)
hand (used for weapons and shields) Left,hand for left hand and right,hand for right
foot (used for nearly nothing... uses the left and right foot like hand
orgin (the place depends but it's mostly beneath the unit betwen the feets, used for auras)
weapon (for heroes)



now you have 5 choices to make different ways to attach those attachments

before you start make sure you make the ability below. we need it for all of them.

  • a. make a ability so that the attachment will be on the hero/unit forever
  • b. when the Hero picks up a item he will get the attachment

  • c. when the hero uses an ability he will get the attachment on

  • d. when the hero uses an AOE ability units around it get's a attachment

  • e. when you finnishes a upgrade all units change weapon


things you need before continuing :

a model of an attachment.models
if you wanna follow this tutorial i suggest you take a thing you can attach to the hands (sword,shield,club)


Attachment ability

All the ways require that you make this ability.
import your attachment and everything that comes with it, I’m going to import this Dragon Sword and write the path that followed (in most cases it’s “textures\your attachment.mdx”)

Save your map and re-open world editor (we do this so the weapon loads)
Hit the object editor (F4) and change to the tab “abilities” now we should get a base ability,
it could be anything but it’s faster with “sphere” search or locate the ability “sphere” copy it and paste it,
now you see a new ability called “sphere” appears in the bottom that’s our new ability change the name to whatever im going to call it “dragon sword”

dragonbladeatc.jpg



Now we need to change the value’s and settings in this ability, start of by changing the “art – attachment points” to 1 or 2 attachments (if you want a one-handed weapon choose one, if you want 2x one-handed choose 2.

It’s not possible to make a unit wear a two-handed weapon in 2 hands, only special units can do that

Now change the art-target to “YourAttachment.mdx”

Hopefully you can see that there are 5 slots called “art- attachment points 1 -5” clear nr 3 (and nr. 2 if you only need a weapon in one hand) by double clicking on it and delete the existing strings. Now it’s time to write the strings to make the weapon appear on the units hand,

start with “art- attachment points 1” change the string to “right,hand” (or left if you want to) and if you want the weapon in both hands change the value in “art- attachment points 2” to “left,hand” now the ability “Dragon blade” is finish.


a. make a ability so that the attachment will be on the hero/unit forever


ability.jpg


now we need to give a unit this ability. Change the tab back to “units” and pick a existing unit or create a new one, go to your unit and find “abilities –normal” double click and “add ability” change the list to custom and find your attachment ability.
You can only see the attachments in game, so don’t go nuts when it doesn’t appear in world editor.

succes2dragon.jpg

Success!!


b. when the Hero picks up a item he will get the attachment

that can be done with a simple trigger

Swordonpickup.jpg


Code:
Dragon sword on pick up.
  Events
   Unit - A unit Acquires an item
  Conditions
   (Item-type of (Item being manipulated)) Equal to Claws of Attack +15
  Actions
   Unit - Add Dragon Sword to (Triggering unit)


and we also need it to disappear when he drops it again

Swordoffdrop.jpg

Code:
 Disappering dragon sword on drop

 Events

 Unit - A unit Loses an item

 Conditions

 (Item-type of (Item being manipulated)) Equal to Claws of Attack +15

 Actions

 Unit - Remove Dragon Sword from (Triggering unit)


c. when the hero uses an ability he will get the attachment on

this trigger gives the attachment to the unit who cast "roar" and in this case we also need it to go away when the buf disappears, for this you need a "unit variable" in this case im gonna call it "RoarWeapon"


Swordonability.jpg


Code:
dragon sword on ability

 Events

 Unit - A unit Begins casting an ability

 Conditions

 (Ability being cast) Equal to Roar

 Actions

 Unit - Add Dragon Sword to (Triggering unit)
 Set RoarWeapon = (Triggering unit)
 Trigger - Turn on Dragon sword on ability off <gen>

"Dragon sword on ability off" should have intially of, check the "itially on" box so its off.

Intially.jpg




Dragonswordonabilityoff.jpg


Code:
Dragon sword on ability off

 Events

 Time - Every 0.01 seconds of game time

 Conditions
 Actions

 If (All Conditions are True) then do (Then Actions) else do (Else Actions)

 If - Conditions

 (RoarWeapon has buff Roar) Equal to False

 Then - Actions

 Unit - Remove Dragon Sword from RoarWeapon
 Trigger - Turn off (This trigger)

 Else - Actions

 Do nothing

d. when the hero uses an AOE ability units around it get's a attachment


this can be done in two ways depending on how you like it, and they work exactly the same.

i used Roar as base but i changed the it so it didn't add'ed more damage.


the first is only controlled by triggers

SwordAOE.jpg


Code:
Roar AOE On

 Events

 Unit - A unit Begins casting an ability

 Conditions

 (Ability being cast) Equal to Roar

 Actions

 Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit))) and do (Actions)

 Loop - Actions

 If (All Conditions are True) then do (Then Actions) else do (Else Actions)

 If - Conditions

 (Owner of (Picked unit)) Equal to (Owner of (Triggering unit))

 Then - Actions

 Unit - Add Dragon Sword to (Picked unit)
 Set DragonBuff = (Picked unit)
 Wait 5.00 seconds
 Unit - Remove Dragon Sword from (Picked unit)

 Else - Actions

 Do nothing

the second way is used by abilities.

when the unit gains a buff, the weapons will attach, and when the buff disappears, the weapons also do.
Copy the Roar ability and make a new edited version.


Roar ability.

Roarforeeverability.jpg


Buff.

ROARforeeverbuff.jpg


Succes!!

AOEroar.jpg





e. when you finnishes a upgrade all units change weapon

make a new upgrade or change a old one, i made a upgrade called "Dragon swors" and it didn't do anything without triggers, so we are going to make this trigger.

SwordonUpgrade.jpg


Code:
  Sword after upgrade

 Events

 Unit - A unit Finishes research

 Conditions

 (Researched tech-type) Equal to Dragon swords

 Actions

 Unit Group - Pick every unit in (Units of type Villager (Male) dragon cool boy) and do (Actions)

 Loop - Actions

 Unit - Add Dragon Sword to (Picked unit)


you can change the "pick" action to something else if you want to.


end of chapter 2.



C & C are welcome, feel free to post if there are any problems.
 

Attachments

  • attachments.w3x
    139.8 KB · Views: 579
Reaction score
456
First of all, title has to be changed.

+Pictures
-Grammar

So what to do, read your tutorial once again, correcting grammatical errors. And one thing I have to mention is that title is more interesting if every words' first letters are written in caps, except prepositions.
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
Great, finally someone has made a tutorial for this, too bad it didn't exist when I didn't knew about this >_<. I really like the picture of the worker that shoes the attachment points, if you could do that for buildings as well it would be awesome. (You know this sprite stuff and so on, though I guess they are different for each building, but at least an example would be very, very nice)

I tend to give you +Rep, but I yet wait until it becomes even better ;)

To all: Is there a way to edit alpha skinns with GIMP?
 

Sim

Forum Administrator
Staff member
Reaction score
534
> If there are anything floating around where the weapon should be you should try to locate those thing and remove them from you Tga. File, remember every time you edit the Tga. You need to convert it to Blp. One more time and import it again.

What's with these (this?) sentences? They just aren't written normally. Reformulate the whole of it. A dot occurs at the end of a sentence, not right in the middle of it. Oh and a dot is also not a comma. :p

Throughout the tutorial it's sometimes hard to follow you. Make sure you explain things better.
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
That's a really nice tutorial!

I think he meant things like .tga and .blp, not Tga. and Blp. :p

Though I agree it sounds... funny :p

Am I the only one that can't view the video?
 

Sim

Forum Administrator
Staff member
Reaction score
534
> Am I the only one that can't view the video?

Welcome in the Club.

> I think he meant things like .tga and .blp, not Tga. and Blp.

You're probably right. No wait, I hope you are. :)
 

konerboy

Run piggy Run!
Reaction score
95
> Am I the only one that can't view the video?

Welcome in the Club.

youtube is
minismileycopy.jpg
up, right now


I know that, I have issues with comma when I'm writng english, but it's only in english not in my own language, and we use the samme comma. :banghead:

I think they are wroten normally it's just a lack of commas
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
589
Missing an attachment point, origin. (Where auras go)
Other then grammar issues, awesome.
+rep
Also, Image Extractor can save .blp's as .tga's.
You just need to add the .tga at the end of the file name.

WC3 Image Extractor II
 

Sil3nt

SUP?
Reaction score
134
Maybe you could add in the difference between weapon,left and hand,left. The weapon makes it so that the item actually follows the direction of the hand. I tried it with a unarmed marine with a sniper attachment, With hand,left the gun was always pointing forward, with weapon,left the gun was pointingto a side and when the unit fired it aimed forward. This was a while ago so you might want to test it out first.
 

konerboy

Run piggy Run!
Reaction score
95
well there is no way to show that all the unit have different attack animations and ofcoure some of them would look stupid with attachments.
 

Kenoriga

Ultra Cool Member
Reaction score
34
Very nice! +rep.
Just take note of grammar errors, and it is spelt Origin!
And your trigger tags look funny.
 

Sim

Forum Administrator
Staff member
Reaction score
534
> Unit - A unit Begins casting an ability

Starts the effect of an ability.

Sentences start with a capital letter.
 

Kingdom

New Member
Reaction score
0
Ohhhh, dude you're a god and i love you!!! <3<3<3<3

hehehe, i just found this system in a map named Master Crafters Final Conquest and was looking how to do this. Too bad the map itself could be improved A LOT and the creator discontinued the project.

Thanks!
+ rep, great tut :thup:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top