Staredit Network > Forums > Modding Assistance > Topic: Giving Subunit to Command Center
Giving Subunit to Command Center
Sep 6 2015, 6:17 pm
By: Sand Wraith  

Sep 6 2015, 6:17 pm Sand Wraith Post #1

she/her

I am in the midst of giving the Command Center an Alan Turret as a subunit. Unfortunately, I am having a lot of trouble doing so.

(1) Giving the Command Center an Alan Turret through the Subunit 1 option in DatEdit fails to effect any difference.

(2) Giving the Command Center's image.dat entry the Goliath Base's .lol file fails to effect any difference.

Normally, SCBW would crash without a .lol file when giving a unit a subunit. In this case, nothing happens at all -- there is no change from vanilla SCBW.

Is it because structures cannot have subunits or is there another possibility?




Sep 6 2015, 9:23 pm Neiv Post #2



Yup, bw does not create subunits for units whose id is above 105.

I did a quick test with copying Command Center's stats to an unit which can have subunits, which created the subunit and crashed as Command Center's construction image did not have .lo file assigned to it. Once the .lo file was set, the turret had difficulties with attackking as the CC didn't turn. Setting weapons.dat firing angle to 128 allowed the subunit to attack fine though.

The turret was not visible - didn't look into why that happens, and I wasn't able to order the CC to attack anything - that apparently was as the unit's buttons had "Attack" button instead of "Attack (Building)".

Buildings with subunits are a horrible mess :P



None.

Sep 6 2015, 11:09 pm Sand Wraith Post #3

she/her

Bah, figures. I had wanted a structure with a turret so I could get a specific sort of look and functionality combo. Specifically, I was hoping to cheese a double-Goliath turret appearance on a Stasis Cell .grp.

Do you think there is a chance of altering that via an .exe mod?




Sep 7 2015, 2:12 am O)FaRTy1billion[MM] Post #4

👻 👾 👽 💪

Quote from Neiv
The turret was not visible - didn't look into why that happens,
Did you create the turret in iscript? I'm not totally sure how the turret is created, but I know the overlay is created with InitTurret



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Sep 7 2015, 4:19 am Sand Wraith Post #5

she/her

I'm not even sure if that applies considering that the Goliath Base script does not run any opcodes to create its turret's image.




Sep 7 2015, 12:57 pm Neiv Post #6



Quote from Sand Wraith
Bah, figures. I had wanted a structure with a turret so I could get a specific sort of look and functionality combo. Specifically, I was hoping to cheese a double-Goliath turret appearance on a Stasis Cell .grp.

Do you think there is a chance of altering that via an .exe mod?

The "unit id must be <= 105" check is simple to remove, just nop 2 bytes at 004A0A53. Other stuff may require more complicated edits.

Have you considered doing something like Missile Turret does? Could be simpler than using subunits even if it were more limited in some ways.

The subunit not appearing may be due to iscript, but I've done a test with adding floor gun trap as Battlecruiser's subunit and I don't remember having to touch iscript at all.



None.

Sep 8 2015, 6:24 am O)FaRTy1billion[MM] Post #7

👻 👾 👽 💪

Quote from Sand Wraith
I'm not even sure if that applies considering that the Goliath Base script does not run any opcodes to create its turret's image.
goliath was the one I was looking at:
Code
Goliath_Base_InitTurret:
    imgol               235 0 0     # GoliathTurret (terran\goliathT.grp)




TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
[2024-4-17. : 1:08 am]
O)FaRTy1billion[MM] -- i'll trade you mineral counts
[2024-4-16. : 5:05 pm]
Vrael -- Its simple, just send all minerals to Vrael until you have 0 minerals then your account is gone
[2024-4-16. : 4:31 pm]
Zoan -- where's the option to delete my account
[2024-4-16. : 4:30 pm]
Zoan -- goodbye forever
Please log in to shout.


Members Online: Roy