Here's the two tutorial bits I made for TL a while ago.
IskatuMesk's Formal Introduction to Modding
[imgwh 640x480]
http://img9.imageshack.us/img9/2472/screen64h.jpg[/imgwh]
Hi, I'm IskatuMesk! I'm a veteran modder of Starcraft for ten years. I specialize primarily in creation of Total Conversions. I've created a variety of guides and video tutorials in the past, but no true down-to-earth introduction & tutorial.
Today I'm going to give you a shakedown on Starcraft modding, some of the tools you'll be working with, concepts to become acquainted with, and some of the possibilities of Starcraft modding. In this guide I will presume that you don't even know what modding is, much less how to start. By the end of the guide I hope you will have a basic idea of where to go, what to do, and how to best evolve your skills should you be interested in starting a mod. This guide is to be used as a primer for getting started and it doesn't cover intermediate or advanced topics due to the scale of such topics.
First, let's get an idea of what exactly we're going to be doing.
Introduction to Modding
Mods are very different from maps. While a map may contain mod-like elements, it is ultimately still just a map. Mods work by temporarily "patching" the game's memory, not permanently modifying the game itself, but allowing you to play with new elements, such as voice acting, graphics, and computer AI. If you have a friend who possesses the same mod as you, it's perfectly possible to play multiplayer. You generally use Battle.LAN or Hamachi to play multiplayer mods, as they often do not support the most recent version of Starcraft. Downgrading is very easy and quick to do on the fly, however, so don't be discouraged.
However, I have a few words of advice before you begin.
Unless you are truly motivated to start a mod, it's best not to devote time to it. We get so many one-hit wonders that claim they have the greatest idea for a mod, then we never hear from them again. Modding is not a hobby, it's a dedication. There's a few extensive articles out there that get deeper into the subject of team management and dedication.
Here's one written by a good friend of mine, Magic from the Star Alliance.
http://samods.org/articles/tips_for_new_modders
Here's one I wrote a little while ago, geared towards people looking to form large teams, although for Starcraft it's really unnecessary to have a big team.
http://www.campaigncreations.org/forum/index.php?topic=1495.0
This guide will assume that you are motivated, dedicated, and actually ready to invest time into this subject.
Getting started
Perhaps you want to simply rebalance Starcraft. Maybe mutalisks aren't strong enough, and they should fire yamato guns instead of glave wurms. Perhaps you want Carrier interceptors to fly further from the Carrier and attack at a range, like bombers.
How do you begin? Where do you start?
Before you get in over your head, there's a lot of things to consider.
Starcraft is an old game. Really, modding SC is a lot like playing it. It's easy to jump into, but very difficult to master and a lot of that difficulty comes from the limitations of the game. Starcraft's limitations can sometimes work to your advantage, though, as you can do a lot in Starcraft that you can't do in, for example, Warcraft 3. It's that allure that has kept me going for ten years. SC, for example, doesn't allow new races or a larger resolution/color depth, but you
can give units 10 different attacks linked to their animations that all occur randomly. You can make projectiles do randomized damage and spawn appropriate effects. You can't have a unit fire more than 2 types of projectiles, but you can spawn weapons at a target's position. You can't have new types of interceptors or scarabs. So on so forth.
There's a few concepts to understand when working with starcraft.
Starcraft functions through archives, called Mpqs. You'll work with these using Winmpq (explained in the next segment). The MPQ contains all of your mod's data. For your data to function, it must assume the name of the file it's replacing. For example, .dat files which contain attributes such as unit health, weapon damage, ect. are under the arr\ directory within stardat and broodat mpq files. In your mpq file, they'll also be under the arr\ directory. Weapons.dat will always be named arr\weapons.dat, units.dat will always be named arr\units.dat.
Because you cannot add new entries to dat files and for the most part cannot tell the game to "read" new units, you are essentially working with what is available and not much else. For most people this should be enough.
Starcraft's graphics are 256-color sprites contained within .grp files. You'll be using Shadowflare's GRP converter to handle these, but you can use Broodkiller's GRPEdit or Retrogrp to preview them. These use a starcraft-specific palette.
The sounds/music are PCM-format .wavs and can accept up to 48,000khz sampling rate, mono and stereo.
Resources, tools, & places of interest
One of the biggest responsibilities as a modder is using the resources and tools available to you to their fullest. The first place to start would be to learn where tools are located, what forums have useful information stowed away, and where's a good place to ask questions.
http://www.campaigncreations.org - The website I'm hosted at. Oriented mostly around old custom campaigns, I'll be working with the administration to update the website's modding section. My bible is also located in the Starcraft section of the forums and covers some intermediate to advanced topics.
http://www.samods.org - SA's long past its glory days, but digging deep into the starcraft section may yield some interesting information.
http://www.staredit.net - The redheaded stepchild of the modding community, SEN is a relatively young website but remains the most active. A good place to look around for simple to intermediate topics, and probably the best place to ask your questions at.
http://www.broodwarai.com - Possesses an up to date list of modding tools and managed by two friends of mine, Bajadulce and poiuy_qwert. Here is where you'll get the latest tools, and it's also the place to go if you're looking to customize Starcraft's computer AI. Here you can also grab Baja's downgrader, which is not only useful for modding but also for watching old replays.
As with all forums, the Search function is your best friend when dealing with a game that is as old as SC.
"There's so many tools, what do I need!?"
Let's start with the basics. Head on over to broodwarai and grab the following tools. Use your browser's search function.
Datedit
Winmpq
Mpqdraft
Note - If Winmpq doesn't work for you, you'll need to download some runtime files. You can find them here,
http://shadowflare.samods.org/dwnload.html#WinMPQ
Okay, let's get started!
Your first mod
In this mod we're going to cause the Mutalisk to shoot yamato gun blasts and do increased damage. Maybe we'll give it some shields and stuff, too.
First thing's first. Create a folder somewhere you have easy access to. I've created a folder called TL Mod Guide on my desktop. Run Winmpq, and click on "new". Navigate to that folder and create a new mpq. I've just called mine TL. So professional! You may note that the mpq isn't actually
created yet. Once you start putting files into the mpq, it'll appear. If you close winmpq before you do that, you'll need to make another one.
Now, run Datedit.
[imgwh 640x607]
http://img188.imageshack.us/img188/8866/guide0.jpg[/imgwh]
Oh sweet mary poppins and tap-dancing christ there's buttons everywhere!
Well, actually, it isn't so bad. I helped design datedit's layout with Broodkiller and we made it as efficient and user-friendly as possible. There's also helpful tooltips that will guide you around, and most of the functions are user-friendly.
Find the Mutalisk in the unit list. Don't touch any of the tabs, yet!
With the Mutalisk selected, let's take a look at his basic attributes.
[imgwh 490x329]
http://img51.imageshack.us/img51/9645/guide1g.jpg[/imgwh]
1.) The Mutalisk's health, shields, and armor. We can enable the Mutalisk to have shields. Click on the box to enable shields and give him 4269 shields.
2.) Build costs and construction time. Note that for units with a lot of health, an extremely short construction time may cause them to appear with reduced health and armor. This is because that just like with buildings, SC will create the unit from 1/* health and raise it until it's max. If it's too fast, like .25 a second, it may not fill the health fast enough. Let's make the Mutalisk take 2 seconds to build, and cost 42/42 minerals/gas.
3.) Weapons. Unlike Warcraft 3, unit weapons are not built into the unit, which is really handy and helps us out. "Max hits" is just for Staredit display and isn't really that useful. We're going to leave this part alone for now. You can use it to make the Mutalisk call upon, say, the Battlecruiser's weapon entries.
4.) Supply. Here you can make the Mutalisk cost 0 supply, or 42 supply. For the moment, let's make him cost 0 supply. There's also the race selector. You can make the Mutalisk cost Terran supply if you wanted to. This area is also important for computer AI. If you had set the Mutalisk to cost Terran supply, even though it costed 0 supply, the AI wouldn't build it.
5.) Space required for transports. As the Mutalisk is an air unit, it costs 255 supply - nothing can transport it. It's perfectly possible to have the Overlord capable of transporting it, though. This doesn't resize wireframes and in some rare cases might cause instability, so be warned.
6.) Scorepoints, for the end-game score board. There was some speculation that AI will target high-point units over low ones, but I've yet to see anything that indicates such behavior.
7.) Size. This determines how much damage weapons that are concussive and explosion will do to the unit. The Mutalisk, being small, takes max damage from Ghosts and reduced damage from Dragoons.
8.) Sight range & Acquisition range. Sight range caps at 11 unless you like crashing Starcraft, but Acquisition range can go on for quite a distance. If you went to the Carrier entry and set this to something like 69 or 42, it'd cause the Interceptors to engage targets at a far larger radius than they currently do.
Feel free to look at the other tabs for the Mutalisk, such as Advanced and Graphics. Clicking on boxes or stuff will display a tooltip explaining their function to you. For the moment, we're going to leave all of this stuff alone.
Go back to the Basic tab and click on one of the arrows next to the Mutalisk's weapons called Jump. This will cause Datedit to swing over to the Weapons.dat editor, selecting the appropriate weapon for you.
[imgwh 491x350]
http://img80.imageshack.us/img80/4321/guide2.jpg[/imgwh]
I'll explain what you're seeing once more, though the tooltips will probably go more in-depth.
1.) Damage and cooldown. "Factor" determines the amount of projectiles that spawn, but caps out at 2 then resets to 1 when used higher. Set the damage to 42.
2.) Damage types. Setting effect to spell and giving it damage is typically a good way to crash the game as spells are serious voodoo and quite hardcoded. Many spells cannot be used outside of their existing entry, like Mind Control and cannot be used as weapons. So much for my randomly mind-controlling flying larva, huh?
3.) Ranges. See the Siege Tank and such units for an idea of how long the ranges are.
4.) Splash radius. Only works with certain damage types.
5.) Labels. Refers to stat_txt.tbl entries which we'll worry about later.
6.) Behavior and graphic. Let's set the graphic to Yamato Gun and set the behavior to Fly & Follow Target (homing). We could use the Bounce for the Yamato Gun, but it doesn't have animations for it and typically it's not a good idea.
7.) Targeting parameters. Note that if the Mutalisk's projectile is set to only hit air but it has the weapon in both slots in units.dat, it will still attack ground but just not do any damage. Some of these won't work very well, so it's up to you to experiment with them and see how they work. Some spells use the more exotic flags.
Okay, we're ready to try out our new, perfectly balanced Mutalisk! July will thank us for helping him demolish unsuspecting Protoss and Terrans.
If you hit control+S to save, Datedit will ask you if you want to overwrite the default files. The answer is no, obvious. So to go to Save As, and create a new folder called arr\ instead your mod's directory. Go back to the Units tab, and do the same, placing the new units.dat inside your arr directory.
Close Datedit. The reason we close datedit is that if it's loading from the mpq, which you usually do when you have custom graphics and you want to see them in the previews, it takes ownership of the mpq and any changes you make won't be applied to it. The same thing happens when you use Firegraft, or are currently running the mod mpq through Starcraft.
Browse to your new arr directory, and select your two dat files. Slide them into Winmpq. It'll ask you for a directory. Type in arr\ . They should now look like this.
[imgwh 632x201]
http://img197.imageshack.us/img197/3889/guide3.jpg[/imgwh]
Alright! We're almost ready to give the six Dragons a hernia. We have one last step to do. Once you get used to this, you'll be able to do all of these steps in under a minute.
Find and run Mpqdraft. Go to Load MPQ. Select starcraft in both of the selecting thingies. Click Next. Locate your mpq and make sure the box is ticked. Click next once more. In this window, you can select plugins if you have any that are applicable. Since you don't for the time being, just click finish. It should run Starcraft and when you create a mutalisk in a melee, tvb, or whatever, it'll be horrendously overpowered. If you made any other changes, like Carrier interceptor range, feel free to try them out, too!
Contratulations! You've just made your first amazing mod. You now understand the basics of Starcraft modding and you're in a good position to extend your abilities with the resources provided.
Intermediate topics - the Iscript
Very few modders out there limit their mods to .dat changes and kitbashed graphics. The real fun is creating entirely new effects and utilizing the Iscript to your advantage.
In this section I'm going to briefly introduce you to the iscript. The iscript is a topic that far exceeds the scale of any single guide or article, so I'll make it brief. This assumes you are fairly confident in your abilities with data editing.
First off, what is the iscript? The iscript.bin located under scripts\ is the single most powerful file in all of Starcraft. It controls animations of units through an extremely simple scripting language. With the iscript comes all of the magic of Starcraft. You can do things like spawn effects, trigger attacks in sync with animations, sequence randomized animations, all sorts of stuff like that. It's a really advanced subject when you get into it, so I'll keep it short and sweet.
Perhaps you gave the Vulture an air attack, and it crashed!? Or, maybe you gave the Corsair a ground attack, and it crashed, too!
Why?
They don't have animation entries for those attacks. This is a pretty simple process, so I'll cover it. To do that, we're going to turn our Mutalisk into a sewpah battal croozah.
Go ahead and download icecc from Shadowflare.samods.org. You'll need the Java runtime environment for this. Grab it from here.
http://java.com/getjava/
Also, download the Grp pack that I released, here:
http://www.doack.campaigncreations.org/waxdough.rar
A brief preview of what this pack contains -
[imgwh 640x1600]
http://img294.imageshack.us/img294/930/ ... review.jpg[/imgwh]
Of course if you release a mod with any of these, you'll need to credit me/WarGiant appropriately.
For the purpose of this mod, I'll use the Keeper.
Once everything's set up, let's run the IceCCUI.jar file.
[imgwh 628x534]
http://img25.imageshack.us/img25/6262/guide4.jpg[/imgwh]
Oh goodness! A first glance, this may look as confusing as hell. But, in fact, it's really simple.
The lists of units and such are listed by .dat entries (unrelated to your mod's dat files). Images.dat will contain the most entries, including explosions and stuff. Sprites.dat will contain fewer, as explosions are usually spawned as Image Overlays and don't need sprites, but trails do. Flingy will contain even less - anything that moves, like a missile or a marine, will need a Flingy entry. And, finally, units contains everything listed in units.dat.
Make note that most Heroes, like the hero vulture, share the exact same iscript entry as the Normal vulture. You can confirm this by looking at them in units.dat and images.dat.
Navigate down the list until you find the ZergMutalisk. Select it. Then go down to the "Save to" section and click Browse. Save it as something in your mod directory. Make sure to add a .txt extension to it.
Click "Decompile".
As long as you aren't decompiling from an iscript newer than the default (which can cause problems for icecc, though the game doesn't care), it should never give you an error when you decompile. So, for the moment, you're safe.
If you have any previous scripting or programming experience, iscripting will be painfully simple. If you don't, iscripting will be a little bit of a hurdle, but understanding starcraft's limitations will be more problematic. Really, there is no comprehensive source for anything in regards to Starcraft modding. A lot of it just comes from experience, and as there are so few modders who have ever toyed with the iscript, there isn't exactly a heap of people to attack with questions.
For the purpose of this guide, we'll just worry about our Super Mutalisk.
Open up that txt in your favorite text editor.
I'll now explain what you're looking at.
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 038 Mutalisk (zerg\mutalid.grp)
.headerstart
IsId 23
Type 12
Init MutaliskInit
Death MutaliskDeath
GndAttkInit MutaliskGndAttkInit
AirAttkInit MutaliskGndAttkInit
Unused1 [NONE]
GndAttkRpt MutaliskGndAttkInit
AirAttkRpt MutaliskGndAttkInit
CastSpell [NONE]
GndAttkToIdle MutaliskGndAttkToIdle
AirAttkToIdle MutaliskGndAttkToIdle
Unused2 [NONE]
Walking MutaliskWalking
WalkingToIdle MutaliskGndAttkToIdle
SpecialState1 [NONE]
.headerend
These are Headers. The IsID is referred inside images.dat. You could have your Mutalisk call a custom id of 420 if you wanted, and this is handy if you are working on a very large project like Armageddon Onslaught and you run out of default ids. The Type refers to how many entries there are. Refer to other units, especially ones with burrowing animations, to see how that works.
The actual headers are ridiculously simple. The first words, like Init and Death, are refering to a Thread, located further down the file. These threads are called when the unit initiates certain orders or actions. When the unit is first spawned, it'll trigger the Init thread. When it dies, it'll trigger the Death thread. These threads can and often will interrupt each other when the game demands it.
IceCC comes with several files that will help you understand the opcodes that we're about to deal with. It'd be rather redundant to go through them all, so I'll just summarize the ones we're going to deal with.
MutaliskInit:
imgul 39 0 42 # MutaliskShad (zerg\mutalid.grp)
playfram 0x00 # frame set 0
waitrand 1 4
MutaliskGndAttkToIdle:
playfram 0x00 # frame set 0
wait 2
playfram 0x11 # frame set 1
wait 2
playfram 0x22 # frame set 2
wait 2
playfram 0x33 # frame set 3
wait 2
playfram 0x44 # frame set 4
wait 2
goto MutaliskGndAttkToIdle
Here we have the Init and To-idle animations.
playfram tells the game to play a Frameset. In the grp, every 17 frames is a frameset, starting from north to south facing right (east). Each frameset is a single frame of animation in the game when used this way. Starcraft mirrors the left direction on its own.
As the Mutalisk has an animation, it has 5 framesets. Each frameset is a single frame of the wing's movement, containing the appropriate direction data. Feel free to grab Shadowflare's grp editor from broodwarai.com and jack the mutalid grp from unit\zerg\mutalid.grp in stardat.mpq to have a look. (Note, winmpq may show a bunch of unknowns. I'll show you how to fix that in a bit)
Anyways, our keeper graphic doesn't have those extra framesets. If we just renamed it to unit\zerg\mutalid.grp in our mpq, it'd just crash because starcraft throws a temper tantrum when units don't have the frames it wants. So, to fix that, let's purge those extra framesets out of the Mutalisk txt file.
Remember when deleting the framesets to remove their accompanying waits as well.
MutaliskInit:
imgul 39 0 42 # MutaliskShad (zerg\mutalid.grp)
playfram 0x00 # frame set 0
waitrand 1 4
MutaliskGndAttkToIdle:
wait 2
goto MutaliskGndAttkToIdle
MutaliskDeath:
playsnd 942 # Zerg\Mutalid\ZMuDth00.WAV
imgol 41 0 0 # MutaliskDeath (zerg\zmuDeath.grp)
wait 1
end
MutaliskGndAttkInit:
playsnd 113 # Bullet\zmuFir00.wav
wait 1
attackwith 1
gotorepeatattk
goto MutaliskGndAttkToIdle
MutaliskWalking:
wait 1
goto MutaliskWalking
This is what we should end up with.
Note the imgols are Image Overlays, the game is effectively spawning these effects in the animation. If we wanted our giant black keeper to have pretty explosions, we'd probably want to spawn a ton of terran explosions with different offsets.
Imgol calls upon an images.dat id, and then has two offsets. We can create a chain of these with some waits. Look up the terran building explosions (probably just called "explosion", see if they use the ofire (orange) palette to be sure) and spawn them with -40 0, 40 0, 0 -40, and 0 40 offsets. Now when the unit dies, it'll create a massive explosion. Horray for explosions!
This is what my script looks like, now.
MutaliskInit:
imgul 39 0 42 # MutaliskShad (zerg\mutalid.grp)
playfram 0x00 # frame set 0
waitrand 1 4
MutaliskGndAttkToIdle:
wait 2
goto MutaliskGndAttkToIdle
MutaliskDeath:
playsnd 942 # Zerg\Mutalid\ZMuDth00.WAV
imgol 334 0 0 # MutaliskDeath (zerg\zmuDeath.grp)
imgol 334 40 0 # MutaliskDeath (zerg\zmuDeath.grp)
imgol 334 0 40 # MutaliskDeath (zerg\zmuDeath.grp)
imgol 334 -40 0 # MutaliskDeath (zerg\zmuDeath.grp)
imgol 334 40 -40 # MutaliskDeath (zerg\zmuDeath.grp)
wait 3
imgol 334 0 0 # MutaliskDeath (zerg\zmuDeath.grp)
imgol 334 80 0 # MutaliskDeath (zerg\zmuDeath.grp)
imgol 334 0 80 # MutaliskDeath (zerg\zmuDeath.grp)
imgol 334 -80 0 # MutaliskDeath (zerg\zmuDeath.grp)
imgol 334 80 -80 # MutaliskDeath (zerg\zmuDeath.grp)
wait 3
end
MutaliskGndAttkInit:
playsnd 113 # Bullet\zmuFir00.wav
wait 1
attackwith 1
gotorepeatattk
goto MutaliskGndAttkToIdle
MutaliskWalking:
wait 1
goto MutaliskWalking
Okay, so we're ready to test. Control+S to save the txt file, and jump back into icecc. Go to the Compiler tab, and find our iscript. For the moment, we want to leave "Merge with default" check on. This will cause our new iscript to be a combined of our mutaloli script and the default, which is what we want. Create a scripts directory in your base folder and save the new file as "iscript.bin"
We don't need to turn off icecc to import our files. Sometimes it'll just turn itself off, though. Possibly because it hates life, or because it was programmed in java and java doesn't like life, either.
Anyways, import our file into our mpq, called scripts\iscript.bin. We also probably want that Keeper grp from the pack. Import it as unit\zerg\mutalid.grp. You'll probably need to rename it once it's imported.
Now our mpq should look like this.
[imgwh 634x166]
http://img353.imageshack.us/img353/6622/guide6.jpg[/imgwh]
Now, feel free to run the mpq like you did before. The Mutalisk should be a huge black keeper from HW2 and fire a yamato gun.
[imgwh 640x480]
http://img207.imageshack.us/img207/8746/screen84.jpg[/imgwh]
There you have it! A basic introduction to modding and even iscripting. If there's enough demand, I'll write out some more intermediate/advanced topics.
Extras
Q - Why does stardat ect show up as a ton of unknowns? How do I fix it?
A - You need a listfile. They're actually a bit hard to get now. The Maplantis backup on SEN has them.
http://www.maplantis.org/storage/files/listfiles.zip
To load them in winmpq, go to options, File lists, and Add List.
Q - How do I make selection circles larger/smaller?
A - Sprites.dat.
Q - Strings/names?
A - tblpad. Jack the stat_txt.tbl from patch_rt.mpq (Make sure it's the one with a local id of 0), edit appropriately, and stick into rez\ in your mpq.
Q - I want to learn how to do voice acting/convert graphics!
A - I made some video tutorials that cover these a little bit.
These videos are produced in 1920x1200 resolution.
http://www.doack.campaigncreations.org/Mesk_Soundediting_Ep00.avi
http://www.doack.campaigncreations.org/Mesk_Soundediting_Ep01.avi
http://www.doack.campaigncreations.org/Mesk_PSP_effectconversion.avi
Q - I have some questions...
A - Feel free to ask some! But please, please for the love of god check out those links in the beginning first and use their appropriate search functions. I won't answer anything I know has already been answered.