Prefab Editing - Vehicles (QSF)

Information: The EMERGENCY community board is completely free and is financed by advertisement. Please deactivate adblocker if you use this site. Thank you!
Note about the webdisk: Downloading larger files should be possible again.
  • Information about the prefab editing of vehicles.

    1 Prefab Editing Vehicles


    The edited prefabs for all vehicles are saved in category “vehicle”. Only edited vehicles are saved in this category. The prefabs for the single meshes created when importing the meshes are in category “_child_vehicle”.



    1.1 Damaged Vehicles


    The damaged version of a vehicle has the same name as the vehicle + the suffix “_dmg”.


    Example:

    • civil_car01
    • civil_car01_dmg


    1.2 Create a new Object


    • Select an existing object.
    • In the Object Properties window, rightclick on any property > “Create Object”.
    • A dummy box will appear in the viewport > Select that box.
    • In the Object Properties, in the mesh component, assign the mesh (e.g. “em5_vc_civilcar01.mesh”).


    1.3 Inheritance


    For a vehicle to actually work in EMERGENCY 5, it must inherit some settings from the respective parent prefab.


    See "Prefab Editing - Inheritance (QSF)" article for details.


    1.4 Special vehicles


    The “SpecialEntity” parameter in the roadvehicle component exists to mark a childentity for special using. e.g. an extingiush cannon of an TLF.


    Towcar:

    • Has additional components: SupportLegsComponent, VehicleCraneComponent.


    === Adding components ===

    • In the Object properties window, rightcklick on any property > “Create Component”.
    • Choose the component to add.


    === List of vehicle components ===
    The following is a list of all components assigned to vehicles.


    You don't need to add the common ones by hand though if you followed the advice to always inherit from the respective parent prefab.


    All vehicles:

    • Selectable
    • Action
    • Moveable

    All road vehicles:

    • EM5 Road Vehicle
    • EM5 Road Vehicle Placement
    • AI Navigation
    • Bullet Box Collision

    All squad vehicles:

    Maybe:


    === Tintable Mesh Component ===
    For tintable vehicles, the Mesh component must be replaced by the TintableMesh component.


    Also need to be done for all tintable child objects (e.g. doors) of the vehicle.


    === Editing the AI navigation component ===


    See Prefab Editing - AI (QSF).


    === Editing the EM5 commandable component ===
    The commands, which can be executed by a unit, can't be set with the editor. You'll have to add them manually in the prefab JSON file.


    The commands are different for each unit. Common commands for vehicles are "em5::MoveCommand", "em5::ReturnToBaseCommand" and "em5::ExitVehicleCommand. The last command is deactivated, if there aren't any units inside the vehicle.
    If there aren't any additional commands, you won't have to edit the component, because the standard commands will be inherited.


    1.5 Adding Vehicle Doors


    Editing entity inside the vehicle:

    • Create a entity, give it the mesh of the door component.
    • In the Object Properties window, rightclick on any property > “Create Component”.
    • Add the “EM5 Door” component.
    • Set the doortype property (e.g. „DOORTYPE DRIVER“).

    IMPORTANT: The door component is used for buildings too. When editing a vehicle door, do not set the doortype to “DOORTYP_MAIN_ENTRANCE”


    1.6 Opening / close animation of the door


    Important: There are two ways for animating the opening/closing of the doors. One is giving a skeleton file as animation. The other is a manual animation. In Case the skeleton assets are missing or empty the manual animation is used.


    Animation via skeleton assets:

    • OpeningAnimation: The animation is played in case the door is open.
    • ClosingAnimation: The animation is played in case the door is closed.


    Animation via manual animation:

    • RotationAxis: The axis on were the rotation of the door is happen. By default upvector of the coordinate system.
    • RotationAngle: The amount of degrees how mutch the door is moved.
    • SlideOffset: Unknown.
    • OpeningAnimationLenght: the amount of time the manual opening animation is taken.
    • ClosingAnimationLenght: the amount of time the manual closing animation is taken.

    The function of the different doorTypes


    DOORTYPE DRIVER: Is the door were the driver is sitting.

    • Used for cutting Persons from damaged vehicles

    DOORTYPE CODRIVER:

    • The normal entry for personnel units.

    DOORTYPE EQUIPMENT (left/right):

    • Tthe place were the equipment is taken / placed.
    • The position currently not used.

    DOORTYPE PASSENGER:

    • The door Passenger used to enter the vehicle.

    DOORTYPE TRUNK:

    • The Door at the back of the vehicle.

    Entry Points for Personnel/ passenger


    The door needs another position for the gameplay interaction.


    Linking to the vehicle:

    • DoorOffset: The offset is used to say were the interaction is happen. This is a local position offset from the door position.
    • DoorRotation: This is how the person is rotated, in case it uses the door.
    • DoorOffsetWorldSpace: Because it is not easy to edit or calculate the “DoorOffset” value, this is a helper for editing. The displayed value here is not saved and is moving together with the parent entity. Here you can place an entity before your door, take the worldspace position of this entity and insert it here. It will convert the “DoorOffset” value.
    • DoorOffsetRotationWorldSpace: Same like “DoorOffsetWorldSpace” but with the rotation of the “DoorRotation” instead.


    1.7 Additional DoorEntity editing


    Linking to the vehicle:


    With the door selected, right click on the instance of the vehicle prefab that you want to link the door to “Object” > “Link selected to Slot” > “VehicleDoors”.


    This will only work if the vehicle you want to link to has the “EM5 Road Vehicle” component. Note that the ID of the door object will show up in the VehicleDoors slot of the vehicles “EM5 Road Vehicle” component.


    1.8 Adding vehicle wheels


    • Select the wheel.
    • In the Object Properties window, rightclick on any property > “Create Component”.
    • Add the “EM5 Wheel” component.
    • Set the wheeltype property (e.g. „WHEELTYPE_BACK_RIGHT“).

    Function of wheeltypes:

    • The LEFT / RIGHT sets the rotation direction of the wheel (when the vehicle is driving, the wheels will automatically be rotated)
    • The FRONT / BACK sets if the wheel will change its angle when the vehicle drives in curves. Front wheels do that and back wheels dont. (Therefore, when editing e.g. a rail vehicle, set all wheels to “BACK”.)

    Linking to the vehicle:


    With the wheel selected, rightclick on the instance of the vehicle prefab that you want to link the door to “Object” > “Link selected to Slot” > “VehicleWheels”


    This will only work if the vehicle you want to link to has the “EM5 Road Vehicle” component. Note that the ID of the will door object will show up in the VehicleWheels slot of the vehicles “EM5 Road Vehicle” component.


    === Editing the EM5 FireComponent Component ===


    Editing Fire components is simmilar to normal fire editing. Vehicles without an fire component won't start burning, skip the burning state und start there explosion. This is legitim. Don't forget to assign an firematerial value.


    === Editing the EM5 SupportLegs component ===
    Support leges are extra legs, used for heavy vehicles, to give them more (optical) stabilization. This legs can extendet via animation.


    SupportLegs: An slot for hard linked "legs". An Leg is an Entity with mesh, transform, metadatacomponent, how can play the animation "em5_vs_wrecker_hydraulic_support_left". In case the Support legs are extendet, all of this linked entitys get this animation.


    The tech towcar and the firedepartment DLK is supporting this.


    === Editing the EM5 VehicleCrane Component ===
    Vehicle crane is an crane, edited on an vehicle. The cran has the ability to rotate, raise/heigher and expand to an given target.


    CraneEntity: Is an slot for one hard linked Entity. This Entity needs mesh, transform, metadatacomponent and has to play the animations "crane_extend" "em5_vs_wrecker_crane_crane_neutral-to-low" and "em5_vs_wrecker_crane_crane_neutral-to-high"


    The tech towcar and the firedepartment boat transporter support this.


    === Editing the EM5 WaterCannon component ===
    Water cannon, is the water shoting cannons on fire deparment vehicles. The cannon can rotate in x-y achses and creates an water extinguish effect at the "effect_bone".


    It is important that the entity with the water cannon is linked to the Special entity slot of the road vehicle. The road vehicle searches the special entity for a linked Entity with a WaterCannon Component incase its more complex than only one entity.


    CannonEntity: Is an optional slot for one hard linked Entity. In case the component-Entity is rotated in y-achse it rotates the Cannon entity insteat. This is sometime needed to improve the visual look.