Morphing
Jun 9 2008, 4:48 am
By: slient  

Jun 9 2008, 4:48 am slient Post #1



Hi,
I've given the Zergling a button to morph into a modified Devouring One.
The morph requires "Unknown Tech 33" which can be upgraded at the Spawning Pool.
Requirements all look fine and I have the "Check Unit Type" fields for Unit Morph set to disabled.
Everything works fine until I upgrade the tech, then the morph button on the Zergling disappears.
What I did I do wrong

Also on a somewhat related note,
I want my modified Devouring One to have an ability to allow it to explode and deal damage. This ability would also be researched at the Spawning Pool.
How would I go about making this?

Thank you



None.

Jun 9 2008, 5:11 am Impeached Post #2



You could probably modify the PsiStorm for the exploding zergling ability. Change the graphic, up the damage, shorten the time period. It would kill enemies and allies alike, including the zergling.



None.

Jun 9 2008, 6:42 pm Fyrinite Post #3



The requirements normally cause the button to disappear, mind posting the unit requirement for the req var you put on the morph button?



None.

Jun 9 2008, 8:37 pm slient Post #4



Quote
The requirements normally cause the button to disappear, mind posting the unit requirement for the req var you put on the morph button?
I'm not quite sure what you mean there
The morph button requires a tech...
unless you mean the Devouring One's requirements, in which case I have:
Quote
Must be Brood War
Current unit is...
Zergling
Is researched...
Unknown Tech 33


Quote
You could probably modify the PsiStorm for the exploding zergling ability. Change the graphic, up the damage, shorten the time period. It would kill enemies and allies alike, including the zergling.
I'm trying to keep everything else intact though...
Also, that might be a bit too much damage


And one more question, how does the unit know which "weapon" to use when you cast a spell? I see nothing linking techs and weapons or buttons and weapons together.



None.

Jun 9 2008, 8:41 pm A_of-s_t Post #5

aka idmontie

Quote from slient
Quote
The requirements normally cause the button to disappear, mind posting the unit requirement for the req var you put on the morph button?
I'm not quite sure what you mean there
The morph button requires a tech...
unless you mean the Devouring One's requirements, in which case I have:
Quote
Must be Brood War
Current unit is...
Zergling
Is researched...
Unknown Tech 33


Quote
You could probably modify the PsiStorm for the exploding zergling ability. Change the graphic, up the damage, shorten the time period. It would kill enemies and allies alike, including the zergling.
I'm trying to keep everything else intact though...
Also, that might be a bit too much damage


And one more question, how does the unit know which "weapon" to use when you cast a spell? I see nothing linking techs and weapons or buttons and weapons together.

The button in FG has a spell attached to it. The iscript uses "castspell." Thats pretty much how a spell works.



Personal GitHub
Starcraft GitHub Organization - Feel free to request member status!
TwitchTV

Jun 10 2008, 8:39 pm slient Post #6



Quote
The button in FG has a spell attached to it. The iscript uses "castspell." Thats pretty much how a spell works.
I thought that the button has a tech attached to it... at least that's what it looks like.



None.

Jun 10 2008, 11:07 pm Fyrinite Post #7



Buttons use the act var to know what order to run. The order has the weapon and tech references.

The requirements look okay, I don't know exactly why the button is disappearing.



None.

Jun 11 2008, 1:37 am slient Post #8



Quote
Buttons use the act var to know what order to run. The order has the weapon and tech references.
ah I see it...
my ability isn't working though
Button with Action and Requirement variables set to Tech 35
I've modified Guardian Aspect to use my weapon and Tech35
button clicks, nothing happens

As for the Zergling, morphing works fine if it has Always as the Req function but as soon as I add a requirement, the button disappears when the requirement is met. Same thing happened when I tried adding an ability to it too.



None.

Mar 31 2014, 4:03 pm 09xela Post #9



I had such problem. Zreling morphing into Ultralisk. I've fixed it by using GPTP (requies at least basic C++ skills).



None.

Apr 2 2014, 3:23 pm 09xela Post #10



Here is short explanation: http://www.moddb.com/members/alerman/tutorials/unit-morph-for-all-units



None.

Apr 11 2014, 8:00 am Sand Wraith Post #11

she/her


That's amazing! I am going to duplicate the text here just in case there needs to be a backup.

Quote
Unit morph for all units

There are problem in firegraft: Unit morphing aborts if you try to do it from any unit, different from larva, hydralisk, or mutalisk. This tutorial explains how to fix this bug.

Posted by Alerman on Mar 31st, 2014
Advanced Server Side Coding.

For Example - in Gravity mod Ultralisk - next stage of zergling development. Zergling, actualy, can't morph, cause it has no specific coocoon unit. However it can be fixed trough firegraft/stardraft plugins. I've used GPTP 2.4 to allow zergling morph. You should download GPTP 2.4, and Firegraft 1.16.1 to mess with this:

1) Open project. Go to "unit_morph.cpp", and after lines:
Code
 if (unit->id == UnitId::larva || unit->id == UnitId::mutalisk) {
   if (unit->canMakeUnit(morphUnitId, *ACTIVE_NATION_ID) == 1) {
     return true;
   }
 }


paste this:
Code
 if ( unit->id == UnitId::ZergZergling )
 {
   if (unit->canMakeUnit(morphUnitId, *ACTIVE_NATION_ID) == 1 )
     return true;
 }



2) This were procedure checking abilitu to morph. But it is not enough to fix all - most morphing units has their specific cocoon unit. To select it for zergling - go lower to:
Code
if (unitId == UnitId::hydralisk )
   return UnitId::lurker_egg;


Replace this by:
Code
if (unitId == UnitId::hydralisk || unitId == UnitId::zergling )//Secondary Coocoon
   return UnitId::lurker_egg;



3) After this you may compile your plugin. Zerling will be able to morph in any other zerg unit. Actualy that was all coding part. If you know about dat requiments you needn't to explain the rest. But there is a small thing, usefull to know:

Firegraft

4) Zerg don't do abortions. Also, in real life (insects, or amphibous) metamorphose once started can't get interrupted. So, open Firegraft/button sets, and select button set 17 (Egg/Cocoon); in lower right side of window you can se list of units using it. By doubleclick on unit you can go to unit options page in firegraft. For each morph unit must be selected button set "None". This need to avoid 2 bugs in one time: 1st - connection between unit's native hatchery (after morphing unit will run to hatchery's rally point), and second - changing unit type on cancel (you tried to morph queen in matriarch, and when cancelled - got mutalisk).

E N D





Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-6-23. : 3:29 am]
DarkenedFantasies -- Probably just didn't care. For example, at some point before release, they've updated the graphics of some of the Protoss buildings (Forge, CyberCore, Citadel, Observatory, Arbiter Tribunal), but instead of properly re-rendering them with edited 3D models, they did crappy copy-paste jobs on the rendered graphics.
[2026-6-22. : 8:35 pm]
Ultraviolet -- :wob:
[2026-6-21. : 11:38 pm]
Symmetry -- :wob:
[2026-6-21. : 4:56 am]
Ultraviolet -- I suppose we'll likely never know, but my guess would be that they already saw it operating successfully and there was no monetary incentive to finish the original work. And the dev cycle in old school Blizzard was so hectic, it's possible it just got forgotten about after the original game got released. Plus there's an element of existing MPQ files that were packaged with the original discs becoming outdated if they updated it. And it's not like they remade the original MPQs, they just made new ones for BW specifically
[2026-6-21. : 4:26 am]
Oh_Man -- so that makes me think maybe the theory they are unfinished is not true and its a deliberate design decision, coz why not finish them wen ur making brood war?
[2026-6-21. : 4:25 am]
Oh_Man -- the thing is thos buildings are from classic. that means they went ahead and made brood war without ever finishing the 'unfinished' buildings
[2026-6-20. : 6:15 pm]
Ultraviolet -- Yeah he's talked about a lot of that stuff in his casts before. It seems plausible. Especially knowing how Blizzard of yesteryear operated.
[2026-6-20. : 3:47 pm]
NudeRaider -- to clarify: couldn't recall the behavior for every single Protoss building but I was aware the disparity exists.
[2026-6-20. : 3:43 pm]
NudeRaider -- Contained nothing new for me. Didn't know all building's behavior, but very much all unit's. Also Terran balance whine - also nothing new :lol:
[2026-6-19. : 9:57 am]
Oh_Man -- makes me wonder if SEN knows anything about the topic
Please log in to shout.


Members Online: jun3hong, Roy, Moose