-
Notifications
You must be signed in to change notification settings - Fork 3
Vehicle Overlay
I'm not an English speaker, so the name is a bit weird.
Vehicle Framework has a feature to render additional graphics on the vehicle. It is used for rotating helicopter propellers, etc.
In the Vehicle Map Framework, a CompClass is implemented to add an overlay with a slider to set the opacity, assuming that the upper structure (roof) will be rendered on top of the vehicle map.
Add the following statement within the <comps>
tag in VehicleDef.
Example (Pantodon)
<li Class="VehicleInteriors.CompProperties_TogglableOverlays">
<extraOverlays>
<li>
<key>Upper</key>
<label>upper</label>
<graphicDataOverlay>
<graphicData>
<texPath>MapVehicles/Pantodon/Upper</texPath>
<graphicClass>VehicleInteriors.Graphic_VehicleOpacity</graphicClass>
<shaderType>VMF_CutoutComplexRGBOpacity</shaderType>
<pattern>VMF_RGBMaskOpacity</pattern>
<layer>2500</layer>
<drawSize>(8.125, 19.888671875)</drawSize>
</graphicData>
</graphicDataOverlay>
</li>
</extraOverlays>
</li>
Write the overlay graphic settings in a <li>
node within the <extraOverlays>
tag.
<key>
should be a unique string to add an overlay to the vehicle.
<label>
specifies a label to be displayed in the gizmo to adjust the opacity of the overlay.
<graphicDataOverlay>
is a Vehicle Framework feature. Therefore, please refer to the following document.
https://docs.google.com/document/d/1UlM6GxBXs08PYxNYIxL3wJ94MOSRpS2C4V_DQDcHKsQ/edit?tab=t.0#heading=h.j9cp3qug4od
However, there are a few notes on the tag <graphicData>
.
To use opacity, <graphicClass>
must be set to VehicleInteriors.Graphic_VehicleOpacity
.
- To use opacity,
<shaderType>
must be set to one ofVMF_CutoutComplexRGBOpacity``VMF_CutoutComplexPatternOpacity``VMF_CutoutComplexSkinOpacity
. - To use opacity,
<pattern>
must be set toVMF_RGBMaskOpacity
.
Therefore, currently, if you change the vehicle's pattern in the in-game settings, you will not be able to adjust the opacity. This issue will be fixed.
- The
<layer>
tag needs to be about 2500 to appear above the things on the vehicle map. If it is too large, it will come behind the camera.
This is not really related to the vehicle map feature, but is a feature I personally created to enhance the visual appearance of Glypto.
This is a feature that allows togglable overlays to be displayed when the vehicle's engine is turned on or when the vehicle is in flight, instead of gizmo operation.
Add the following statement within the <comps>
tag of the VehicleDef.
Example (Glypto)
<li Class="VehicleInteriors.CompProperties_EngineLightOverlays">
<engineOnOpacity>0.65</engineOnOpacity>
<inFlightOpacity>1</inFlightOpacity>
<ignitionDuration>150</ignitionDuration>
<extraOverlays>
<li>
<key>Light</key>
<label>light</label>
<graphicDataOverlay>
<graphicData>
<texPath>MapVehicles/Glypto/Light</texPath>
<graphicClass>VehicleInteriors.Graphic_VehicleOpacity</graphicClass>
<shaderType>VMF_CutoutComplexRGBOpacity</shaderType>
<pattern>VMF_RGBMaskOpacity</pattern>
<drawSize>(11.45, 15.5)</drawSize>
</graphicData>
</graphicDataOverlay>
</li>
</extraOverlays>
</li>
<engineOnOpacity>
sets the opacity of the overlay while the vehicle's engine is turned on.
<inFlightOpacity>
sets the opacity of the overlay while the vehicle is in flight.
specifies the tick count from the time the vehicle's engine is started until it reaches the opacity set by
. The other statements are the same as for
CompProperties_TogglableOverlays. There is no need to set
layer` high if you don't need to display on top of the vehicle map.