Page 1 of 2

Subunit help

Posted: Thu Sep 06, 2007 1:34 pm
by Ardis
Alright, for a while, I've been working on my mod, but on the side, I made a mod for experimenting with weird stuff.

One thing I found during that time was that the Valkyrie could not have a subunit attached to it, but just about every other air unit can. Is there a reason for this?

Re: Subunit help

Posted: Thu Sep 06, 2007 1:58 pm
by IskatuMesk
I remember hks or someone attaching two subunits to the valkyrie. Maybe just 1.5 breaking even more things?

Or maybe it's hardcoded and I am hallucinating but I know I saw a screenshot of it.

Re: Subunit help

Posted: Thu Sep 06, 2007 3:34 pm
by Durandal-Thoth
I thought no one on the planet knew how to attach two sub-units to a unit.

Did he ever exhibit this in a mod, or just a screenshot?

Re: Subunit help

Posted: Thu Sep 06, 2007 6:19 pm
by Ardis
I never got the second subunit field to do anything. Even DatEdit says it does nothing:
Secondary subunit. Unused. [pointer to units.dat]
Or maybe the person who made DatEdit didn't really know how to use the second subunit field. I don't know much about how subunits actually work, I just know how to add them onto a unit and make them attack.

I've got a testing mod where I attached a subunit to most of the battle cruiser heroes and a civilian using a wraith sprite because the civilian is just where I insert my weird units.

Re: Subunit help

Posted: Thu Sep 06, 2007 7:54 pm
by IskatuMesk
Durandal-Thoth wrote:
I thought no one on the planet knew how to attach two sub-units to a unit.

Did he ever exhibit this in a mod, or just a screenshot?
I don't see why it would be hard. Spawn two overlays, use two subunit slots. I never tried it personally but I don't see why it wouldn't work.

Re: Subunit help

Posted: Fri Sep 07, 2007 1:48 am
by Lingerance
Phantom wrote:Or maybe the person who made DatEdit didn't really know how to use the second subunit field. I don't know much about how subunits actually work, I just know how to add them onto a unit and make them attack.
No, DatEdit does esactly like it should and all it's predecessors did, subunits are controlled through units.dat (another dat file might be infolved, can't remember) also a bin file, lol (iirc) file iscript, maybe more, thats just for one unit to have thier subunit changed or have one added.

PS: It's 3 AM, I don't care about the red squiglies and thier mispelt lies.

Re: Subunit help

Posted: Fri Sep 07, 2007 1:17 pm
by IskatuMesk
PS: It's 3 AM, I don't care about the red squiglies and thier mispelt lies.
aw fuck my brain

Re: Subunit help

Posted: Sat Sep 08, 2007 11:49 am
by ShadowFlare
Lingerance wrote:
Phantom wrote:Or maybe the person who made DatEdit didn't really know how to use the second subunit field. I don't know much about how subunits actually work, I just know how to add them onto a unit and make them attack.
No, DatEdit does esactly like it should and all it's predecessors did, subunits are controlled through units.dat (another dat file might be infolved, can't remember) also a bin file, lol (iirc) file iscript, maybe more, thats just for one unit to have thier subunit changed or have one added.

PS: It's 3 AM, I don't care about the red squiglies and thier mispelt lies.
I've never had anything with that second subunit field ever working and I've never seen anything by anyone else where it worked.

There are two files with settings related to subunits, but iscript.bin is not one of them.  The files are units.dat and images.dat.  The subunit is added through units.dat and there is a setting in images.dat that is needed to make it work; the base unit needs a certain category of .lo* file assigned to it in images.dat for it to work, otherwise Starcraft will crash.

The part of the iscript animation where you would see it spawn the image for the subunit is only for the map editor.  The last version of IceCC that I have uploaded has it mislabeled as InitTurret.

Re: Subunit help

Posted: Sat Sep 08, 2007 10:57 pm
by Durandal-Thoth
Well, that clarified things a bit.

Maybe he just mounted one turret and put an offset in iScript? I've never been aware of mounting two sub-units either. Maybe the blizz devs themselves might know about it. I remember once while zooming through Units.dat with arsenal zero, I noticed that the Marine entry had the option for THREE subunits. I never played around with that, but could the LO* file itself have something to do with the second offset, rather then just units.dat and images.dat?

Re: Subunit help

Posted: Sun Sep 09, 2007 2:10 am
by ShadowFlare
Hmm, probably not, since it crashes with the lack of the .lo* file, it does not just have no turret.  Although, I have never tried that.

Re: Subunit help

Posted: Mon Sep 10, 2007 6:31 pm
by Ardis
So, with proper Iscripting, you could make the Valkyrie work with a subunit, possibly more?

Re: Subunit help

Posted: Mon Sep 10, 2007 7:03 pm
by IskatuMesk
Maybe. Maybe not. The latest versions broke a lot of things in starcraft, especially in relations to Iscript. Things that worked 100% perfectly in 1.10 in my HK TC are broken in 1.15.

Re: Subunit help

Posted: Tue Sep 11, 2007 7:33 am
by Taeradun
So if that units.dat field has never been able to be set to have a second subunit in any historic version of StarCraft that anyone is aware of, it's basically an "unused" field that was only labeled as "Subunit 2" by someone by mistake somewhere along the way? :P

Re: Subunit help

Posted: Tue Sep 11, 2007 3:28 pm
by Ardis
Okay, I see what you mean. The Valkyrie doesn't have an Overlay 1 or three which the Battlecruiser does. It seems like subunits are linked to the .lol file, overlay 3 because the wraith doesn't have an overlay 1, but it does have a three.

I'm still not quite sure what these overlays are.

Re: Subunit help

Posted: Tue Sep 11, 2007 3:38 pm
by IskatuMesk
Do you mean images.dat? I am not sure of the exact function of those overlays, but they are responsible for fire graphics on damaged buildings. They can also cause crashes, because said fire graphics really, REALLY hate animation changes on buildings and will often crash if they are so much as touched the wrong way.