...
(old text)
I don't know why the cocks this isn't on CC. I remember it at one point being on.
Oh, hold on. I think it has to do with the forums getting wiped or something.
Well, I'm just going to copy and paste it from SA. No one goes to SA anymore so maybe the little bit of stuff I did will find renewed use, here.
since I am just copying and pasting and not updating, this article is not up to par with the more recent stuff in modding, techniques, ect. Some of it may have a few errors and it's based on the older iceCC. Most of it can still be applied to today, though.
So, here it is.
Note nothing will be updated.
####################################
I originally only intended to have this hosted at Ojan's SC division at SME, but no one goes there, so I figured it'd make better use, here.
Note I only and only ever will support modding version 1.10. This is directly copied from my post on SME. I probably won't be completing the editing bible now unless I get strong request to do so.
Mesk's Starcraft editing bible
Welcome. You open this tome in search of knowledge on how to mod StarCraft. In which case, you have come to the right place. Here I shall reveal to the willing individual my methods and tools used to create the most advanced and stunning of Total Conversions for Blizzard's StarCraft and it's expansion. In addition, other masters of modding will lend their hand in their areas of expertise, and this incarnation of a guide to editing will be great in it's coverage.
Notes - This guide is written on the observations and methods used by IskatuMesk. Preferences may vary, but this is how I do things. I will explain to the finest detail, using both words and pictures, to convey how I do everything from model great warships to programming unstoppable AI. I will detail on the advantages and disadvantages of many aspects of SC, and open the world of Iscript to many of those who are afraid of it's complexity. Here I unveil all for those willing to hear.
INTRODUCTION
I started modding SC for kicks. I had a general idea of what I wanted to do, and I went out and experimented. No tutorials or anything were really available at the time [and still remain so], so I picked up the basic tools I found, including StarDraft, and set to work. It was a tough time learning, and I made many mistakes and silly errors in my years of modding, but now I am confident I have learned nearly everything within the range of my tools. I don't yet know ASM much, but that is changing gradually. Yet still, no tutorials are available for anything beyond the absolute basics. I shall now change this.
I treat modding as an art. I aim for absolute perfection in all things. While story is up to the creator, graphics, sounds, AI, gameplay... all things must be equal and absolute in quality and immersion. However, many people overestimate their capabilities, and end up shutting down a mod before it's even playable. Only when you are confident you can at least get a mod going strong should you even attempt to start. So many mods are started, and only a fraction ever get anywhere, let alone finish. This goes for modding period. Save yourself the trouble if you think you can't keep dedicated, and don't even start. I have had trouble with this myself, and I kick myself everytime I think about it. However, I have gained something through my mods, and you will too. That is called experience.
This guide will show you how I mod.
Again, this is how I do things. They may be different than what others say to do, but they work, and with these methods great things are crafted. May the doors be opened.
Chapter Pi - Iscript
The power of iscript.bin should never be ignored or misunderstood.
The iscript is a core part of starcraft. It is edited using Icecc (NOT regular ICE. Never. Ever.) which consists of both a command prompt and a java UI that decompile parts or the entire iscript for you to edit using your favourite text editing application (I just use notepad, but context or the like would work fine too.)
Here is a very basic list of what you can and need to do with iscript.
- Edit the frames of units to support different grps.
- Edit overlays, such as engines, muzzle flashes, missile trails, ect.
- Edit effects, such as explosions, sounds, of units and effects.
- Creating new units and weaponry out of unused or different "slots".
Helpful Knowledge
* I refer to every unit as a Slot. An iscript entry is a graphical slot, meaning that most entries can be used for any purpose requiring a new grp.
* Unit "slots" are different than graphical ones. I refer to unit slots as entries in units.dat which are much fewer than in iscript or images.dat. Units.dat slots are limited, so make sure you plan out your new units carefully.
* When decompiling the iscript, you should use the java interface (Grab the latest RLE off of java's site, google for it if you must, I'll include a link whenever I am not lazy) and decompile units one at a time in your mod's data folder for better organization.
* Don't change anything without knowledge on what you are doing, or you will probably cause crashes. Feel free to ask any questions in this forum regarding this section.
Introduction to iscript
Iscript's purpose is two-fold - Functionality and Supportive functionality. To me, functionality is the ability to manipulate how a unit, structure, or effect works. With iscript, I can make an explosion expand to the radius of a map, or a ship fire a sequenced set of weapons, or add two turrets to a marine's face.
However, we won't start off with such complex things. For now, let's say we wanted to remove the Battlecruiser's engine glow. To do this, we must first acquire icecc from smempire.org's download database. I trust you are competent enough to find it. Also be sure to grab Hunter_Killers' iscript definitions which identify many of the unknowns in the java interface.
Make sure the icecc folder is under C:\. It is not known to me why, but the program only functions if it's main under is under C:\ as Icecc.
Now that the java UI is running, you should see something like this:
[imgwh 629x538]http://img.photobucket.com/albums/v734/ ... ntroui.jpg[/imgwh]
Note a few features of the interface. First is the columns of names which you probably recognize the names in. The two middle ones I rarely ever use, but the images and units column both are very important. Here's why.
The units.dat only lists units. It's very easy to find a basic unit, such as the selected Battlecruiser, in this column. HOWEVER, if you want to edit something such as an overlay or a projectile, the images column lists those in addition to the basic units. As you can see, the images column is listing the Scourge's birth, shadow, death effect, explosion, and the actual unit. These are all graphics slots - they all have individual GRP's.
Now, select the Battlecruiser as I have done by clicking on it's name. Any thing "selected" will be dumped into a text file, even if you select everything, when you decompile. This can be useful to mass-edit things, but icecc decompiles them in such a way that they can often share local entries or the like, and editing them may unintentionally effect the other units decompiled in the file. To be safe, only select the Battlecruiser for this.
Now, look down a bit. Two boxes can be checked. Seperate headers I have never bothered with figuring out, so always keep it checked. I think it has something to do with how the headers (which I'll be explaining later) are arranged in the text file.
"use Default iscript.bin" when checked will decompile the files from the iscript.bin included with icecc. You'd only uncheck this if you want to specify your own custom iscript.bin. This can be used to extract custom animations from a different mod or to retrieve your own animations from a re-compiled iscript.bin. Leave it checked for now as well.
The Save-to section will specify where to save your text file. You have to manually specify it'll decompile to .txt, which I'm sure you know how to do. Set the .txt file to be saved somewhere where you can easily find it, such as inside your mod folder. Name it something like beecee.txt or ilikegoatslalowskatz.txt. Now, click decompile.
Hunt down your txt file and open it. It should look something like this:
Code: Select all
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file 'data\scripts\iscript.bin'
# created on: Mon Jun 20 14:20:31 2005
# ----------------------------------------------------------------------------- #
# ----------------------------------------------------------------------------- #
# This header is used by images.dat entries:
# 218 Battlecruiser (terran\BattleCr.grp)
.headerstart
IsId 66
Type 12
Init BattlecruiserInit
Death BattlecruiserDeath
GndAttkInit BattlecruiserGndAttkInit
AirAttkInit BattlecruiserAirAttkInit
SpAbility1 [NONE]
GndAttkRpt BattlecruiserGndAttkInit
AirAttkRpt BattlecruiserAirAttkInit
SpAbility2 BattlecruiserSpAbility2
GndAttkToIdle BattlecruiserGndAttkToIdle
AirAttkToIdle BattlecruiserGndAttkToIdle
SpAbility3 [NONE]
Walking BattlecruiserWalking
Other BattlecruiserOther
BurrowInit [NONE]
.headerend
# ----------------------------------------------------------------------------- #
BattlecruiserInit:
imgul09 219 0 42 # BattlecruiserShad (terran\BattleCr.grp)
playfram 0x00 # frame set 0
goto BattlecruiserGndAttkToIdle
BattlecruiserGndAttkToIdle:
wait 125
goto BattlecruiserGndAttkToIdle
BattlecruiserDeath:
playsnd 177 # Terran\BATTLE\tbaDth00.wav
imgol08 333 0 0 # TerranBuildingExplosionmedium (thingy\tBangL.grp)
wait 3
end
BattlecruiserGndAttkInit:
imgol08 446 0 0 # BCLaserFireOverlay (thingy\elbBat.grp)
goto local00
local00:
wait 1
attack25 1
gotorepeatattk
goto BattlecruiserGndAttkToIdle
BattlecruiserAirAttkInit:
imgol08 446 0 0 # BCLaserFireOverlay (thingy\elbBat.grp)
goto local01
local01:
wait 1
attack25 2
gotorepeatattk
goto BattlecruiserGndAttkToIdle
BattlecruiserSpAbility2:
imgol0a 543 # YamatoCharge (thingy\eycBlast.grp)
goto BattlecruiserGndAttkToIdle
BattlecruiserWalking:
imgol08 220 0 0 # BattlecruiserGlow (thingy\tbaGlow.grp)
goto BattlecruiserGndAttkToIdle
BattlecruiserOther:
shvertpos 1
waitrand 8 10
shvertpos 2
waitrand 8 10
shvertpos 1
waitrand 8 10
shvertpos 0
waitrand 8 10
goto BattlecruiserOther
You're probably overwhelmed by this. It's called code. It isn't a very advanced code, but it's realitively easy to screw up in given Starcraft's pickiness. I'll touch on that later.
Quick Facts
- At the very top is a number of lines of text identifying what sections are what. You can tell what most of them are by piecing together the abbreviations. These are called headers. Note that for a lot of things, headers like burrowinit and a lot of the unknowns have many different uses depending on the unit or the effect. These uses are not entirely known but once you become more advanced you'll begin to understand how they are used.
- Don't modify the headers unless you also modify the sections that you can find by scrolling down.
- IsID is the Iscript section's ID. "Type" is related to the headers and refers to how many there is. If you change the number of headers this must change as well. Look at different units to get an idea how this works.
Removing the Battlecruiser's Engine Overlay
Every single line of text in an iscript script is a command. You can guess what many of them are, but here's a list of what they mean.
Code: Select all
BattlecruiserInit:
imgul09 219 0 42 # BattlecruiserShad (terran\BattleCr.grp)
playfram 0x00 # frame set 0
goto BattlecruiserGndAttkToIdle
- Most air units only have 1 frameset. Animated ones, like mutalisks and overlards, have more to make them animate at all.
- playfram with only a single numberal such as 1 or 42 designate a particular frame and not a set. This is most often seen on buildings and some projectiles which don't turn (face one direction for buildings) and thus have no use for framesets. This is also be used by units such as zerglings to play their death animations which are only a few frames.
- imgul09 stands for Image Underlay. Underlay likely means that the designated ID (an images.dat ID) will always be displayed "under" the unit it's being spawned on, and never on top. Likewise, imgol08 stands for Image Overlay, which is displayed ABOVE the unit, and never under. This can be useful. Note shadows are always underlays, and things like explosions are always overlays. Can you guess why?
- goto tells the running script to go to another segment. In this case, the Idle area, which has the BC either hover or stand until the player issues a command.
Now, scroll down a bit until you find this section.
Code: Select all
BattlecruiserWalking:
imgol08 220 0 0 # BattlecruiserGlow (thingy\tbaGlow.grp)
goto BattlecruiserGndAttkToIdle
A possible question is, if the script is telling the walking animation to go to idle... what happens to the Glow?
The "glow" is an engine overlay that makes the engines behind the battlecruiser light up. This glow has it's own iscript entry. When triggered, it has it's own script that runs a looping walk animation. When the battlecruiser stops, the engine's script ends itself, and it ceases to exist until the ship starts moving again. To remove this, you can either replace the grp, or simply -
Code: Select all
BattlecruiserWalking:
goto BattlecruiserGndAttkToIdle
This method of removal only works for overlays and the like. It's not always wise to delete things, but if you want to remove the engine's glow, or even the firing glow (Look at the attk animations and figure out which is making that laser muzzle flash appear), all you need to do is remove that line of text.
Now, to compile our changes!
[imgwh 628x534]http://img.photobucket.com/albums/v734/ ... troui2.jpg[/imgwh]
Obviously, you can access this section by clicking the Compiler tab in the Java ui.
Source files are those added through the Add button. There's two ways to do this.
Merge with the default script button removes the need to add your own. This is useful if you're just testing a single thing in a barely modified engine. However, if you're adding a new script to an existing modified iscript.bin, you want to uncheck the merge with default, and add yours. Make sure the iscript.bin is at the top of the list.
Additional, add your edited battlecruiser's script .txt file to the list. On the bottom of the UI it wants you to put in the path for your new iscript.bin. Note you cannot replace the one it's currently adding or merging, so just specify a new one.
Quick Fact
- The 1.10 iscript.bin's format changed slightly, and this was enough to fuck up icecc's compiler. Use the default.bin are your base iscript.bin or find a 1.09 file. Icecc comes with the 1.07 bin I think, but it supposedly works fine all the way up till the latest patch.
Why?
In 1.10 blizzard changed how the drone's hardcoded command sequencing works to "fix" the floating issue. This not only fucked how the AI handles it, but it also slightly changed how the iscript works, and this desynced icecc. The differences between the 1.10 iscript.bin and the default are virtually unnoticeable so it's perfectly safe to use the default one.
Once you have designated your new file, press COMPILE. It should have created your new file. If a popup appears with errors, however, like this:
[imgwh 545x432]http://img.photobucket.com/albums/v734/ ... terror.jpg[/imgwh]
There's a good chance you've done something you shouldn't have and should correct it. While the compiler will sometimes just warn you of errors, it's ALWAYS a good idea to correct them. I will touch on the various errors later on, but simply removing the line containing the engine's overlay should produce no errors and you are free to test your new super-cruiser ingame by adding the compiled iscript as scripts\iscript.bin in your custom MPQ.
CONGRATZ! UV LRND HOW 2 RMOV OVARLEYS