Staredit Network

Staredit Network -> Modding Assistance -> Iscript Tutorial
Report, edit, etc...Posted by scwizard on 2005-06-07 at 16:40:33
[center]Infested SCVs
Using IceCC to edit the "Iscript.bin" file.
Iscripts, they do more then you think they do![/center]

Disclaimer: This is not a tutorial on how to write custom iscripts or substantially change iscripts, if you want to learn that, talk to someone like BSTRhino. This tutorial is meant to teach you how to use IceCC. Future iscript tutorials (by me at least) will assume you know this and will deal with the actual language itself.

Before starting: IceCC's Iscript.bin file might be out of date. To update it open your patch_rt.mpq in WinMPQ and drag the "scripts\ISCRIPT.BIN" file into C:\IceCC\data\scripts

1. Download, install and open IceCC. Make sure that you install it into your C:\ drive, or else you might get an error message.

2. Double click on the file called "IceCCUI"

3. Select Terran SCV from the units header and press the decompile button.

4. Click the "Open in editor" button. IceCCUI should create a file called "Iscript.txt" in the IceCC folder. Notepad should then open that file.

5. You should see some text like this:
CODE
# ----------------------------------------------------------------------------- #
# This is a decompile of the iscript.bin file './data\scripts\iscript.bin'
# created on: Mon Jun 06 21:01:17 2005
# ----------------------------------------------------------------------------- #

Explanation: The goal of this tutorial is to create an infested look on SCVs by overlaying an acid spores image on the SCV unit. To do this, you need to find the number which corresponds to an acid spores effect in the images.dat file. Steps 6 through 8 show you how to find that number using IceCC.

6. Minimize those windows. Then go to the IceCC folder and double click on the "Help" folder.

7. Open images.txt, and search for the entry which says "Acid Spores Overlay 4 (Large)" (hint, it's at the very bottom of the file).
As you can see, the number this corresponds to is 997.

8. Unminimize notepad, and go to where it says:
CODE
SCVInit:
imgul09         248 0 7 # SCVShad (terran\SCV.grp)
playfram        0x00 # frame set 0
goto            SCVOther

Explanation: "SCVInit" is the section that starcraft will go to when the SCV is first created. "imgul09" basically gives the SCV a shadow. "Playfram 0x00" draws the SCV and "goto SCVOther" makes the SCV play it's idle animation. We want to make an image that overlays the SCV. The command for this is "imgol08 <images.dat entry number> <offset y> <offset x>"
(thingys in <> correspond to variables)

Because we want to have the acid spores directly on top of the SCV, set the offset x and y to 0. We found out previously that the number for the images.dat entry we want is 989.

9. Under where it says "playfram 0x00" write:
CODE
[tab]imgol08[tab]989 0 0


10. Save the .txt file. Open the command line promt by going to RUN and typing in "cmd".
Type: cd C:\IceCC
Type: icecc -o "C:\my modding folder\iscript.bin" C:\IceCC\data\scripts\iscript.bin C:\IceCC\iscript.txt
( Silence is good, error messages are bad. Don't re do it just because it didn't say "DONE!". IceCC never says DONE.)

Explanation: Ice cc is the txt to bin compiler. The syntax is -[options] <input 1> <input 2> <input n>
The option "o" tells IceCC to write the compiled .bin file to <input> instead of the defult directory.
What you are basically saying is: Merge the files "C:\IceCC\data\scripts\iscript.bin" and "C:\IceCC\iscript.txt" and write the result to "C:\my modding folder\iscript.bin"
IceCC will compile any .txt files it comes across (it's main function actually).

11. Add your new Isciprt file to your MPQ and run it. You should know how to do this.

For more details and technical explanations of how to edit Iscripts, please READ THE MANUAL.PDF that comes with IceCC. I can't attach it if because I'm not allowed to attach PDFs.

Note to Mods: Sticking this would be nice. Also if mods can attach PDF files, then it would really be appreciated.
Report, edit, etc...Posted by EzDay281 on 2005-06-07 at 16:45:51
What good would PDF files be? I hate them, most of the time people hardly use a quarter of the crap that they look at that makes them run so slowly pinch.gif
Report, edit, etc...Posted by SuperToast on 2005-06-07 at 17:08:22
Good tutorial. Thanks for the help! I'm looking forward to some more advanced tutorials with IceCC!
Report, edit, etc...Posted by scwizard on 2005-06-07 at 19:00:50
Adding this to the top:

This is not a tutorial on how to write custom iscripts or substantially change iscripts, if you want to learn that, talk to someone like BSTRhino. This tutorial is meant to teach you how to use IceCC. Future iscript tutorials (by me at least) will assume you know this and will deal with the actual language itself.

ADDITION:
Coming soon, how to make a "Doom dragoon" jumpy attack and all.
Report, edit, etc...Posted by Slyence on 2005-06-07 at 19:04:16
Nice. Can you believe I learned something from this...
Report, edit, etc...Posted by scwizard on 2005-06-07 at 21:13:19
Muhaha! That is what I was hoping you'd say!

Now I can automatically get into clan MM right?

I know how to use arsenal III to mod units and such. (easy)
I know how to use memgraft and stargraft to mod buttons. (frustrating, but I now have a mod where civilians can be created at a supply depot).
I know how to edit iscripts to!

ADDITION:
I also know how to edit Tbl files to make custom unit names and strings.

I know little details such as: When your using winMPQ and there are clone files. You always use the one that says "0" under "Locale ID". (Because those are the files in english tongue.gif )

Update: Fixed a horrible, but almost unnoticeable error.

ADDITION:
Doodle77 is making me tell everyone that he showed me how to do this...

But I'm still a better modder then him biggrin.gif

Seriously, I probably understand iscript better then he does.

Tip for mod makers: Replace the sprites.txt file in the help folder with a .txt file verson of the sprites.lst from starforge.
Report, edit, etc...Posted by DT_Battlekruser on 2005-06-08 at 00:24:28
Will be added to full sticky tutorial when time comes.
Report, edit, etc...Posted by Mp)Trance on 2005-06-12 at 18:11:14
this tells me how to overlay a SCV, but how would i use the old overlays that were never used, on fire, lasers, and such? i dont want to overlay the units, i want to overlay the EFFECTS! this didnt help me much at all, he never explained anything he just told me what to do... why do i use the word imgol08? this doesnt help me much...
Report, edit, etc...Posted by StealthyDeath on 2005-06-12 at 18:25:39
Decomplile what you want and add the overlay to its animation if that is what you're asking.

Also, imgol08 mean "image overlay". It adds whatever was picked from the images.dat on top of the existing graphic.

If you don't understand what the opcodes mean; you need to read the manual.pdf to understand it or you won't get anywhere.
Report, edit, etc...Posted by scwizard on 2005-06-13 at 16:10:38
QUOTE(Mp)Trance @ Jun 12 2005, 05:11 PM)
this tells me how to overlay a SCV, but how would i use the old overlays that were never used, on fire, lasers, and such? i dont want to overlay the units, i want to overlay the EFFECTS! this didnt help me much at all, he never explained anything he just told me what to do... why do i use the word imgol08? this doesnt help me much...[right][snapback]233708[/snapback][/right]
Overlay what effect? (your probably told me but I forgot). If you want to overlay a sprite such as a vespane gas puff, the way to do that is with the independent overlay command, which goes like this:
QUOTE
sprol0f <num> <num> <num> − Place independent overlay (sprites.dat) <1> at vertical offset <2>,
horizontal <3>: This will spawn an independent overlay sprites.dat entry number <1> at a vertical offset of <2>
pixels and horizontal <3>. An independent overlay is different from an active overlay in that it does not follow the
main sprite around (it is created and then treated as its own sprite, "independent" of what the main sprite does).
Usually used for showing explosions on top of a unit that just died.

READ THE MANUAL AND LEARN!
Report, edit, etc...Posted by Season on 2005-06-13 at 18:29:56
Very nice bob, This is a very good tutorial for Iscripting, Beginner's will actually have a hard time getting through this if there a beginner to scripting.
Report, edit, etc...Posted by O)FaRTy1billion on 2005-06-15 at 00:37:59
QUOTE
2. Double click on the file called "IceCCUI"

When I do that I get:
QUOTE
C:\IceCC>
C:\IceCC>java -jar IceCCUI.jar
Bad command or file name

C:\IceCC>exit

All of my config files and stuff say the directory is C:\IceCC...
Report, edit, etc...Posted by Forsaken on 2005-06-15 at 12:19:03
Well, I am having trouble compiling everything into the ".bin" I do everything fine until I get to this part:
icecc -o "C:\my modding folder\iscript.bin".

When I do the next step, it tries to open the ".bin" file. Am I doing something wrong?
Report, edit, etc...Posted by Season on 2005-06-15 at 13:07:29
It shouldent have to open it, It's compiling it.

Ill give you a step by step tutorial biggrin.gif

1. Create a folder called "Modding" inside C:\
2. Take a copy of the originial iscript.bin and put it inside your Modding folder
3. Take your iscript.txt and put it inside your Modding folder
4. Now you will have to open a command line prompt, By going to RUN, And typing in cmd.
5. When it opens type this: cd C:\IceCC
6. Then when it's done, Type this: icecc -o "C:\Modding\iscript.bin" C:\IceCC\data\scripts\iscript.bin C:\IceCC\iscript.txt

And remeber... Silence is good, error messages are bad. Don't re do it just because it didn't say "DONE!". IceCC never says DONE.
Report, edit, etc...Posted by Forsaken on 2005-06-16 at 00:09:50
Well, this isn't working for me. I keep following the steps, but it just isn't working. I kee[ getting prompted to open the iscript. If need be, I'll post screenshots of what I am doing.... The part that I don't like, is I keep doing the exact steps...
Report, edit, etc...Posted by scwizard on 2005-06-16 at 07:48:44
QUOTE(O)FaRTy1billion @ Jun 14 2005, 11:37 PM)
When I do that I get:

All of my config files and stuff say the directory is C:\IceCC...[right][snapback]235658[/snapback][/right]
Umm, last time I checked pathetic attempts to use dos were not the same as double clicking. If you want to use dos, you don't need to use IceCCUI, you can use the batch files directly.

ADDITION:
QUOTE(-Jake- @ Jun 15 2005, 11:19 AM)
Well, I am having trouble compiling everything into the ".bin" I do everything fine until I get to this part:
icecc -o "C:\my modding folder\iscript.bin".

When I do the next step, it tries to open the ".bin" file. Am I doing something wrong?[right][snapback]235842[/snapback][/right]
Did you type all of this in: icecc -o "C:\my modding folder\iscript.bin" C:\IceCC\data\scripts\iscript.bin C:\IceCC\iscript.txt
Or did you just type in "C:\my modding folder\iscript.bin"

Also, try using the complier section of IceCCUI instead, becuase it's a GUI using it should be easy.
Next Page (1)