Staredit Network > Forums > Modding Assistance > Topic: Modding Questions
Modding Questions
Aug 11 2008, 9:26 pm
By: Raist760  

Aug 11 2008, 9:26 pm Raist760 Post #1



First off, hello!

So I recently got back into playing SC2 after quite some time. I used to make custom maps and triggers to play with my friends, but I never really got into modding. This time, I got into making maps and triggers again and it finally occurred to me that in order to create some of the ideas that I have, I would need to learn to mod. So I've been poking around online and trying different things over the last few days.

I downloaded a bunch of tools (many outdated, heh) and through all of that I discovered Firegraft, DatEdit, TblPad, etc. I did the whole list file thing with WinMPQ, I've used MPQ Draft, etc. I used DatEdit enough to figure out how to change lots of basic things (stats, weapons, etc.) and those seem to work fine for mods. I later learned that FG doesn't work with 1.15.2 yet so I got the DownGrader and went back to 1.14 so that I could try figuring out FG.

I looked at the tutorial on here and made the SCV, tank, etc., and the basic stuff worked just fine. Now I need to learn to do some of the more complicated things.

There are two main things that I am trying to get right at the moment. One is learning to add buttons. For example, I wanted to try adding a button to the Supply Depot to create/train Terran Civilians. I saw something in FG that changed my mind (not sure what at the moment) and I decided to go with adding a button to the Command Center to train the Civi. I thought I set everything up correctly, but it didn't seem to work. I added a button that should appear next to the SCV button and I set the fields as I thought they should be... But when I tried it, the button didn't even show up. So, what have I done wrong? I tried to set the Civilian up so that it would have the same requirements as an SCV.

- Do I need to use the Terran 1 - Electronic Distribution thing?
- Do I need to edit the stat_tbl?

* Another note on adding buttons, there was a way to do this in StarGraft that did something like change the # of commands... I didn't see an option like that in FG. Did I miss it somewhere?

Ultimately, I wanted to try something simple so that I could learn to add buttons and have them actually function. For my project I intend to change the Jim Raynor (Marine) hero into something like an Elite Marine. It will be tougher, use shields and lasers, etc. But I also want it to be trained at the barracks and of course it will have some requirements. But like I said, that is a project for the near future. First I'd just like to learn to make a button that actually works.

The next thing that I could use some help with (perhaps it is easier?) is working with the upgrades. I wanted to make it possible to buy the infantry weapons and armor upgrades as well as the ship weapons and armor upgrades up to 10 times rather than only 3. I have some custom maps that can take up to 2 hrs and have tons of resources to feed the war machine, but nothing to spend them on other than more units... So I wanted to change the values somewhat so that the times and costs don't get too ridiculous. At any rate, I changed the # of repeats to 5 just to test it out and nothing happened... It still only worked 3 times and then went away like normal.

- What do I need to do here?
- Is this something with the buttons, or perhaps requirements?

Whew, I apologize for the lengthy post and any help for this modding noob is going to be much appreciated!



None.

Aug 11 2008, 10:32 pm Corbo Post #2

ALL PRAISE YOUR SUPREME LORD CORBO

Hi! Welcome to SeN and modding!

Well, all your questions are really common for an starter so you don't have to worry about bothering us, it's called modding assistance for a reason :P

Anyway, I've been working on a new modding complete modding tutorial for a couple of days now. You might want to download it and check it out. It will help you a lot on firegraft and memory editing in general.
Note that the guide is not nearly finish and that the part you're interested in is posted below but you should really read it from the document itself :P Reading on SeN's just tiring.

Quote
Chapter 3 – Learning modding fast, Memory editing.

The tools:
Firegraft v0.93, DatEdit 1.5, TBLPad, WinMPQ

The goal:
Making a couple of unbuildable units buildable. Eeeeasy!
The process:
1. So this is one of the most used and most basic things you’ll want to edit. But first things first, open up the latest firegraft version and under files click new. You’ll see that the list with all the units enables as well as all of the program tabs. There are 2 ways of working on a memory patch 1. You make a new one. 2. You load an existing one by selecting under “Open” a *.mpq with a *.fgp inside it (Firegraft Patch). Right now, click the button sets tab.
2. You can see the list of all the existing button sets and since firegraft is so awesome you get a button preview too. Since we are learning modding you’ll create a new button set instead of modifying an existing one (Pretty ironic, eh?). Right click and select “Add entry” Firegraft now asks you for a name type in: Civilian Set and select count and type in 0 then Accept. Now we have an empty buttonset for us to add things. If you noticed the name, this set it’s going to be used by civilian so we will need it to have the basic commands, Move, Stop, Patrol and Hold Position.
Note: in some cases “Attack” is included in the basic commands but since civilian doesn’t normally attack we won’t do attack.
3. So find a box that says “Add” and click it so the dropdown box comes down and select blank button and in the position type in “1”. Select that button and change the icon from “4 (Goliath turret)” to “228 (move)”. Leave the requirement string empty as it’s a move command and it should really require anything. In the action string find “664 (m<0><3>M<1>ove<0>).
The requirement string is the text that will be shown if the action cannot be fulfilled (not meeting requirements) and the action string is the string that when you put the mouse on the button is what will be shown when you can perform the action in this case the box will say “Move” but if we were building a ghost, for example, and we don’t have an academy it will say “Build ghost: Requires Academy”
4. In the command function find the requirement and set it as “Always” as we explained there should not be any requirements to move but you can always check the list to see what other requirements we have but you won’t have an explanation to them in this chapter.
In the action box find “Move” and set it as such so the action performed when you press the button move and when the “Always” requirement is met is going to be move. At this point you might want to select another button set like Ghost’s and compare your move button with the ghost’s premade one. One of the things we all do is watch how it is done in the existing units for example you can pretty much watch how the “Stop” command is done by looking at other unit’s button set which is EXACTLY what you will do right now.
5. Select the stop button from the ghost button set and learn all the stats it has or write them down. Now go back to your button set for civilian and create a new button, remember how? Find the add dropdown box and create a new blank button, change the Icon the requirement string if needed, action string and the other command’s functions.
Stop should be: Position 2, Icon 229 (Stop), no req string, 665 (s<0><3>S<1>top<0>) as action string, Requirement function “Always” and action “Stop”.
6. Repeat the process you did to do Stop to Patrol but this time I won’t be giving you the stats like I did for Stop.
7. If you’re done with Patrol we will now learn another firegraft feature. Erase everything you have (Move, Stop, Patrol) and in the add dropdown box instead of selecting blank now select “Basic commands”
You see, firegraft, has added you everything you just did in 15 minutes in 2 seconds or less PLUS an attack button and a hold position button that you’re missing. We won’t be using attack so delete it.
That’s basically how you add buttons, some of them, firegraft is gentle enough to provide them so you just do them in clicks but the rest you’ll have to look at other units and copy how it’s done.
Now we’re going to make those units buildable. We’re going to make that civilian we just did and a bear buildable, yes a bear.
8. Go to the units tab and find civilian in the list and change the button set used to the new button set we did. It should be in the very bottom of the list.
What’s so awesome about civilian anyway? It doesn’t attack or anything? That’s why, since you already know how to Datedit, you’re going to make it Detector, give it more HP and shields and getting all that into an mpq.
Open up datedit and find the civilian. Set the HP to 100 and shields to 50 and enable them of course. Now switch tabs (while on the units tab) and go to advanced. And there’s a couple of flags you can edit right now just check the “Detector” flag. You can play around with the rest of the flags after. So save your units.dat and create a new .mpq called fire.mpq and get the units.dat in it under arr\ of course.
9. You can close datedit and winmpq and go back to firegraft. So you know how supply depot is so boring, in the button sets tab find supply depot. I’ll give you 5 minutes to try and find it.

You didn’t find it right? That’s because it’s so boring that it doesn’t even deserve a button set so we’ll create a new button set called SD (or whatever name you want to give it)
Of course it will be a clear button set like always and add a new blank button.
10. The first icon will be civilian so that means that in position 1 we will have civilian’s icon leave the requirement string empty and in the action string find “Turn off shared vision for player 8<0>” a few lines above the last entry from the list. We will be changing this string after via tblpad.
In the requirement function we will set it as “Can create unit/building” and change the variable for it to the unit we want to build, in this case civilian. Next change the action function to Create unit and change the variable to civilian too.
11. We will edit the requirements for the civilian to be built. As you know civilian is nor normally built, moreover not even any unit is built from a supply depot so change tabs and go to “Dats requirements” find the civilian in the list and you’ll see that it is unused, check the little box so it is used and right click to create new arguments. Add two new arguments.
Now select the first one and set it as an op code and in the dropdown box select “Current unit is” and set the next argument to a parameter and find supply depot from the list.
This is telling starcraft’s memory that civilian can be built from a “Current unit” which “is” “Supply depot” in other words it is a dat unit requirement for civilians to be built from supply depots.
12. You’re pretty much done except for the fact that we haven’t added the bear. So go back to our SD button set. And in the add box select “Train unit” instead of a blank button. Firegraft should now ask you for a unit, find the bear (ursadon) and click it. You see now that firegraft has added you almost everything except for a right action string and a requirement string you’re going to change the action string to “Turn off shared vision for player 7<0” and the requirement string to “Turn off shared vision for player 6<0>”. Switch tabs to the dat requirements tab and find the ursadon and add three arguments one of them will be an op code “current unit is” and the next two will be parameters the first one will be supply depot and the next one will be barracks. You’re telling Starcraft that besides supply depot ursadon will also require you to have barracks
Switch to the units tab and change the supply depot’s button set to the SD button set we did and you’re pretty much done with the memory part. We just have a few more things to finish.
13. Open datedit again and you’re going to use the open feature to open the last units.dat you did.
Find the civilian again and edit the build costs and build time as desired (always keeping in mind the balance, remember balance is an important part of a fun mod). Next find the ursadon. Do any changes you wish for HP, costs and build time. And now find the supply depot, switch to advanced tab and check the “Produces units (?)” so it will be able to produce units.
14. Open up TBLPad. Get a copy of stat_txt.tbl from the patch_rt.mpq (it’s under rez\). Find the “Turn off shared vision” series (the ones we selected). If you remember correctly the player 8 was for civilian’s building action string and the other two were used by ursadon. Change the player 8 one to c<1>Train <3>C<1>ivilian<0> and the player 7 to u<1>Domesticate <3>U<1>rsadon<0> and change the player 6 to “Ursadon requires: (press enter for a new line) Barracks<0>” in the end it will look like “Ursadon requires: <10>Barracks<0>”
15. You just need to save your new units.dat file and your new stat_txt.tbl to your .mpq. when you’re done close both programs and go back to firegraft.
Click “File” and select save. It will now ask for a name of an executable give it whatever name you want. It will now ask you if you want to attach a file to it, click yes and select the mpq with the .tbl and the units.dat. It will then ask you for an icon but click no because we don’t want any icons right now :P.
16. Find the executable and run it. SC will run and all changes will be applied. Try and build some bears and civilians also, watch the changes to the strings when you’re about to press the buttons. Have fun.




fuck you all

Aug 12 2008, 2:51 am Raist760 Post #3



Thank you so much Corbo! That actually answers alot of my questions. I'm going to go read what other info you've got in that doc and of course do some more experimenting. It's a relief to find out that I was on the right track... sort of, <ahem>.

Again I appreciate the help and I'll be back with probably even more questions as I muck around with the game some more!



None.

Aug 12 2008, 3:10 am FlyingHat Post #4



Hi there and I'd also like to welcome you to the moddery community!

I hope you make some great content later on. And please join Mod Night which is mentioned in the [MM] Forums which is located somewhere around the bottom of the forum index.



None.

Aug 13 2008, 10:26 am Raist760 Post #5



Alright! I've been having some fun playing around with creating buttons at the different buildings to create various Terran heroes that (of course!) have different weapons and abilities and such. I must admit that it's pretty cool to be able to make SC do something different.

All of my little experiments have worked fairly well and they are all going to fit into a little storyline that I am still working on a bit (as new ideas occur to me).

My next question is this, can you make the armor and weapon upgrades able to be purchased more than the normal 3 times? I've messed with this a little bit and so far no luck. I've actually messed with the upgrades.dat a little here and there already and everything else has worked, but this one escapes me... Perhaps it is time for some sleep... zzz...

Again, thank you so much for the previous assistance! It helped a TON as now I have a much better idea of HOW to make the changes I'm looking for!

<dreams of working with graphics and scripting soon>



None.

Aug 13 2008, 6:50 pm Fyrinite Post #6



It should just be editing the max repeats number in upgrades.dat, because the last Level opcode for the requirements in FG treats it as 3 and above. Nowhere else really should have an effect on that....except maybe a UMS map. Don't test mods on UMS is my suggestion (until you know what it does to some of the data).



None.

Aug 14 2008, 2:48 am Raist760 Post #7



Hmm... Not sure what I did, but I must've messed up somewhere. I modified the upgrades.dat again and this time it worked fine. I appreciate the help though.

On a side note, nice work on FG DoA! That must've been a serious project from start to finish.

Now you've got me curious though... I've done lots of mapmaking and am decent with the triggers and such. So I am familiar with the fact that you need to use UMS settings to play a map the way the designer intended (which is NOT a mod), but I'm not really aware of what that does to the data, as you said. Could you elaborate on this a little for me?

I actually would like to combine both a Mod and maps of my own. What sort of things should I avoid? Are there known conflicts? Is this info available somewhere?

Heh, see? Lot's of questions!

Thanks again!



None.

Aug 14 2008, 3:31 am Hercanic Post #8

STF mod creator, Modcrafters.com admin, CampaignCreations.org staff

Map data takes priority over MPQ data (such as your mod) when playing under the UMS option.




Aug 14 2008, 5:08 am O)FaRTy1billion[MM] Post #9

👻 👾 👽 💪

There aren't really any conflicts or issues if the mod is specifically intended for the map. Most conflicts with UMS are loading random UMS maps that have various units used in the map (which may or may not be modded, or may have portions modded or even recycled and are thus invalid.)

Also, just a tip, if your mod is intended for a specific map, you can save map strings (and some map editing) by editing the unit names and stats within the mod.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Aug 15 2008, 10:02 pm Raist760 Post #10



Ok, thanks for that. I have a couple of basic maps that I made that don't really deal so much with placed units but involve a few somewhat complicated triggers (though none of those deal with placing units so much as the units that the player brings to a location). I'll try 'em out with a mod to two to see what happens.

So now I've been messing around with the upgrades and techs. Simple stuff really like making Protoss Shields upgraded at the Terran Sci Fac, adding buttons to buildings to create heroes, which I of course modded also. I've even messed with giving some units different abilities.

This has led to a couple of different questions. I've looked around in the other topics and such but didn't really see a definite answer. I am curious about the unused upgrades and techs. My question basically is this, is it possible to create a tech on one of the unused ones? Say if I just wanted to copy one tech from one race, but on the new copy assign it to another race, then edit the copy to be something different... For sake of argument, assume that I don't really want to change the original tech, just the copy for the new race.

And on that note, I'm gonna go find my graphics editor and install it. I'll check back later on and thanks in advance! So far you folks have been very helpful!! :)



None.

Aug 15 2008, 11:32 pm O)FaRTy1billion[MM] Post #11

👻 👾 👽 💪

Other than general (non-unit-specific) armor and weapon upgrades, upgrade effects are hardcoded. Techs can be used for button requirements or for linking to an order as an energy cost. Techs really don't do anything more than that (that I can think of at the moment.)

You could possibly give another race a new button that uses a new tech but calls the same order, if that is what you are asking. I've never tried it, so I cannot give a definite yes/no. Orders reference a tech for energy cost, so that would be the same.



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Aug 23 2008, 1:44 am Raist760 Post #12



I need a little assistance again... Okay, this time I am trying to learn to do some iscripting. I wanted to start with something simple again and thought I would try giving the Terran Dropship the ability to attack ground and air units with a gauss rifle. Seems fairly basic! I've looked at some of the other units scripts and I think I basically understand how it works.

Here's the thing, I haven't changed any graphics, I was planning on implementing that a little later on. All I really wanted to do was see if I could get the attack working. I decompiled the Dropship, made a DropshipGndAttkInit.... I then tried using attack25 1. Set the header to use DropshipGndAttkInit for GndAttkInit, AirAttkInit, etc. However, when I try to compile the script, IceCC 1.3 gives me all sorts of errors and doesn't make the iscript.bin file.

It tells me that it can't find the label DropshipGndAttkInit (even though it is quite clearly right there), and then it gives me syntax errors. Now granted, this is the first time I've really messed with iscripts. Any advice on what I am doing wrong or need to do to make this work?



None.

Aug 23 2008, 3:14 am Polaris Post #13



Your Iscript should look something like this:

Code
.headerstart
IsId               68
Type               12
Init               DropshipInit
Death               DropshipDeath
GndAttkInit         DropshipGndAttkInit
AirAttkInit         DropshipGndAttkInit
Unused1             [NONE]
GndAttkRpt         DropshipGndAttkInit
AirAttkRpt         DropshipGndAttkInit
CastSpell           [NONE]
GndAttkToIdle       DropshipGndAttkToIdle
AirAttkToIdle       DropshipGndAttkToIdle
Unused2             [NONE]
Walking             DropshipWalking
WalkingToIdle       DropshipWalkingToIdle
SpecialState1       [NONE]
.headerend
# ----------------------------------------------------------------------------- #

DropshipInit:
    imgul               224 0 42     # DropshipShad (terran\dropship.grp)
    playfram           0x00     # frame set 0
    goto               DropshipWalkingToIdle

DropshipWalkingToIdle:
    setvertpos         1
    waitrand           8 10
    setvertpos         2
    waitrand           8 10
    setvertpos         1
    waitrand           8 10
    setvertpos         0
    waitrand           8 10
    goto               DropshipWalkingToIdle

DropshipDeath:
    playsnd             210     # Terran\DROPSHIP\TDrDth00.wav
    imgol               332 0 0     # TerranBuildingExplosionsmall (thingy\tBangS.grp)
    wait               3
    end                

DropshipWalking:
    imgol               225 0 0     # DropshipGlow (thingy\tdrGlow.grp)
    setvertpos         0
    goto               DropshipLocal00

DropshipLocal00:
    wait               125
    goto               DropshipLocal00

DropshipGndAttkInit:
    wait         1
    attack
    gotorepeatattk
    goto         DropshipGndAttkToIdle

DropshipGndAttkToIdle:
    wait         1
    goto         DropshipLocal00


Hopefully that answers your questions.



If anything cool is ever going on Skype me up under the name "blarghle"

Aug 23 2008, 5:05 am Raist760 Post #14



Thanks to you Polaris! All I had to change in the iscript was the attack line... I read through the files that came with IceCC and I had put attack25 1, but it certainly didn't like that! It gives a syntax error for that and won't save. Is there something wrong with that command? Earlier version or something? IDK.

At any rate, I fixed the script and the dropship would fly towards its target all menacing like it was gonna do something and then all it would do was follow the target around... <smacks head on keyboard> Why?!

And then it dawned on me... I forgot to change the settings on the AI tab. Duh! So yeah, now it works great!

<smacks head on keyboard again for missing something so obvious>

Thanks again! :D



None.

Aug 23 2008, 4:00 pm Polaris Post #15



No problem. And yes, attack25 doesn't need a 1 after it. Heck, I dont even know if it works on IceCC 1.3.... I havent ever needed to use it. Besides, its better to just use attackwith's or attack's, you dont need a 25 after it. :P



If anything cool is ever going on Skype me up under the name "blarghle"

Aug 23 2008, 10:00 pm Doodle77 Post #16



Many command names were changed in IceCC 1.3, attack25 became attackwith, attack26 became attack.



None.

Aug 24 2008, 11:40 am Raist760 Post #17



Once again, I thank you folks for your assistance. I think I'm starting to get the hang of iscript... Maybe. At any rate, I created a button at Barracks to create a civilian (which I modded to use shields, grenades, and longbolt missile). I changed the iscript for it and it worked! It was kind of amusing blasting zerglings into pools of blood with a grenade lobbing civilian!

Now, I've finally got my graphics editor set up and I'm getting ready to try playing around with some graphics to fit (hopefully) some of the ideas I have.

I've also been looking through the mapping forums/topics too. Lots of good stuff in there. I think the thing that caught my attention the most was seeing different tilesets mixed... When I was first making maps for my friends (long ago!) I had wished to be able to mix the tilesets. And now apparently this is possible? Is there some sort of program for this?



None.

Aug 24 2008, 2:05 pm Symmetry Post #18

Dungeon Master

Quote from Raist760
I've also been looking through the mapping forums/topics too. Lots of good stuff in there. I think the thing that caught my attention the most was seeing different tilesets mixed... When I was first making maps for my friends (long ago!) I had wished to be able to mix the tilesets. And now apparently this is possible? Is there some sort of program for this?

There are a few tile editing programs, namely Hawt Tiles (although I fail to remember if Farty ever released it to the public). However, be warned, mixing tilesets is a lot of work and may not give you the results you imagined.



:voy: :jaff: :voy: :jaff:

Aug 24 2008, 4:45 pm Polaris Post #19



Quote from Raist760
I've also been looking through the mapping forums/topics too. Lots of good stuff in there. I think the thing that caught my attention the most was seeing different tilesets mixed... When I was first making maps for my friends (long ago!) I had wished to be able to mix the tilesets. And now apparently this is possible? Is there some sort of program for this?
Yeah, is possible... but not easy, as Debardus said. Its hours of work, and it probably wont be worth it.



If anything cool is ever going on Skype me up under the name "blarghle"

Aug 25 2008, 2:07 am FlyingHat Post #20



Quote from name:Debardus
There are a few tile editing programs, namely Hawt Tiles (although I fail to remember if Farty ever released it to the public). However, be warned, mixing tilesets is a lot of work and may not give you the results you imagined.
Farty did release it to the public. You just need to know how Farty names his files on his server and what the latest version was released. ;)



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[04:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
Please log in to shout.


Members Online: zsnakezz, Roy, bentleyevega