Staredit Network > Forums > Modding Assistance > Topic: Building morphs in Firegraft
Building morphs in Firegraft
Jan 16 2017, 7:31 am
By: Zoko-TkZ  

Jan 16 2017, 7:31 am Zoko-TkZ Post #1

I'm attempting to add a morphable building into my mod, using the same functionality as the hatchery. I'm stuck with my buttons being pressable but not doing anything, and I've been searching for a solution on the forums with no success. My dat requirements all add up (using the template "Current unit is... <worker> Or Current unit is... <building>") and I've increased the upper bounds in the building morph .exe edit to include the building I'm using. I've read that you need to activate a certain .exe edit for this to work so I'm hoping that it is the upper bound/lower bound edit for building morphs, however it isn't really clear to me what that one does.


Jan 17 2017, 11:41 pm Zoko-TkZ Post #2

Update: It seems like this has something to do with unit ids. I experimented a bit with button sets and dat requirements, adding the Lair along with my custom buildings to the button set, and giving the same set to the hatchery (replacing the original). I also tried editing building_morph.cpp in GPTP to include the buildings I want to morph to on its list but that didn't seem to have any effect.

What resulted was that the Hatchery is able to morph, but not my custom building (re-done Khaydarin Crystal) even though both share the same button set, have the same properties in unit.dat, and share the same iscript. Also, the Hatchery was only able to morph to the Lair and for some reason the Infested Command Center, but not any of the other buildings I want to morph to. All of those buildings have the same dat requirements (Current unit is... Hatchery Or Current unit is.... Khaydarin Crystal). The Infested Command Center reverts back to a hatchery when finished morphing, and cancelling the morph causes a crash.

Pretty confused as to why the Crystal won't morph at all or why the Infested CC is morphable but not the other buildings, any help would be greatly appreciated ^^


Jan 18 2017, 9:19 am Corbo Post #3


In your dat requirements did you add the ability for it to morph? I think there's an action/requirement/variable for it. Just look at the hatchery's reqs and do exactly the same or something like so.

Also on Datedit I think there's a morphable flag you need to check.

Also you will be needing iscript building morph animation so it doesn't crash when morphing actually does work.

I tried DLing firegraft so I can help you a bit more but pretty busy ATM. Sorry.

fuck you all

Jan 18 2017, 11:19 pm Zoko-TkZ Post #4

No problem, any help is better than nothing. There isn't any documentation of anyone getting this to work that I could find on the forums so hopefully if I can figure this out I can post exactly what needs to be done.

There are build self orders in the requirements section (BuildSelf1, BuildSelf2, ZergBuildSelf) but none of those use any dat requirements, while the unit requirements are identical for all of the buildings.

No morphable flags that I could find, I tried changing the construction graphic to zerg building morphing but that didn't help. I set the KCrystal's properties in unit.dat to be exactly the same as the hatchery.


Jan 18 2017, 11:39 pm KYSXD Post #5

Did you modify any of this files in GPTP... ?


Maybe you just need to modify
void orders_ZergBuildSelf(CUnit* building);


Jan 19 2017, 1:06 am Corbo Post #6


I have managed to morph buildings before without gptp, though, let me dust off corbobocraft xD

fuck you all

Jan 19 2017, 2:38 am Zoko-TkZ Post #7

@KYSXD, no such function exists in the version of GPTP I am currently using (2.41, 2010 version).


Jan 19 2017, 4:47 am KYSXD Post #8

2.41 for VS2010 is a really outdated version.
UndeadStar is working on updating the old VS2008 version. You should change your source or add the VS2008 updates to your VS2010 version.
Just saying.


  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:51 am]
SolarHound -- Hey if anyone can, I made a post about an error I get opening a SCBW map with SCMdraft 2, need any help.
[06:44 am]
Lanthanide -- Suicidal Insanity
Suicidal Insanity shouted: Since scmdraft used to not have any trigger editor besides plugins, and classic trigedit originally was a plugin, there is a lot of classic trigedit UI state in the trigger data holder. And I am now splitting all of that up into real UI and real data, to support multiple classic trigedit windows =)
oooh, multiple windows will be good
[06:42 am]
Lanthanide -- not sure how relevant that is now with SC being free and not using CD keys though
[06:42 am]
Lanthanide -- so that's why SI didn't want to give the code out
[06:42 am]
Lanthanide -- Jack
Jack shouted: Is scmdraft on github/ever going to be open source?
not on github and probably won't ever be. Starcraft strangely uses the player's CD key in order to create the in-game text. since scmdraft also uses the in-game text, there is code in there that harvests the cd key out of your SC install
[06:40 am]
Corbo -- Ahli
Ahli shouted: NudeRaider I wonder if that landing attempt broke any regulations of flight safety... I'm torn between heroic and unnecessarily risky...
i dont think so. Windy landings like that are far more common than you think. Just youtube. There are a lot more scary looking things like that. Also on fucking 747s and those things weight tons unlike this aircraft
[03:33 am]
KrayZee -- "Look! Up in the Sky! It's a Bird...It's a Plane... It's Superman!" I suppose they appreciate birdwatching and the Blue Angels.
[01:55 am]
O)FaRTy1billion[MM] -- I think SI already said no
[01:40 am]
Jack -- Is scmdraft on github/ever going to be open source?
[12:16 am]
Zycorax -- :wob:
Please log in to shout.

Members Online: Roy, Kimsan, Pr0nogo, T-warp, dpblh