Afin de créer votre addon.pbo vous aurez besoin de plusieurs fichiers dont des fichiers config.
Nous allons décrire ici comment faire, avec des exemples précis et des modèles réutilisable de fichier config.
Voici les fichiers qui constitueront votre dossier
p:MonNomMonIle (enlevez le dossier source, pour cela créez un dossier p:MonNom2 dans lequel vous transferez votre dossier p:MonNomMonILesource) avant de le transformer en .pbo:
Donc voici les différents fichiers que vous devrez constituer:
CfgMissions.hpp
Ce fichier permet d'intégrer un fichier intro de mission pour animer le menu principal de ArmA après avoir quitté une partie sur votre map.
class CfgMissions {
class Cutscenes {
class testIntro {
directory = "testAnimsintro.test";
};
};
Pour ce fichier vous devrez modifié "class testIntro" et le chemin de "directory".
CfgPatches.hpp
class CfgPatches {
class test {
units[] = {"test"};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {};
};
Pour ce fichier, remplacez "test" par le nom de votre ile, ainsi que la liste des addons requis pour utiliser cette ile.
CfgSurfaceCharacters.hpp
class CfgSurfaceCharacters {
class floo_foretClutter {
probability[] = {0.8, 0.1, 0.05, 0.01};
names[] = {"floo_grasstall", "floo_grassdrylongbunch", "floo_BlueBerry", "floo_caluna"};
};
class floo_terreClutter {
probability[] = {0.15};
names[] = {"floo_stubble2"};
};
class floo_sableClutter {
probability[] = {0.79, 0.05, 0.005};
names[] = {"floo_stubble", "floo_grasstall", "floo_AutumnFlowers"};
};
class floo_merClutter {
probability[] = {};
names[] = {};
};
Ce fichier permet de de définir la répartition des objets .p3d qui sont associés aux “name”. Par exemple floo_foretclutter comportera 4 types de p3d qui sont définis dans le fichier ConfigWorlds.hpp
CfgSurfaces.hpp
class CfgSurfaces {
class Default {};
class Water {};
class floo_foret : Default {
access = ReadOnly;
files = "floo_pole1_*";
rough = 0.1;
dust = 0.1;
soundEnviron = "grass";
character = "floo_foretClutter";
soundHit = "hard_ground";
};
class floo_sable : Default {
access = ReadOnly;
files = "floo_pisek_*";
rough = 0.1;
dust = 0.5;
soundEnviron = "sand";
character = "floo_sableClutter";
soundHit = "soft_ground";
};
class floo_terre : Default {
access = ReadOnly;
files = "floo_pisek2_*";
rough = 0.01;
dust = 0.01;
soundEnviron = "grass";
character = "floo_terreClutter";
soundHit = "hard_ground";
};
class floo_mer : Default {
access = ReadOnly;
files = "floo_mesto2_*";
rough = 0.1;
dust = 0.8;
soundEnviron = "sand";
character = "floo_merClutter";
soundHit = "soft_ground";
};
Ce fichier associe le CfgSurfaceCharacters à vos textures de sol utilisées pour créer votre ile.
CfgVehicles.hpp
class CfgVehicles {
class ThingEffect; // External class reference
class ThingEffectLight; // External class reference
class ThingEffectFeather; // External class reference
class FXCrWindLeaf1 : ThingEffectLight {
scope = protected;
model = "caplants2cluttercr_leaf.p3d";
displayName = "Internal: FxCrWindLeaf1";
airFriction2[] = {2, 2, 8};
airFriction1[] = {1, 1, 4};
airFriction0[] = {0.3, 0.3, 0.1};
airRotation = 0.35;
minHeight = 0.3;
avgHeight = 5.5;
maxHeight = 10.0;
};
class FXCrWindLeaf2 : FXCrWindLeaf1 {
model = "caplants2cluttercr_leaf2.p3d";
displayName = "Internal: FxCrWindLeaf2";
};
class FXCrWindLeaf3 : FXCrWindLeaf1 {
model = "caplants2cluttercr_leaf3.p3d";
displayName = "Internal: FxCrWindLeaf3";
};
};
CfgWorldList.hpp
class CfgWorldList {
class test {};
};
CfgWorlds.hpp
class CfgWorlds {
class DefaultWorld {
class Weather; // External class reference
};
class CAWorld : DefaultWorld {
class Grid {};
class DayLightingBrightAlmost; // External class reference
class DayLightingRainy; // External class reference
class DefaultClutter; // External class reference
class Weather : Weather {
class Lighting; // External class reference
};
};
class DefaultLighting; // External class reference
class test : CAWorld {
access = ReadOnlyVerified;
worldId = 1;
cutscenes[] = {""};
description = "test v.A2";
icon = "floosytestdataiconicon.paa";
worldName = "floosytesttest1.wrp";
pictureMap = "";
pictureShot = "floosytestdataile_test.paa";
plateFormat = "ML$ - #####";
plateLetters = ABCDEGHIKLMNOPRSTVXZ;
longitude = -40; // positive is east
latitude = -40; // positive is south
Dans la partie ci-dessus vous modifierez la “description” qui correspond au nom de l'ile, “cutscenes” pour le film d'intro du menu, et “worldname” qui référence le chemin de votre .wrp “icon” est le chemin pour avoir un icon avant le nom de votre ile dans la liste, et “pictureshot” est le chemin de l'image dans l'encadré du choix de l'ile.
class Grid : Grid {
offsetX = 0;
offsetY = -15360;
class Zoom1 {
zoomMax = 0.5;
format = "XY";
formatX = "Aa";
formatY = "00";
stepX = 200;
stepY = 200;
};
class Zoom2 {
zoomMax = 1e+030;
format = "XY";
formatX = "A";
formatY = "0";
stepX = 2000;
stepY = 2000;
};
};
startTime = 8:30;
startDate = 07/06/2007;
startWeather = 0.1;
startFog = 0.0;
forecastWeather = 0.3;
forecastFog = 0.0;
seagullPos[] = {2557, 50.0, 2880};
centerPosition[] = {2557, 2880};
ilsPosition[] = {6401, 5295, 120};
ilsDirection[] = {0, 0, 0};
ilsTaxiIn[] = {};
ilsTaxiOff[] = {};
drawTaxiway = 0;
Ci-dessus, “Zoom” vous permet de regler le zoom de la map dans l'editeur et mode map en jeu. Et à partir de “StratTime” vous allez configurer votre aéroport. Afin de comprendre comment marche la configuration de l'aéroport, utilisez le tuto suivant:
ICI.
class ReplaceObjects {};
class Sounds {
sounds[] = {};
};
class Animation {
vehicles[] = {};
};
class Lighting : DefaultLighting {
groundReflection[] = {0.06, 0.06, 0.03};
};
class DayLightingBrightAlmost : DayLightingBrightAlmost {
deepNight[] = {-15, {0.05, 0.05, 0.06}, {0.001, 0.001, 0.002}, {0.02, 0.02, 0.05}, {0.003, 0.003, 0.003}, {0.0001, 0.0001, 0.0002}, {0.0001, 0.0001, 0.0002}, 0};
fullNight[] = {-5, {0.05, 0.05, 0.05}, {0.02, 0.02, 0.02}, {0.04, 0.04, 0.04}, {0.04, 0.04, 0.04}, {0.01, 0.01, 0.02}, {0.08, 0.06, 0.06}, 0};
sunMoon[] = {-3.75, {0.045, 0.04, 0.04}, {0.04, 0.04, 0.04}, {0.045, 0.04, 0.04}, {0.04, 0.04, 0.04}, {0.04, 0.035, 0.04}, {0.1, 0.08, 0.09}, 0.5};
earlySun[] = {-2.5, {0.12, 0.1, 0.1}, {0.08, 0.06, 0.07}, {0.12, 0.1, 0.1}, {0.08, 0.06, 0.07}, {0.08, 0.07, 0.08}, {0.1, 0.1, 0.12}, 1};
sunrise[] = {0, {{0.7, 0.45, 0.45}, 5.16+(-4)}, {{0.07, 0.09, 0.12}, 4.0+(-4)}, {{0.6, 0.47, 0.25}, 4.66+(-4)}, {{0.1, 0.09, 0.1}, 4.3+(-4)}, {{0.5, 0.4, 0.4}, 6.49+(-4)}, {{0.88, 0.51, 0.24}, 8.39+(-4)}, 1};
earlyMorning[] = {5, {{0.65, 0.55, 0.55}, 6.04+(-4)}, {{0.08, 0.09, 0.11}, 4.5+(-4)}, {{0.55, 0.47, 0.25}, 5.54+(-4)}, {{0.1, 0.09, 0.1}, 5.02+(-4)}, {{0.5, 0.4, 0.4}, 7.05+(-4)}, {{0.88, 0.51, 0.24}, 8.88+(-4)}, 1};
midMorning[] = {15, {{0.98, 0.85, 0.8}, 8.37+(-4)}, {{0.08, 0.09, 0.11}, 6.42+(-4)}, {{0.87, 0.47, 0.25}, 7.87+(-4)}, {{0.09, 0.09, 0.1}, 6.89+(-4)}, {{0.5, 0.4, 0.4}, 8.9+(-4)}, {{0.88, 0.51, 0.24}, 10.88+(-4)}, 1};
morning[] = {25, {{1, 1, 0.9}, 13.17+(-4)}, {{0.17, 0.18, 0.19}, 10.26+(-4)}, {{1, 1, 0.9}, 12.67+(-4)}, {{0.17, 0.18, 0.19}, 11.71+(-4)}, {{0.15, 0.15, 0.15}, 12.42+(-4)}, {{0.17, 0.17, 0.15}, 14.42+(-4)}, 1};
noon[] = {45, {{1, 1, 1}, 17+(-4)}, {{1, 1.3, 1.55}, 13.5+(-4)}, {{1, 1, 1}, 15+(-4)}, {{0.36, 0.37, 0.38}, 13.5+(-4)}, {{1, 1, 1}, 16+(-4)}, {{1.0, 1.0, 1}, 17+(-4)}, 1};
};
class DayLightingRainy : DayLightingRainy {
deepNight[] = {-15, {0.0034, 0.0034, 0.004}, {0.003, 0.003, 0.003}, {0.0034, 0.0034, 0.004}, {0.003, 0.003, 0.003}, {0.001, 0.001, 0.002}, {0.001, 0.001, 0.002}, 0};
fullNight[] = {-5, {0.023, 0.023, 0.023}, {0.02, 0.02, 0.02}, {0.023, 0.023, 0.023}, {0.02, 0.02, 0.02}, {0.01, 0.01, 0.02}, {0.08, 0.06, 0.06}, 0};
sunMoon[] = {-3.75, {0.04, 0.04, 0.05}, {0.04, 0.04, 0.05}, {0.04, 0.04, 0.05}, {0.04, 0.04, 0.05}, {0.04, 0.035, 0.04}, {0.11, 0.08, 0.09}, 0.5};
earlySun[] = {-2.5, {0.0689, 0.0689, 0.0804}, {0.06, 0.06, 0.07}, {0.0689, 0.0689, 0.0804}, {0.06, 0.06, 0.07}, {0.08, 0.07, 0.08}, {0.14, 0.1, 0.12}, 0.5};
earlyMorning[] = {0, {{1, 1, 1}, (-4)+3.95}, {{1, 1, 1}, (-4)+3.0}, {{1, 1, 1}, (-4)+3.95}, {{1, 1, 1}, (-4)+3.0}, {{1, 1, 1}, (-4)+4}, {{1, 1, 1}, (-4)+5.5}, 1};
morning[] = {5, {{1, 1, 1}, (-4)+5.7}, {{1, 1, 1}, (-4)+4.5}, {{1, 1, 1}, (-4)+5.7}, {{1, 1, 1}, (-4)+4.5}, {{1, 1, 1}, (-4)+7}, {{1, 1, 1}, (-4)+8}, 1};
lateMorning[] = {25, {{1, 1, 1}, (-4)+10.45}, {{1, 1, 1}, (-4)+9.75}, {{1, 1, 1}, (-4)+10.45}, {{1, 1, 1}, (-4)+9.75}, {{1, 1, 1}, (-4)+12}, {{1, 1, 1}, (-4)+12.75}, 1};
noon[] = {70, {{1, 1, 1}, (-4)+12.5}, {{1, 1, 1}, (-4)+11}, {{1, 1, 1}, (-4)+12}, {{1, 1, 1}, (-4)+11}, {{1, 1, 1}, (-4)+13.5}, {{1, 1, 1}, (-4)+14}, 1};
};
class Weather : Weather {
class Lighting : Lighting {
class BrightAlmost : DayLightingBrightAlmost {
overcast = 0;
};
class Rainy : DayLightingRainy {
overcast = 1.0;
};
};
};
clutterGrid = 1.0;
clutterDist = 125;
noDetailDist = 40;
fullDetailDist = 15;
midDetailTexture = "cachernarusdatacr_trava1_mco.paa";
minTreesInForestSquare = 3;
minRocksInRockSquare = 3;
class clutter {
class grassgeneral : DefaultClutter {
model = "caplants2clutterc_stubble.p3d";
affectedByWind = 0.3;
swLighting = 1;
scaleMin = 0.9;
scaleMax = 1.3;
};
class floo_stubble : grassgeneral {
model = "caplants2clutterc_stubble.p3d";
affectedByWind = 0.3;
swLighting = 1;
scaleMin = 0.9;
scaleMax = 1.3;
};
class floo_GrassCrooked : grassgeneral {
model = "caplants2clutterc_GrassCrookedforest.p3d";
affectedByWind = 0.3;
swLighting = 1;
scaleMin = 0.7;
scaleMax = 1.4;
};
class floo_AutumnFlowers : grassgeneral {
model = "caplants2clutterc_autumn_flowers.p3d";
affectedByWind = 0.4;
swLighting = 1;
scaleMin = 0.2;
scaleMax = 0.7;
};
class floo_grassdrylongbunch : grassgeneral {
model = "caplants2clutterc_grassdrylongbunch.p3d";
affectedByWind = 0.1;
swLighting = 1;
scaleMin = 0.7;
scaleMax = 1.0;
};
class floo_caluna : grassgeneral {
model = "caplants2clutterc_caluna.p3d";
affectedByWind = 0.15;
swLighting = 1;
scaleMin = 0.9;
scaleMax = 1.8;
};
class floo_grasstall : grassgeneral {
model = "caplants2clutterc_grasstall.p3d";
affectedByWind = 0.2;
swLighting = 1;
scaleMin = 0.5;
scaleMax = 0.85;
};
class floo_BlueBerry : grassgeneral {
model = "caplants2clutterc_BlueBerry.p3d";
affectedByWind = 0.05;
swLighting = 1;
scaleMin = 0.85;
scaleMax = 1.3;
};
class floo_stubble2 : grassgeneral {
model = "caplants2clutterc_stubble.p3d";
affectedByWind = 0.05;
swLighting = 1;
scaleMin = 0.45;
scaleMax = 0.9;
};
};
Les lignes précédentes définissent l'usage de .p3d pour créer votre herbe qui sera directement appliquées en fonction de vos textures de sol. Vous pouvez paramétrer la probabilité mini et maxi de présence dans un carré de texture ainsi que l'affectation du vent sur l'objet.
class Subdivision {
class Fractal {
rougness = 5;
maxRoad = 0.02;
maxTrack = 0.25;
maxSlopeFactor = 0.05;
};
class WhiteNoise {
rougness = 2;
maxRoad = 0.01;
maxTrack = 0.05;
maxSlopeFactor = 0.0025;
};
minY = 0.0;
minSlope = 0.02;
};
class Ambient {
class Mammals {
radius = 200;
cost = "(1 + forest + trees) * (0.5 + (0.5 * night)) * (1 - sea) * (1 - houses)";
class Species {
class Rabbit {
probability = 0.2;
cost = 1;
};
};
};
class BigBirds {
radius = 300;
cost = "((1 + forest + trees) - ((2 * rain)) - houses) * (1 - night) * (1 - sea)";
class Species {
class Hawk {
probability = 0.2;
cost = 1;
};
};
};
class Birds {
radius = 170;
cost = "(1 - night) * ((1 + (3 * sea)) - (2 * rain))";
class Species {
class Crow {
probability = 0.2;
cost = 1;
};
};
};
class BigInsects {
radius = 20;
cost = "(5 - (2 * houses)) * (1 - night) * (1 - rain) * (1 - sea) * (1 - windy)";
class Species {
class DragonFly {
probability = "0.6 - (meadow * 0.5) + (forest * 0.4)";
cost = 1;
};
class ButterFly {
probability = "0.4 + (meadow * 0.5) - (forest * 0.4)";
cost = 1;
};
};
};
class BigInsectsAquatic {
radius = 20;
cost = "(3 * sea) * (1 - night) * (1 - rain) * (1 - windy)";
class Species {
class DragonFly {
probability = 1;
cost = 1;
};
};
};
class SmallInsects {
radius = 3;
cost = "(12 - 8 * hills) * (1 - night) * (1 - rain) * (1 - sea) * (1 - windy)";
class Species {
class HouseFly {
probability = "deadBody + (1 - deadBody) * (0.5 - forest * 0.1 - meadow * 0.2)";
cost = 1;
};
class HoneyBee {
probability = "(1 - deadBody) * (0.5 - forest * 0.1 + meadow * 0.2)";
cost = 1;
};
class Mosquito {
probability = "(1 - deadBody) * (0.2 * forest)";
cost = 1;
};
};
};
class NightInsects {
radius = 3;
cost = "(9 - 8 * hills) * night * (1 - rain) * (1 - sea) * (1 - windy)";
class Species {
class Mosquito {
probability = 1;
cost = 1;
};
};
};
class WindClutter {
radius = 10;
cost = "((20 - 5 * rain) * (3 * (windy factor [0.2, 0.5]))) * (1 - sea)";
class Species {
class FxWindGrass1 {
probability = "0.4 - 0.2 * hills - 0.2 * trees";
cost = 1;
};
class FxWindGrass2 {
probability = "0.4 - 0.2 * hills - 0.2 * trees";
cost = 1;
};
class FxWindRock1 {
probability = "0.4 * hills";
cost = 1;
};
class FxCrWindLeaf1 {
probability = "0.2 * trees";
cost = 1;
};
class FxCrWindLeaf2 {
probability = "0.1 * trees + 0.2";
cost = 1;
};
class FxCrWindLeaf3 {
probability = "0.1 * trees";
cost = 1;
};
};
};
class NoWindClutter {
radius = 15;
cost = 8;
class Species {
class FxWindPollen1 {
probability = 1;
cost = 1;
};
class FxCrWindLeaf1 {
probability = "0.2 * trees";
cost = 1;
};
class FxCrWindLeaf2 {
probability = "0.1 * trees + 0.2";
cost = 1;
};
class FxCrWindLeaf3 {
probability = "0.1 * trees";
cost = 1;
};
};
Ci-dessus les animaux et leur probabilité de presence en fonction de l'environnement.
class Names {
class AssiOudbou {
name = "Assi Oudbou";
position[] = {1299, 8428};
type = "NameVillage";
radiusA = 100;
radiusB = 100;
};
class view1 {
name = "Pointe du bout";
position[] = {848, 8068};
type = "Viewpoint";
radiusA = 100;
radiusB = 100;
};
class view2 {
name = "Pointe Oututir";
position[] = {12002, 5339};
type = "Viewpoint";
radiusA = 100;
radiusB = 100;
};
class view3 {
name = "Pointe du Ticoin";
position[] = {3525, 2364};
type = "Viewpoint";
radiusA = 100;
radiusB = 100;
};
class view4 {
name = "Falaise Blaise";
position[] = {8474, 1674};
type = "Viewpoint";
radiusA = 100;
radiusB = 100;
};
Ci-dessus la définition des noms des endroits intéressants de votre map.Voici un petit glossaire pour le référencement du “type”:
- Viewpoint: point de vue
- Namevillage: nom de village
- Namelocal: lieu local
- NameMarine: mer
- NameCity: Ville
- vegetationBroadleaf: zone végétale
Vous pouvez configurer la taille du texte avec “radiusA et radiusB”. Pour les positions, réferez vous dans visitor aus coordonnées en bas à droite de votre écran.
...
...
class Taihenvrac {
name = "Taihenvrac";
position[] = {9148, 4821};
type = "Namevillage";
radiusA = 100;
radiusB = 100;
};
};
};
};
config.cpp
#define private 0
#define protected 1
#define public 2
#define ReadAndWrite 0
#define ReadAndCreate 1
#define ReadOnly 2
#define ReadOnlyVerified 3
#include "CfgPatches.hpp"
#include "CfgVehicles.hpp"
#include "CfgWorlds.hpp"
#include "CfgWorldList.hpp"
#include "CfgMissions.hpp"
#include "CfgSurfaces.hpp"
#include "CfgSurfaceCharacters.hpp"