View Full Version : Building Morphs/Upgrades/Changes/whatever
BlademasterSlsh
06-16-2008, 4:42 PM
Yeah... Still plugging away at some SC2 type things. I've managed to make a Command Center pick up and drop 5 units (all infantry) and I've managed to get an Infested Command Center to build SCVs,disabled it's ability to lift off, and made it capable to accept resources (this only works if there is a Command Center somewhere else on the map, and any recommendations on how to fix this would also be appreciated). Now the big problem is going from Command Center to change into an Infested Command Center.
I've tried copying some of the code from the Zerg Hatchery/Lair/Hive, but so far there hasn't been any progress. I've changed the Infested Command Center to a Terran Building via DatEdit, but I suspect there is something deeper than that since I'm unable to build an Extractor either.
TheNomad
06-16-2008, 11:29 PM
There are some exe edits in FG, (I don't remember how many, I think 4 or 6) that change the morph limits and I believe there is one for resource dropping as well.
BlademasterSlsh
06-16-2008, 11:48 PM
I've looked at the exe edit tab, but I don't understand how to edit it I guess. I assume the number next to the Unit Name has something to do with it, but other than that I'm lost.
TheNomad
06-17-2008, 12:40 AM
More than just "something to do with it", it's the unit ID. You can change either.
Hmm, this is why I said you should take it easy and learn step by step. You must learn the unit IDs and weapon IDs (or at least the important ones) so you can spot errors easier.
Building Lower ID (Original) means the first building allowed to morph.
Building Higher ID (Original) means the last building allowed to morph.
Building Lower ID (Morph) means the first building allowed to be morphed into.
Building Higher ID (Morph) means the last building allowed to be morphed into.
Durandal
06-17-2008, 2:00 AM
This is a little random, but, is it possible to successfully give the Terran Command Center a weapon turret that can be used when both flying and gronded?
TheNomad
06-17-2008, 2:23 AM
i thought of trying it out and I have the code and settings in my head...
It should work without problems (not sure about when flying though, but should work as the condition is "Unit has a weapon").
I recommend you do it with a "virtual turret" like the missile turret and not with a subunit. The thing is I am not 100% sure if the engine likes moving buildings without a subunit. But try it out and let me know as I wanna try it too.
Try it with a virtual turret first, and if it doesn't work, use a subunit but make sure you assign an overlay to it.
BlademasterSlsh
06-17-2008, 8:28 AM
I'm tackling that next (now that I finally have iscript working). The thing is, I won't have to worry about whether SC likes moving buildings with turrets or not, since the Planetary Fortress can't lift off :)
Ok, the Command Center now starts to morph. It stops graphicly changing at one point, but I'm 90% certain that is because the Infested Command Center doesn't have it's partially built graphic, and that can be changed by making a copy of the Command Center GRP.
Now, (and surely someone predicted this would come,) I've changed the values (which were originally Infested Command Center and Cerebrate Daggoth) to Command Center and Infested Command Center and the Zerg stopped morphing. I changed the Infested Command Center to Cerebrate Daggoth and everything is fine and dandy. Does this mean that going from Marine to Terran Vespian Tank 2 would allow any unit to morph (for buildings, that is) if they had the right button?
[Edit]... So much for the Infested Command Center graphic. As I originally thought, it is just an image thrown over the existing Command Center. Should I just switch to another building or is there a way to fix this?
TheNomad
06-17-2008, 2:46 PM
Which values did you change ? Sorry... didn't understand and re-explain the error.
BlademasterSlsh
06-17-2008, 4:15 PM
Ok. Here it is.
Lower ID Bound(Original)/(Morph) = Command Center
Upper ID Bound(Original)/(Morph) = Cerebrate Daggoth
I have developed a little problem when it morphs. I ran another test and I don't think it has anything to do with images. The build bar gets all the way to full, but it doesn't change over. Likewise, the graphic appears stuck as one of the Terran building under construction. I take an SCV over to it and right click and the graphic snaps back to the Command Center (and it is indeed the command center, not some other building with a graphic overhaul). If I press cancel at any time during the conversion, the whole Command Center blows up. It's almost like it is un-making itself.
[Edit] I'm noticing the Hatchery/Lair/Hive has a "building" that get swapped in for the conversion. I take it I will need an equivalent, but how does one go about coding that?
TheNomad
06-17-2008, 4:27 PM
OK, do me a favor and write ALL changes you made. And please, list them all... even those you think don't matter.
BlademasterSlsh
06-17-2008, 4:57 PM
Ok, this is going to take a while, and organization is key.
----Firegraft----
-Unit Tab
1) Moved Extractor, Ion Cannon, and Infested Command Center into the Terran Buildings list
2) Gave the Ion Cannon the Infested Command Center Button Set
3) Gave the Command Center the Status Preset of Transport
-Button Sets Tab
4) Created Load/Unload buttons for the Command Center (copied from the Bunker, I believe, and moved to positions 4 and 5)
5) Made the ComSat button for the Command Center read as such: Can Create Unit/Building: Infested Command Center: Building Morph: Infested Command Center:
6) Made the Nuclear Silo button for the Command Center read as such: Can Create Unit/Building: Ion Cannon: Building Morph: Ion Cannon:
(Note, cancel buttons are Cancel Add-on and Cancel Last)
7) Changed the Infested Command Center Build Infested Terran Button to Build SCV.
8) Added Attack Button that reads as such: Attacking Building: : Attack(building): :
9) Added Stop Button that reads as such: Attacking Building: : Stop: :
10) Added Scanner Sweep button that reads as such: Spell Researched: Scanner Sweep: Use Technology: Scanner Sweep:
11) Added Extractor button to SCV that reads as such: Can create Unit/Building: Extractor: Create Building - Zerg: Extractor:
-Dat Requirements
--Units
12) Extractor/Infested Command Center/ Ion Cannon in the Terran Buildings list
13) SCV- Current Unit is: Command Center: or: Current Unit is: Infested Command Center: or: Current Unit is: Ion Cannon: Is not constructing Addon: Is not lifted off:
14) Ion Cannon- Current Unit is: Command Center: Is not constructing: Is not lifted:
15) Infested Command Center- Current Unit is: Command Center: Is not constructing: Is not lifted:
16) Extractor- Current Unit is: SCV: Is not Constructing:
--Use Tech
17) Scanner Sweep- Current Unit is: Infested Command Center:
-Exe Edits
18) For Building Morph, changed the following:
Lower ID Bound(Original)/(Morph) = Command Center
Upper ID Bound(Original)/(Morph) = Cerebrate Daggoth
----DatEdit----
-Units
--Basic
1) Infested Command Center- Supply Provided=10, Score Build = 200, Score Destroy = 1400, Terran
2) Extractor- Terran
3) Ion Cannon- Concussion Rifle (Kerrigan) (Air and Ground)
--Advanced
4) Infested Command Center- Mechanical, Resource Depot
5) Ion Cannon- Resource Depot
--Graphics
6) Infested Command Center- Command Center: Terran Construction (Large): Terran Advisor:
7) Ion Cannon- Command Center: Terran Construction (Large): Terran Advisor:
-Flingy
8) Infested Command Center sprite changed to Command Center
9) Ion Cannon sprite changed to Command Center
I believe that is everything, although it is very possible I could have missed something. Hopefully that helps.
TheNomad
06-17-2008, 6:32 PM
Seems ok... I believe it might be related to the fact that morphing is exclusive to Zerg units/buildings. Try a very silly test: change the race of the morphing buildings, all 3 of them to Zerg.
BTW:
11) Added Extractor button to SCV that reads as such: Can create Unit/Building: Extractor: Create Building - Zerg: Extractor:
Why is an SCV building extractors ?
BlademasterSlsh
06-17-2008, 6:56 PM
Well... I needed to add a button to test if something was being saved... and then I needed to see if Terran could build Zerg, and yeah. (PS: It can't build the Extractor, for some reason, but it won't need to)
As for making it Zerg, not much success. I can't morph into either, and canceling creates Drones (which is interesting to watch, if nothing else).
[Edit] It is interesting to note that the Command Center is changed into the Hatchery {Morphing} once the button is pressed. Unfortunately, I do not see this building in the Dat Requirements. I think this building is key to making the Command Center morph
TheNomad
06-18-2008, 5:39 AM
It's hardcoded. As well as the drone returning on cancel.
BlademasterSlsh
06-18-2008, 7:18 AM
Do you know if there is a way to get it to treat the Morph as the same between a Hatchery and a Lair, instead of a Drone and a Hatchery? That might fix at least one problem.
Loser
06-18-2008, 10:28 AM
This is kinda off topic, but is it possible to change things that are hardcoded if you know how to or would you essentially have to rewrite the entire game from scratch?
DarkMirror
06-18-2008, 10:37 AM
Hardcoded = Hard, unchangeable. Not possible.
I believe possibly with some sort of hex editor, but that's pretty unknown territory and fundamentally it stops the game being seen as StarCraft on B.net, IIRC.
TheNomad
06-18-2008, 10:59 AM
Ktan is right. Well, not quite hex editor, but more or less. It's basically asm, which is just a raw interpretation of the hex "code".
Such things are so hard to change that are basically not worth it. There is a way to allow other buildings to morph as LordAgamemnon did it in Project Miranda. I am lazy as hell, but I think I'll take a look and tell you what he changed... or make an account on SEN and ask him. But I do admit I am curious :P
Loser
06-18-2008, 11:36 AM
I believe possibly with some sort of hex editor, but that's pretty unknown territory and fundamentally it stops the game being seen as StarCraft on B.net, IIRC.
Aww. What was the point of hardcoding all that stuff anyways?
BlademasterSlsh
06-18-2008, 12:16 PM
Aww. What was the point of hardcoding all that stuff anyways?
So that the game in some way, shape, or form resembles Starcraft ;)
Most likely it is stuff that was done in such a way that it didn't fit any existing codding pattern, so it was just shoved in. At least, that's what I would do if it was me coding, rather than rewrite 150+ classes. Take into consideration to that Blizzard didn't design Starcraft to be modded.
TheNomad
06-18-2008, 3:57 PM
There was another issue. They kinda had problems with the deadlines so a lot of ideas were scratched off from the global stuff and hardcoded. For example, the "Unused" flag in the Tech tab in DatEdit was "Researched by default". They changed it to being hardcoded and grafted.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.