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.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Ultraviolet