Staredit Network

Staredit Network -> Modding Assistance -> Stargraft Tutorials
Report, edit, etc...Posted by 007Torrasque on 2005-06-03 at 09:42:11
The Soverign Modding Emipre has made a tutorial on how to make a terran civillian buildable through the supply depot and without crashing...

just thought you guys may want to see it....

http://www.smempire.org/tutorials/trainablecivilians.php
and for those who wont click the link...
Thank you to Ace Calhoon For writing this tutorial

Instructions:
(01) Open MemGraft and choose New.
(02) MemGraft wants you to locate stat_txt.tbl now. This means that we must extract the file from patch_rt.mpq.
(03) Open WinMPQ, and press File -> Open. Open the patch_rt.mpq file in your StarCraft directory. Scroll down to rez\stat_txt.tbl . Notice that there are six files with this very name. They all have different Locale ID's (meaning that they are in different languages). The one with 0 is the English one. Select this file, or the one in your language, and press Mpq -> Extract. Select where to save it on your harddrive.
(04) When done, open up this newly extracted file in MemGraft.
(05) Now you will see that the tabs becomes visible.

Buttons tab:
(01) Now go to the buttons tab.
(02) Select an item in the list and right click on it. Select Add.
(03) This has created a new button group. In the current version of MemGraft, version 0.4.1.91 Beta, there are "a few GUI issues", as DW calls them. One of the effects of this is that you can not currently rename your new button group (which is annoying if you have more than one). You might notice that there is a rename option, but it doesn't do anything, unfortunately. Anyway, if you do use a version later than 0.4.1.91 Beta, you might possibly be able to rename the group. If the rename function does work, then call it Terran Supply Depot. Select this new button group if you haven't already.
(04) The Command drop-down box should now be empty. Right-click on it and select Add. You now add a button to the button group. All we have to do now is to put the right properties into the button!
(05) Another part of what DW ment by "a few GUI issues" is that there is no copy and paste yet. This might seem a bit minor, but it does get very annoying after a while. Just like the rename function, might be added by Suicidal Insanity eventually. If you use the same version as I do, you'll have to do it the hard way, however.
(06) Our button group will be used by the Supply Depot, and it will train civilians, and the easiest way to put the correct information into the button is to use another one as a template. So, go to the Terran Barracks in the list, and go to the Terran Marine button in the Barrack's Commands. Either memorize all the values here, or write them down (with copy / paste, this would be done in within a second). Now go back to your new button group, and put in the information that you wrote down from the barracks.
(07) Now we change the fields and drop-down boxes to show the correct information. We do want the button to appear in the top left, so leave position 1 as it is. Change the icon into Terran Civilian. The Req and Action Types are good as they are. Req and Action Var are the Unit ID that this will apply to. It currently is at 0 (ID 0 is Marine). Change it into the Civilians ID. You find the unit ID either by looking at a Unit ID list, or by going to Arsenal 3, and checking it in the unit editor (select the unit you have in mind and see what the ID # says). I'll give you a little help here though. The Civilian has ID 15, so put that in Req and Action Var.
(08) The String drop-down box is, as you might have guessed, what text that appears when you hold your mouse over the icon in the game. Change it into the right one. As you will notice, there is no "right one" at the moment. Since you normally can't train Civilians, there is no such string. There are now two ways. Either you can add a string in the bottom of stat_txt.tbl, that says "c<1>Train <3>C<1>ivilian<0>", or you can find an unused string and change it. You change stat_txt.tbl with TblPad, as I will describe in a moment. For now, find an unused string (The first "Unused<0>*<0>*<0>" string, for example) and we'll change it later. Leave Req String as None (Req String is the text that is displayed when you haven't met the units requirements. The Civilian has no such requirements, so leave it as None).
(09) Now you need to give it another button (Right click on the New button group's Command drop-down box and press Add). Since the player might start to train a Civilian, but then change his / her mind, we need to put in a cancel button.
(10) Go back to the Barracks, and write up or memorize the Cancel Last command (second from the bottom). Go to the new button in your new button group and put in the same information. No changes needs to be done with it.

TblPad:
(01) Open TblPad, and open the stat_txt.tbl file that you extracted earlier.
(02) You can, if you want, add a new string by right-clicking on the left list and selecting Add. This will add a new string at the bottom that you can use. In the example above, I reccomended you to use an unused string instead. The reason is that we have already loaded the stat_txt.tbl file, and it would require us to reload it in MemGraft again (something that we can avoid by using an unused string... not that it's much job, but meh tongue.gif )
(03) Go to the string you chose earlier ( Unused<0>*<0>*<0> ) and change it into "c<1>Train <3>C<1>ivilian<0>". The first c is the hotkey that it responds to. <1> is the normal text color. <3> is the "high-light color" that the hotkeys have, and <0> is the end of the substring.
(04) Save the file. In MemGraft, you selected what line number in stat_txt.tbl that the button used, not what the string says. In other words, MemGraft tells the game what line number to look for the string at, and stat_txt.tbl (which you currently changed) contains it.

Units tab:
(01) Switch to the Units tab in MemGraft.
(02) Select the Terran Supply Depot.
(03) Change the value in the '# of Commands' box to 2. (We want the Supply Depot to use two commands)
(04) Select your new command group in the 'Commands' pull-down menu. (We want the Supply Depot to use the new button group we created)

Unit Requires tab:
(01) Switch to the Unit Req tab.
(02) Find the Terran Civilian in the list and select it.
(03) This tab contains what requirements that must be filled in order to train units. The Civilian normally can't be trained, and thus has no such requirements by default. We need to change this. Give requirements to the unit by Enabling the Used checkbox.
(04) The Marine is good as a template in this case as well. If you use the same version of MemGraft as I do (one without Copy / Paste), select the Marine, and write down / memorize the requirements it has in the Requirement # slider. Then go back to the Civilian, and put those in.
(05) The Requirements say that in order for you to train a Civilian, you must do so from a Terran Barracks that is not constructing an addon and that is not lifted up. However, we want to train the Civilian from the Supply Depot. Thus we need to change the second requirement into Supply Depot.
(06) Now you've made the civilian trainable from the Supply Depot, and you're almost done. We'll do one final detail before we save though.

Misc tab:
(01) Switch to the Misc tab.
(02) MemGraft requires you to put the changes you did inside the patch_rt.mpq file. This means that you might end up with quite a few patch_rt.mpq files, if you have many mods that have button changes. In order to easily seperate them, you can give the file another name in the patch_rt.mpq field. I suggest naming it civilian.mpq or something.
(03) Now you're all done in MemGraft! Save your work by going to to the Main tab and selecting first Save (will save an *.mgp file. If you decide you want to improve or change anything on your mod later on, you need to load this file) and then Save Release (this will save two files: an *.mgd file and and *.exe file. We'll get to them in a second... )

WinMPQ:
(01) The *.exe file is the file that you load your changes with. It now expects to find the *.mgd file in civilian.mpq, under the name custom\mgpatch.mgd .
(02) In your StarCraft folder, you will find the file patch_rt.mpq. Make a copy of it, and name the copy civilian.mpq. Open this file in WinMPQ
(03) Now click add, and open the *.mgd file. A window will pop up asking in which folder to put it in. Write "custom\" (without the ", of course)
(04) Unless the *.mgd file was called mgpatch.mgd, right-click on the file you just added, and select rename. Make sure that the name now is custom\mgpatch.mgd.
(05) Close WinMPQ. All changes you do to the MPQ files are directly saved (in other words, be careful about deleting files - they're not comming back), thus the lack of those buttons in the menu.

How to run:
(01) Now that you've created the patch and put it into an MPQ, all you have to do is to run it.
(02) Make sure that the MPQ is in the StarCraft directory, and run the *.exe that MemGraft gave you (can be run from anywhere). You should now be able to train Civilians at the Supply Depot!

Mini FAQ

Where can I go from here?
The techniques used for moving the buttons can be applied to moving any other button (i.e. spells). Also, for fun you might try creating an MPQ that modifies the Civilian. What about making the civilian have a modified iscript.bin entry (use IceCC or ICE) and has an attack (use Arsenal III)?

Why are my buttons grayed out?
You need to change either the values in the 'unit requires (Unit Req)', 'tech research requires (TechRReq)' or 'tech use requires (TechUReq)' tabs (sort of like we did with the civilian).

I opened another MPQ-archive (like StarDat.mpq for example) and there are loads of unknown files in WinMPQ. Why?
In order to make the files "known" you need a listfile. The newest and best can be obtained from www.zezula.net (download "Listfiles for MPQ archives"). Now, in WinMPQ, go to Options -> File Lists -> Add List File and open the appropriate listfile that you downloaded. Note that you shouldn't load listfiles that you won't use since it can increase loading times quite a bit.
Report, edit, etc...Posted by Slyence on 2005-06-03 at 17:39:00
Yea, You could have just posted that in the tutorial, Or just told us the link to it happy.gif
Report, edit, etc...Posted by LegacyWeapon on 2005-06-04 at 15:56:06
Submitting the tutorial should be just fine. People get my "We have tutorials for everything!" message enough times to look there first.
Report, edit, etc...Posted by DT_Battlekruser on 2005-06-04 at 16:36:16
No they don't. if they did, you wouldn't still be saying it, would you? lol happy.gif
Report, edit, etc...Posted by Slyence on 2005-06-04 at 16:38:50
People should seriously look through the tutorials first. Instead of wasting our time to just tell them to look in the tutorials. Or supply them with a link.
Next Page (1)