Map Edit Plugin

From Desolation REDUX Wiki
Jump to: navigation, search

Creating a Map Edit plugin[edit]

Creating a plugin to add objects onto the map is ment to be very simple. Here is a basic guide.

Designing the map[edit]


You want to start by loading into editor on the map you wish to add objects to. For this, I chose Chernarus. Next you'll want to design the map like you would any other game.

Exporting the plugin data[edit]


To export the data needed for your plugin. Go to Tools > Desolation: Redux Tools > Generate Code for Map Designing

MapEditPlugin.png







This will give you the data needed for you plugin config. Here is an example
<source lang="csharp">

   class Chernarus {
       class CampEastC_4333109740110 {
           posATL[] = {4332.74,10974.2,0};
           vectorUp[] = {0,0,1};
           vectorDir[] = {0.856478,0.516184,0};
       };
       class CampEastC_4337109660110 {
           posATL[] = {4337.37,10965.8,0};
           vectorUp[] = {0,0,1};
           vectorDir[] = {0.856478,0.516184,0};
       };
       class CampEastC_4342109580110 {
           posATL[] = {4341.88,10957.6,0};
           vectorUp[] = {0,0,1};
           vectorDir[] = {0.856478,0.516184,0};
       };
       class CampEastC_4347109490110 {
           posATL[] = {4346.68,10949.2,0.000457764};
           vectorUp[] = {0.00133721,0.00133721,0.999998};
           vectorDir[] = {0.856477,0.516182,-0.00183554};
       };
       class CampEastC_4317109640110 {
           posATL[] = {4316.85,10964.5,0};
           vectorUp[] = {0,0,1};
           vectorDir[] = {-0.847998,-0.529999,0};
       };
       class CampEastC_4322109560110 {
           posATL[] = {4321.81,10956.1,0};
           vectorUp[] = {0,0,1};
           vectorDir[] = {-0.847998,-0.529999,0};
       };
       class CampEastC_4327109460110 {
           posATL[] = {4327.03,10946.5,0};
           vectorUp[] = {0,0,1};
           vectorDir[] = {-0.847998,-0.529999,0};
       };
   };

</source>

Add your data to a plugin[edit]


If you have not created the basic layout for a plugin, read this tutorial Plugin Development Pack or Clarky's Guide

In your plugin you will need to add the following before pasting in the above exported code <source lang="csharp"> class CfgPluginMapEdits {

   //paste map edits here

}; </source>
Now, if you followed the basic plugin layout tutorial correctly, you are done. Pack your plugin and add it to your server.
Here is a completed example from Redux: <source lang="csharp"> class CfgPatches {

   class ChernarusMap {
       requiredAddons[] = {"Desolation"};
       units[] = {};
   };

};

class Plugins {

   class ChernarusMap
   {
       name = "ChernarusMap";
       desc = "Custom map design for Cherno by Desolation: Redux";
       tag = "CHM";
   };

}; class CfgPluginMapEdits {

   class Chernarus {
       class Land_HBarrierTower_F_122071860110 {
           posATL[] = {1219.53,7185.62,0.0102844};
           vectorUp[] = {0.0119996,-0.143811,0.989532};
           vectorDir[] = {0.735737,0.671439,0.0886598};
       };
       class Camp_EP1_125371920110 {
           posATL[] = {1253.2,7191.67,0.0116272};
           vectorUp[] = {-0.0080009,-0.137347,0.990491};
           vectorDir[] = {-0.708863,0.699418,0.0912591};
       };
       class Land_HBarrierWall6_F_121072260100 {
           posATL[] = {1209.8,7225.89,-0.0397186};
           vectorUp[] = {-0.0213272,-0.0704743,0.997286};
           vectorDir[] = {-0.977385,0.211384,-0.00596396};
       };
       class Land_tent_east_127373320010 {
           posATL[] = {1273.44,7332.34,0.0176544};
           vectorUp[] = {-0.126963,-0.0620382,0.989965};
           vectorDir[] = {0.411704,0.904716,0.109497};
       };
       class CampEast_EP1_122572740100 {
           posATL[] = {1225.06,7274.47,0.0121918};
           vectorUp[] = {-0.0452868,-0.0558549,0.997411};
           vectorDir[] = {-0.987627,0.152565,-0.0362989};
       };

}; </source>