Staredit Network

Staredit Network -> Modding Assistance -> Warpable buildings for other races?
Report, edit, etc...Posted by SirBean on 2005-12-10 at 19:57:26
So it's been quite a while since I was into Starcraft Modding (since before Camsys died...) I'm trying to get my long time project to a point where I can present it here and maybe get some professional help, but these 2 huge obstacles have plagued me for years. Please bear with my questions if they're a bit noobish:

1) Could I theoretically make zerg buildings warpable? I'd still like the drone to be used up in the process, but what I'd like to happen is:
- Drone goes to build location
- Instead of the Zerg building spawn graphic, when the drone disappears it's replaced with the protoss warp graphic.
- Here's the tricky part: when the zerg building birth graphic should be placed, the building warps in protoss style, using the warp texture as the outline of the building slowly fades in.

I'm pretty sure I can just replace the zerg building spawn graphic with the protoss warp spark graphic, and if need be, I can replace the zerg building birth graphic with a generic warp animation (no outline of the specific building) But it'd be so much better to have the buildings actually warp in.

2) On a different topic, is it possible for the terran buildings to be ground moving instead of airborne? You'd click lift off as usual, but after the animation plays, it remains ground based, but moveable. Just hovering along is fine, but if possible, I'd like to maybe even add some wheels or some moving animation.

If there's a possiblity that either could work, it would help my mod along in a big way...
Report, edit, etc...Posted by Rikimbo on 2005-12-11 at 12:58:14
Nice, I'm in the same boat as you; I used to mod back when CamSys was still around, and also just got interested in it again recently. smile.gif

Alright, just to clarify: You want all zerg buildings to warp in instead of their usual bubbly organic thingy? Keyword *all*? I worked recently for one of my mods on adding a new protoss building, and making it warp in *properly* (with the animation using the warp texture and all) was quite tricky. But I'm happy to say I figured out a way to do it, and I think it could work here... Perhaps I'll experiment. happy.gif

I'll get back to you shortly. smile.gif
Report, edit, etc...Posted by Staredit.Net Essence on 2005-12-14 at 02:56:26
you can change how the building looks when
its getting build by going into Arsenal 3 and
goto unit editor Choose a building, on the graphics
tab, it will say construct and a number Thats
how the building will be construced, warping,
building, or morphing, now just by looking at
what is in the the construct box you should see
by changing the numbers in there will change
how the building if built

but i dont know about drone dissapering...
Report, edit, etc...Posted by SirBean on 2005-12-14 at 05:44:00
QUOTE(loads_of_fun @ Dec 14 2005, 12:56 AM)
you can change how the building looks when
its getting build by going into Arsenal 3 and
goto unit editor Choose a building, on the graphics
tab, it will say construct and a number Thats
how the building will be construced, warping,
building, or morphing, now just by looking at
what is in the the construct box you should see
by changing the numbers in there will change
how the building if built

but i dont know about drone dissapering...
[right][snapback]378548[/snapback][/right]


Umm... no. It's much more complicated than that. If you'd actually checked Arsenal 3, you'd see that all protoss buildings have a value of 0 or "none" for their construction animation. That makes sense because the protoss building animation is not a generic one like the terran's construction sites or the zerg morph blobs, which are the same for all their buildings, only with different sizes. The protoss animation is also not unit specific, requiring a different .grp for each building. Instead, it takes whatever building graphic you plug in and uses that as an ouline for the warp texture animation which plays under it. So what we're looking for couldn't be in the construction animation, which points to a graphic file. I'm thinking it's a specialized command (hopefully) in iscript.bin. I just hope its not hard coded... unsure.gif
Report, edit, etc...Posted by DiscipleOfAdun on 2005-12-14 at 09:57:32
QUOTE(SirBean @ Dec 14 2005, 04:44 AM)
Umm... no.  It's much more complicated than that.  If you'd actually checked Arsenal 3, you'd see that all protoss buildings have a value of 0 or "none" for their construction animation.  That makes sense because the protoss building animation is not a generic one like the terran's construction sites or the zerg morph blobs, which are the same for all their buildings, only with different sizes.  The protoss animation is also not unit specific, requiring a different .grp for each building.  Instead, it takes whatever building graphic you plug in and uses that as an ouline for the warp texture animation which plays under it.  So what we're looking for couldn't be in the construction animation, which points to a graphic file.  I'm thinking it's a specialized command (hopefully) in iscript.bin.  I just hope its not hard coded... unsure.gif
[right][snapback]378580[/snapback][/right]


Sorry, it is. It's part of the (Memgraft) action "Warp Building - Protoss", or something like that. The iscript for the warp also leads into the flash iscript, then the actual building shows up.
Report, edit, etc...Posted by SirBean on 2005-12-14 at 10:54:59
Ahh... I'm fairly new to memgraft... but I realized the same thing after playing around with it. I've been able to get a probe to warp in zerg buildings. Now is it possible to get a drone to do the same thing? I've given the zerg building graphics the same animation type and commands as the protoss buildings in iscript and changed each building's command to "create building (protoss)" in Memgraft. I've also given the drone all the animation scripts a probe has in iscript. However, when I give it the order to build, it just sits there and doesn't do anything... confused.gif

On a related topic, when I save my project in memgraft and try to reopen it, it always crashes. That means I'm unable to save any progress. I'm using the new memgraft for 1.13e. Is this a known issue?



Report, edit, etc...Posted by DiscipleOfAdun on 2005-12-14 at 14:51:40
It's a result of bad planning and everything. When I updated it, I used the 1.12b version, which has the same problem.

The thing might be because the drone isn't a protoss unit, it's zerg. I think the action is restricted on race.
Report, edit, etc...Posted by Voyager7456(MM) on 2005-12-14 at 14:59:05
I don't think it is restricted by race. A while ago nirvanajung asked about getting probes to build like SCVs, and we were able to do it.
Report, edit, etc...Posted by nirvanajung on 2005-12-14 at 21:52:30
QUOTE(Voyager7456(MM) @ Dec 14 2005, 01:59 PM)
I don't think it is restricted by race. A while ago nirvanajung asked about getting probes to build like SCVs, and we were able to do it.
[right][snapback]378701[/snapback][/right]


yes i did that

check this thread, http://www.staredit.net/index.php?showtopic=22514, then can find way for building behavior other races wink.gif
Report, edit, etc...Posted by SirBean on 2005-12-15 at 08:15:24
Ahh that helped immensely, nirvanajung & voyager7456! I would have never thought to check the build order requirements!

Now the only question remaining for me is how to do a warp flash for each zerg building. I've added to each zerg building iscript entry an additional command for unknown 21 which for protoss buildings point to a warp flash entry in images.dat for the building.

Now if I understand this correctly, these warp flash entries all refer to the same iscript header (192), and each just refer back to the same .grp as each building. Seems easy enough to make entries for zerg building warp flashes, but I can't make new entries to images.dat, can I? confused.gif

It seems my options now are:

1) Edit an unused entry in images.dat to be a "generic" warp flash for the zerg buildings (refer it to a 1 pixel .grp or something)

2) Make the protoss build another way and edit their warp flash entries so they point to zerg buildings.

Does this sound about right? Can I actually add entries to images.dat? Is there a way to make the warping in animation "skip" the warp flash animation and go right to the building?

On a related note, I noticed that all the original SC protoss units have a warp flash entry (listed as unknowns in images.dat). I don't believe these are used, since no new protoss units have them. It seems like all protoss units were supposed to have a warping in animation when they were created. Maybe these can be my replacement warp flashes...





Report, edit, etc...Posted by Rikimbo on 2005-12-15 at 18:11:05
QUOTE(SirBean @ Dec 15 2005, 08:15 AM)
On a related note, I noticed that all the original SC protoss units have a warp flash entry (listed as unknowns in images.dat).  I don't believe these are used, since no new protoss units have them.  It seems like all protoss units were supposed to have a warping in animation when they were created.  Maybe these can be my replacement warp flashes...
[right][snapback]379315[/snapback][/right]

Yeah, that's what I had done to make my new Protoss building warp in; That is I edited one of those unused entries in the dat file to refer to my building graphic, and then the warping in animation is seamless and uses the warp texture filter. I'm just very picky about the way warping in looks like when you use that 'onepixel.grp' method (I don't like the way the building just kind of appears after the warp flash explodes...) Thing is that I don't know if there are enough of those entries to cover all of the zerg buildings. Are there?

Man, I wish I had known about these other resources earlier... because I had to figure that all out on my own! Haha... oh well, it was a fun problem-solving experience wink.gif

So yes, if you can, definitely use those unused entries for your replacement warp flashes, if there are enough. You'll get the best results that way.

EDIT: Yes... um, and sorry for not replying faster, like I kind of implied I would... I'm in exam period right now. sad.gif
Report, edit, etc...Posted by SirBean on 2005-12-15 at 20:20:33
QUOTE(Rikimbo @ Dec 15 2005, 04:11 PM)
I'm just very picky about the way warping in looks like when you use that 'onepixel.grp' method (I don't like the way the building just kind of appears after the warp flash explodes...)  Thing is that I don't know if there are enough of those entries to cover all of the zerg buildings.  Are there?

EDIT:  Yes... um, and sorry for not replying faster, like I kind of implied I would... I'm in exam period right now.  sad.gif
[right][snapback]379581[/snapback][/right]



Hey no prob. I feel the same way about the 1 pixel thing. There are 10 unused protoss unit warp flashes, and 11 zerg buildings that need the warp flash, so it almost covers it.

What are some other unused images.dat entries I can use as a warp flash entry?

One more issue that I just thought of is what to do with the zerg buildings that spawn from other buildings (i.e. sunken, spore, lair, hive, greater spire)

It just seems incomplete to me to have those buildings use the morph animation when everything else is warping in so nicely but I can't figure out a way to make the zerg morph use the protoss warp animation. Heheh, I guess I'm back to my original question in the first place... tongue.gif

There's no way to edit what each command in memgraft actually does, right? Like we can't break something like "create building (zerg)" down and see what each step for this command would be?


Actually I thought of something:
Would it be possible to replace the morph building graphic for the zerg upgrade buildings so they use terran construction graphics instead? I'd just have to add construction animations for the zerg buildings and change the arsenal 3 construction animation numbers, right? I'll give it a shot...
Report, edit, etc...Posted by Voyager7456(MM) on 2005-12-15 at 20:48:08
Here's a few unused images.dat entries:

503 WhiteCircle
507 Venom
508 VenomHit
419 AcidSpray (I Think)
420 AcidSprayOverlay

There's more, but I can't remember them right now.
Report, edit, etc...Posted by SirBean on 2005-12-15 at 22:02:55
Cool...
I got the zerg upgrade buildings to use the terran construction animation as well...

But now I've just run into a huge new problem:

You know how when you cancel a zerg building morph, the morph blob explodes, and your drone comes back?

Well, now that my drones warp in buildings, when I cancel the warp, it plays the morph blob explosion instead of making the warp ball dissappear, and creates a new drone with 1hp. It was pretty funny at first, but...

How do I get it so that it plays the normal cancel warp animation, like for the protoss?

Looking in memgraft, both the regular cancel construction command and the zerg cancel mutation command actually refer to the same command. Does that mean that this quirk is hard coded into the drone, and not command specific?

As I test, I've given the drone the terran scv build commands, and the same thing happens, the drone builds like an SCV, but when you click cancel, the morph blob explosion plays instead of the terran cancel construction explosion, and you get another drone.

As a last test, I made the SCV able to warp buildings, and it cancels fine: the warp ball just dissappears.

So are my conclusions accurate? Would I have to replace the drone with another worker? Could there be something in units.dat? Arrgh. Just when it seems to be done... ranting.gif


***UPDATE***

Ok, so it just gets worse and worse... To test my theories, I replaced the drone with a probe, made it morphable from a larva, gave it the zerg drone commands (with the buildings still warpable) and ordered it to warp in a creep colony. I clicked the warp ball, hit cancel, and...

...the building exploded and gave me a drone back. wallbash.gif

So this basically means that the zerg cancel construction routine (morph explode, create new drone) is race specific, right?

I'm gonna perform one last test and try to make terran buildings morph from the scv. We'll see if anything happens when I try to cancel a construction in progress. My money is that the building will explode terran style and you'll be short an scv. Any takers?
Report, edit, etc...Posted by DiscipleOfAdun on 2005-12-15 at 22:10:12
I bet it's based on the Zerg building ID. Or it could be a race restriction. Either way, its most likely a hardcoded thing.
Report, edit, etc...Posted by SirBean on 2005-12-15 at 22:19:58
QUOTE(DiscipleOfAdun @ Dec 15 2005, 08:10 PM)
I bet it's based on the Zerg building ID. Or it could be a race restriction.  Either way, its most likely a hardcoded thing.
[right][snapback]379842[/snapback][/right]


It certainly seems that way... my question is where exactly is race actually determined? Is it the tag under the staredit tab in arsenal 3? Is it whatever you put into the particular building command set (zerg basic buildings, protoss advanced buildings, etc) for each race in memgraft?

So if I put all the zerg buildings into the protoss building command set, and gave those to the drone, would it work?
Report, edit, etc...Posted by DiscipleOfAdun on 2005-12-15 at 22:28:09
Here's how it works. The race is in Units.dat. The exe reads it, Zerg first, then the other two, I think. I have the dis-assembly of the routine on my modding computer, and exactly how it works. Anyway, it only returns one race value(clearing the others). That's why I think Zerg is returned first. I think Terran is last...but I'm not too sure.
Report, edit, etc...Posted by SirBean on 2005-12-16 at 02:17:55
Ahh... ok, so I've finally got it to work by changing the group flags under the staredit tab in arsenal 3 from zerg to protoss.

But of course, changing the race to protoss brings its own problems. Now when you tell a zerg building to upgrade (say creep colony into a sunken,) and then cancel the construction, the entire building is destroyed...

so it looks like after all I've tried:


1) Only Zerg buildings can be morphed properly(either as construction or as an upgrade), and Zerg buildings will only build properly if they're morphed.

2) Only drones can morph into buildings properly

3) Morphed buildings appear with a patch of creep placed under it.



It looks like the stats changed by race for buildings are:
- Building placement sounds

- Construction cancellation animations

- Which counter keeps track of supply (terrann, toss, or zerg)


And special race specific "quirks" are:
For Zerg: Automatically buildable on creep, morph specific cancellation animations.

For Terrans: Buiidings lose life when life bar red, repairable

For Protoss: None?


That means the whole zerg - Morph - creep combination is very hard to seperate, making the Zerg the least mod friendly, building wise, while the protoss is probably the most.

Well, thanks to everyone who helped out! As usual, I end up with more problems than when I started, but oh well... ermm.gif

Wish I had some sort of race editor... that and a time machine... and maybe a monkey butler...
Report, edit, etc...Posted by TERRAINFIGHTER on 2005-12-16 at 10:40:54
QUOTE(SirBean @ Dec 16 2005, 02:17 AM)
For Zerg: Automatically buildable on creep, morph specific cancellation animations.

For Terrans: Buiidings lose life when life bar red, repairable

1. uncheck organic unit and creep building in the advanced tab
2. hardcoded
3. hardcoded
4. uncheck mechanical in advanced tab
Report, edit, etc...Posted by Pauper on 2005-12-16 at 19:12:23
For the terrN take off the air movment and make it hover but leave ground chaeck
Report, edit, etc...Posted by SirBean on 2005-12-17 at 06:18:32
QUOTE(TERRAINFIGHTER @ Dec 16 2005, 08:40 AM)
1. uncheck organic unit and creep building in the advanced tab
2. hardcoded
3. hardcoded
4. uncheck mechanical in advanced tab
[right][snapback]380128[/snapback][/right]


1) It actually is race specific. When you change any building's race to zerg, it automatically becomes creep buildable, regardless of any other tags it has checked. I'm not exactly sure what making a building organic does, but it doesn't make it creep buildable. The creep building tag restricts the building to only creep. The zerg hatchery is not a creep building, but it can be built on both creep and ground. You change its race, and it loses this ability.

4) This is race specific as well. The mechanical tag is mainly used for lockdown purposes. Units must be Terran and mechanical to be repairable. The building burn thing is race specific as well. You can uncheck the mechanical tag for any terran building, and it will still lose health when the life bar's red.


Pauper: Nothing you do to the movement flags changes the way terran buildings move in any way.

Just a general note: Don't get me wrong, I absolutely appreciate people taking the time to read and respond, but I think you should only state something as fact when its something you've actually tested and seen yourself. If you have a theory, then say "maybe..." or "This might work..." This avoids misinformation and wasting people's time[/rant] huh.gif
Report, edit, etc...Posted by DiscipleOfAdun on 2005-12-17 at 10:38:21
I've got exactly how the race routine works here, so this might help if you come up against other race-restricts. The code does this(simplified from assembly)

Load the Flags
Check If Zerg is turned on
If it is, return the value of 0
If not, check if protoss
If it is, return the value of 2
If not then do a routine that computes terran or not, returning 1 if terran, and 4 if neutral/no race.

In other words, you can't trick it by turning on two races. I wish it were so, but you can't. Also, if you turn on Zerg, it won't look at the other ones. And Protoss means it skips checking for Terran.

As for #4, you're right. But, if you turn on another race for the building over Terran, if it check the race with the above routine(sometimes it won't, which is stupid of Blizzard, but it happens)

As for organic, it's mainly used in determining spell targets. Good modders can make a spell target all mechanical stuff, including buildings. And, anyway, all Zerg are organic, so it makes sense to have it on.
Next Page (1)