# Objects¶

The island most likely has OFP object addons. These do not exist in ArmA. We have to differentiate between OFP and Resistance objects, that came with the game, and community made objects. There are a few different options how to the handle the objects.

## Object replacement¶

Roller has the option to replace objects with the parameter `--replace-objects`. The mapping is defined in a so called YAML file. It is a standard text file.

    --replace-objects ofp_objects_to_aceip_objects.yaml,ofp_objects_to_arma_objects.yaml

You need to supply the parameter with at least one YAML file. If you attach multiple YAML files, they will be processed sequentially one after another.

An object replacement YAML mapping file looks like this:

     1 data3d\afbarabizna.p3d:
     2   -
     3     :name: ca\buildings\afbarabizna.p3d
     4     :offset: [0, 0, 0]
     5
     6 data3d\afdum_mesto2.p3d:
     7   -
     8     :name: ca\buildings\afdum_mesto2.p3d
     9     :offset: [0, 0, 0]
    10
    11 # pathToFile\nameOfFile.p3d:
    12 #   -
    13 #     :name: pathToReplacementFile\subfolder\nameOfReplacementFile.p3d
    14 #     :offset: [X, Y, Z]

Via the offset you can move the object in meters in any direction you want to.

The YAML file needs to be located in the same location as TODO.

For an 1:n replacement define the object mapping in the YAML like this:

    1 data3d\oliva.p3d:
    2   -
    3     :name: ace_vegetation_obj\m\tree\ace_akat02.p3d
    4     :offset: [0, 0, 0]
    5   -
    6     :name: ace_vegetation_obj\m\tree\ace_javor01.p3d
    7     :offset: [0, 0, 0]

An n:1 mapping is replacing any object with one and the same of course.

    n:1 means make object X, Y and Z to object A.

    1:n means make object X to either object A or B.

## Object mapping - OFP to ArmA YAML file¶

Roller already has a mapping for OFP and Resistance (NOT community addons, only for core game files) integrated. The name is ofp_objects_to_arma_objects.yaml. Roller will find the file automatically, if you there is no YAML file called the same way in the TODO location.

Unfortunately there is no (working replacement) for each OFP/Resistance objects. You can either define your own mapping or use the OFP to ACE mapping.
More details in the next paragraph.

## Object mapping - OFP to ACE YAML file¶

This is again a mapping integrated into Roller. Same details apply for it how to run it as for the ofp_objects_to_arma_objects.yaml file.

The-f made a mapping from OFP to ArmA objects for the objects where a suitable replacement was available. The remaining objects, that have no (working) replacement in ArmA, have been converted to ArmA and are part of the ACEIP

You can either define your own mapping or use the objects from the ACEIP. Beware that this makes your islands dependent on the addons part of the ACEIP.

## Community made OFP objects¶

For custom community made OFP objects you need to define your own replacement. You can either get the permission for the object(s), convert them to ArmA format or replace them with any (suitable) object available in ArmA.

If you do not define a mapping, V3 will simply not be able to import the object. So you can just drop objects that way.

Note that it is recommended to replace the object with dummy object instead to preserve the object ID numbering of the source WRP.

Another option is to replace them with the a very tiny object from ArmA like a flower (TODO: add pathToFile). Note that you will loose the information about the source type of the given object this way.

It is better to create a new addon with dummy models in there. Each file has the same path and file naming as the missing object. Instead of the original model you put flower.p3d in there and rename it to the needed p3d name.

This way you keep the information about the correct object type. Once the object will be available in ArmA, you can replace your dummy addon / model with the correct file.

It is recommended to name the PBO in a proper way (your own tag and descriptive name) and use the PBOPREFIX to define the original path needed.

     ACEIP_P_CWC
     TAG TYPE p3d NAME

     $PBOPREFIX$ data3d

     Types:
     f function
     m mission
     p p3d
     s sound
     t texture
     w world

Finally the ACEIP already contains a good number of converted OFP community object addons.

If you make your islands based on the ACEIP, you may not have to do anything at all but to load the OFP 3rdParty objects ODT (object definition template) in v3 before you import the objects.

OFP community addons converted by the ACEIP:

- TODO add addon names

OFP community addons replaced by a dummy addon by the ACEIP:

- TODO add addon names

Back to the overview (home)