Poll

Do you find this overall useful?

Hell yea
It's great!
Great but seen better
Ok
I despise it
So bad I have no word for it

Author Topic: A Twig's Add-On Tutorial [Milkshape3d] - Repost  (Read 2716 times)

Hello and welcome to my basic Add-On making tutorial. I do know for a fact that there are a couple of pre-existing tutorials out there, but this has been requested for me to make one myself.

Getting Started

          This tutorial will show you how to make add-ons with Milkshape3d. To get Milkshape3d; you can download it Here. Now when you download and install; open it up and you should get a screen like this:



Making The Model

          That last part shouldn't of been hard, this shouldn't be either. When you open Milkshape3d you have a lot of options to choose from. For this you will only be using about 5-10% of them; most of them aren't used for this kind of modeling. On the right-hand side you should see a bar with many different buttons and tabs:



To get started; how about we make a sword. Click the "Box" button:



Now to create a box, drag from one point of one of the 3 grey screens, and then stop dragging on another point. You should end up with some sort of box:



          I almost forgot to give the download for the HANDS2 model. It's the two Blockland hands. You can download it Here. We should scale down the box so it actually fits in the player's hand. Go to "File", then click "Merge". Look for where ever you downloaded the HANDS2 model, and when you find it open it. You should get this:



          It still looks weird. I'll get you started by at least having a decent handle. Go to the "Scale" button on the right. Now go to the "Groups" tab on the top:

\

          If "Box01" isn't selected already then double click it. This should/will turn the box on your grey screens red. This means it's selected. Now use the "Scale" tool I told you to click, and just; scale it. It's pretty easy to figure out. Scale it down so that it fits in the player's hand. Once you think you've done it; keep the box selected (red), and now click the "Move" button on the right:



Now drag the "Box01" over into the right hand. Make sure it fits nice in the hand so it doesn't look weird when it's in-game:



We don't need the other left hand anymore. Just use the Select tool, and highlight the left hand; (the one we aren't using). Now just hit "Delete" on your keyboard:



          From here I'm going to let you do whatever you want with the handle. Here's what I did for my sword (you don't have to do it like this).:



Adding Textures

          No one ever wants a colorless model. To get you started; I'm going to give you my texture folder, with around 12 textures to pick from. You can download them Here. To add textures; go to the "Materials" tab on the top:



          Once you get here; click "New". This will give you a fresh blank texture to work with. Now click on the top rectangle box that says "<none>"; on mine it says"Metal 1.png" because I already colored my model. Look for a texture you want; if you downloaded my texture pack then look for mine. Select which you want, and then you got a material. I like to see the color in Milkshape3d; so I click on the "Ambient" and "Diffuse" tabs and set them as the color I loaded. You don't have to do this it's optional. I just recommend you doing the materials without the extra thing I do. If you want to color multiple pieces; then just repeat the steps for as many colors as you desire.

Adding Joints

          This is one of the hardest parts of modeling once you get into more complicated stuff including animation. For this simple model we just need two joints; "mountPoint" and "muzzlePoint".(CAPITOLS MUST BE EXACT) To begin; go back to the "Model" tab, and click the "Joint" button on the bottom. I already did the joints, and they should be set up like this:



          To get them separate; you use the Joint tool, click where you want the first one to be. Now click the Select tool and click somewhere away from your model. Finally go back to the Joint tool and click the second joint and you're done! Reason why you want to use the Select tool to keep them separate is because of this:



Now it's time to rename them so they work in-game. Go to the "Joints" tab on the top-right side of the tabs. When you get there; there should be two joints. joint1, and join2:



          I already have it set as "mountPoint" and "muzzlePoint". When you do this step; make sure the names are EXACT. I can't stress the situation anymore, if you screw it up it's your fault. Rename the one on the handle to "mountPoint" and the one farther out of the blade. That joint tells the .cs file (script file you'll be looking into later) to spawn the projectile at that exact point. Once you've renamed them you're done with joints! Now let me think; is there anything I forgot. Oh yes.

Renaming Groups

          Go back to the Groups tab. You need to rename the groups because when you export, the LOD (Length of Depth) will be set at numbers that aren't good. Your LOD should ALWAYS be set to 0 for weapons. Now double click one of the groups, and then type whatever name you want into the little text box:



          Rename them to your desire. Once you type out a new name, click "Rename" and it's a new name, when you do this make sure you don't use numbers in the names. It will pick up as a LOD. That's it for modeling, we covered joints to the bone, materials to the bone, and the basic tools down to the foundation (exaggeration much? Ohhh.. definitely ..)

Flat Shading

          This step is the second to last step to having a successful model worth using. To start; on the bottom in the Model tab there should be an area called "Select Options". Make sure there is nothing checked under "Vertex" and "Faces". This will make sure that when you highlight in one of the three grey screens, that the program highlights every face, and not just the ones shown on that face (that's why they're called "Back Faces".. dur..):



          Now click the Select tool, and highlight every part of your model. By now your model should have no hands, joints, materials, and is nice and ready to flat shade. Before we begin; go to the Groups tab, and check the box next to "Auto Smooth". Everything should look like this, but with a different model:



                Lastly save your model; even if you have already. You don't want to go back and do half the stuff all over again right? Save it as whatever you want. So go to File, then Save. I think you people should know how to stave stuff. If you don't get out. Don't save after you flat shade.

The next steps are going to be step-by-step, make sure you follow each picture:

Vertex - Unweld



Uncheck Auto Smooth



Tools - Tile Texture Mapper



Cubic - OK



Vertex - Weld Together



Exporting

DO NOT SAVE NOW OR AFTER EXPORTING

          Now that we have a flat shaded model (in case I forgot to mention what flat shading does; it makes the model not glow in-game. If your model was glowing in-game it would look handicapped 100%) it's time to export it. You need to go to:

File - Export - Torque DTS Plus



You should get a window like this:



Once you get this window; Uncheck "Generate .cs file" and "Output dump file" (not required):



          I didn't rename my groups to show you guys how to change the LOD of a group if it isn't 0. Click one of the groups that has a LOD other than 0, and then click the button "Edit" Once you get there you should be here:



Delete the number on the right text box, and replace it with 0:



Now click "OK". Do the same with every other group that has a LOD other than 0. When it's finished it should look something like this:



          Finally you're done editing LOD's. Now click "Export DTS". Once you do that you should get a save box. You can save it as the same name you saved it as (I usually do this), or you can rename it to something else; so you know it's the exported file. In the end it should look like this:



Now click save and it should work! If it has a box pop up like this:



          If that pops up it means that you have two of the same group names. Like if you didn't rename and you used more than one box. You'd have group names like "Box01" "Box02". When this happens; go back, open the save, rename, then do it again.

Packaging

          This part will make it work in-game. You'll need WinRAR for this. You can download it Here. Once you download it; open it up. You'll need WinRAR or 7zip to open it. You can get WinRAR Here. Click "Download WinRAR"; then install WinRAR. Now open up Weapon_ExampleSword; inside you'll find the following:



 Now open up "description.txt" and you'll get this:



          Change Example Sword to whatever you want. Where it says "NAME HERE" and "DESCRIPTION HERE"; you put your name in, and then you put a tiny description of the weapon. When you're done, go to File, then click Save. Next open up "namecheck.txt" Inside you'll see "Weapon_ExampleSword". Just change ExampleSword with whatever you want; then go to File, then Save that. Whenever you save a file in a WinRAR; it'll show a box:



          When this pops up just click "Yes". That will save the file you just saved; otherwise it won't save. So make sure you always click "Yes". Once you've changed those, open up "server.cs". Don't worry; you only need to edit a few things. First go to the top, and click the tab "Edit" and go to "Replace". Once there you'll get this:



In the top box type "ExampleSword", and in the bottom box type whatever your weapon is called. Once you typed both in, click "Replace All". This will replace all the ExampleSword's with whatever you typed in. Next, scroll down to here where it says "//projectile":



          Once you find this; you can edit the damage, gravity of the projectile, velocity, ect. You can change them to your liking, but don't change muzzleVelocity. It's generic for swords unless yours is enormous. Scrolls down a little to "item" where you can edit the name of the .dts file (the exported file you just did). Make sure the one in the .cs file is identical to the one you actually made in Milkshape3d. Scroll down a little more and you find "weapon image". Here change the name of the .dts to your weapon's .dts. The rest you don't have to worry about; other than one last thing. Scroll down until you are here:



          These are the Sequences. This controls what happens when. This part where it says "stateTimeoutValue[3]     = 0.15;". This tells the sword how much "Fire Rate" your weapon has. This is usually used for guns, but my sword swings a little faster then default. Lastly let's go to the very bottom and show you how to edit the animations. This code lets you use any default animation as your fire animation:



When you're here, you can pick from a variety of animations (only a few because some aren't good for weapons):

activate1 - Activation
activate2 - Flailing arms
armattack - Swinging with your right hand
armreadyboth - Typically huging (/hug)
armreadyleft - Left arm out
armreadyright - Right arm out
leftrecoil - Moving the left hand up
plant - Planting a brick
root - No animation (Null)
rotCW - Turning clockwise
rotCCW - Turning counter clockwise
shiftAway - Shifting the ghost brick away from you
shiftDown - Shifting the ghost brick downwards
shiftLeft - Shifting the ghost brick to the left
shiftRight - Shifting the ghost brick to the right
shiftTo - Shifting the ghost brick towards you
shiftUp - Shifting the ghost brick upwards
spearReady - Charging the spear
spearThrow - Throwing the spearl

Joint names:

muzzlePoint - Where projectile is spawned
mountPoint - Where player holds item
ejectPoint - For guns mainly (where shell comes out)

          Now just save the .cs file, close the WinRAR, rename the .zip to whatever your weapon's called (Weapon_NAMEHERE), and you've got a weapon! Don't post your first weapon; please. For your sake you will get flamed for it. The most you should do is either show it to friends, or post it in  Modifcation Discussion. Thankyou all for taking your time reading!
« Last Edit: July 31, 2011, 10:54:04 PM by A Twig »

This is a really great tutorial. Too bad I use Blender :U

Also, nice Skyrim background you have there.

Also, nice Skyrim background you have there.

Lol; I pre-ordered the game for PS3. I loved oblivion to the bone this game might kill me :p

Thanks for the feedback :D

wait, I have a question.
Aren't keygen's in the piracy area?

They create random keys.

They create random keys.

which means you are getting it for free, which to my knowledge is piracy.

Extremely helpful, also:  Do weapons need a collision box for item pickup, or does this need to be done in a separate model?

Nice tutorial.

And yes keygens do count as piracy in some form.

Lol, when I first read the title I thought it was a tutorial for making a twig!

OnTopic: Is Milkshape 3D for mac? if not what is a good(free) modeling program for mac?
« Last Edit: August 26, 2011, 10:00:36 AM by jes00 »

Nice tutorial! I have one question. I made a playertype in milkshape but when I export it for the certain things it doesn't work in game. It just crashes me. I am doing it wrong obviously but is is possible to make playertypes in milkshape?

Nice tutorial! I have one question. I made a playertype in milkshape but when I export it for the certain things it doesn't work in game. It just crashes me. I am doing it wrong obviously but is is possible to make playertypes in milkshape?
Yes, but it needs several things.  Did you add a collision box? :o

No I do not know how to add one. I am new to milkshape