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.
[06: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.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: Roy