ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Dock: Difference between revisions

From ModEnc
Jump to navigation Jump to search
m Cross-categories, wee
Nighthawk200 (talk | contribs)
m Template updated
Line 1: Line 1:
{{flag|name=Dock|files=rules(md).ini|values=Names of [[BuildingTypes]]|special=None|default=none (as opposed to "None", meaning none set)|types=VehicleTypes, AircraftTypes|games=TS, FS, RA2, YR}}
{{flag|name=Dock|files=rules(md).ini|values=Names of [[BuildingTypes]]|default=none (as opposed to "None", meaning none set)|types=VehicleTypes, AircraftTypes|ts=yes|fs=yes|ets=yes|ra2=yes|yr=yes|rp=yes}}
<tt>Dock=</tt> specifies which buildings this object can dock with, for whatever purpose. In order to make the docking work, the specified building(s) needs to be set up as well (see below).
<tt>Dock=</tt> specifies which buildings this object can dock with, for whatever purpose. In order to make the docking work, the specified building(s) needs to be set up as well (see below).



Revision as of 17:54, 4 March 2007

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: Dock
File(s): rules(md).ini
Values: Names of BuildingTypes
Default: none (as opposed to "None", meaning none set)
Applicable to: VehicleTypes, AircraftTypes


Dock= specifies which buildings this object can dock with, for whatever purpose. In order to make the docking work, the specified building(s) needs to be set up as well (see below).

Docking

Certain units can dock with their parent structures (aircraft -> AFC, harvester -> refinery, vehicles -> repair bay/tank bunker, ships -> shipyard). Docking can repair/reload/unload the unit or fortify it, depending on the structure.

Rules coding

Buildings that only certain units can dock with should be listed in the Dock= statement in the unit's code, and the structures themselves should have NumberOfDocks= set (equal to .. number of docking points within a structure, duh). NumberImpassableRows= is also needed - otherwise units will acknowledge the "Enter" command, but will stop at the structure, unable to move over it. Repair bays and tank bunkers accompany any vehicle, and none of them has Dock= set to the repair bay. That's because the repair bay has UnitRepair=yes and NumberImpassableRows=1, which flags it as an area passable by any VehicleType. In TS, NonVehicle=yes prevents a unit being repaired, while in RA2 it only prevents other vehicles repairing them, not the service depot. The Tank Bunker can hold units inside because it has Bunker=yes set. The AFC can hold only aircraft on it because of Helipad=yes, it doesn't need NumberImpassableRows=.

Art coding

By default, the units dock with the structure in it's exact center point. This can be changed by adding DockingOffsetN=X,Y,Z to the structure's art.ini coding. N is the number of the docking position, and will be used if all the docks with smaller N are used up. N starts at 0, not at 1. X, Y and Z are measured in leptons (1/256th of a cell). The center point of the structure is 0,0,0 and if you imagine a 2x2 structure to be foundated like this:

-A-
BXC
-D-

, the X increases from A to C, and Y - from A to B.

Structure-specific info

From testing, I've seen that:

  • A refinery is hardcoded to use only one cell for it's docking location, and it ignores both NumberOfDocks= and DockingOffset= and uses the center cell in the bottom-most row of the structure.
  • A repair bay can only have one dock, otherwise it'll crash.
  • A tank bunker is hardcoded to only one dock too, though I'm not sure if it can be not the exact center of the structure.
  • An AFC can use a lot of docks... a lot more than the usual 4. I've tested it more thoroughly and I've seen it support up to 16 docking locations. They'll work perfectly as long as you make sure all the DockingOffsets= are within the structure's Foundation=. If DockingOffset= points to outside the Foundation=, the aircraft will be produced on that offset as usual, but they'll refuse to land there after flying.


Note: The rules' comment is

<<< applies only to moving units (not buildings) >>>
Dock = preferred docking building [e.g., harvester -> refinery, helicopter -> helipad] (def=none)

...since the Type-specific flags are listed below that section, this comment does theoretically not exclude InfantryTypes as users of Dock. The Guide only lists AircraftTypes and VehicleTypes. If anyone has made entirely sure that InfantryTypes cannot dock to buildings, please alter this page accordingly. (Just because a simple VehicleType-like connection does not work, it's not automatically impossible.)