Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
2n1map [2016/10/17 18:11]
jdmfarms
2n1map [2017/05/24 14:27] (current)
Line 12: Line 12:
 ===== Intro ===== ===== Intro =====
  
-This is a step-by-step example of how to set up a map's file-assets and scripts, so [i]one[/i] [font=Courier New]map01.I3D[/​font] ​that already contains the DLC2-BGA, can be used for both a '​with-DLC2'​ and a '​no-DLC2'​ playable map in-game.+This is a step-by-step example of how to set up a map's file-assets and scripts, so one map01.I3D that already contains the DLC2-BGA, can be used for both a '​with-DLC2'​ and a '​no-DLC2'​ playable map in-game.
  
 The way it works, is that the map-script that loads the no-DLC2 will delete the BGA scenegraph node and everything it contains, thereby removing it from the map when it is loaded in-game. The way it works, is that the map-script that loads the no-DLC2 will delete the BGA scenegraph node and everything it contains, thereby removing it from the map when it is loaded in-game.
Line 20: Line 20:
 The tools needed are; The tools needed are;
  
- FileExplorer  (comes with MS-Windows) +  * FileExplorer  (comes with MS-Windows) 
- ​Notepad+++  ​*  ​Notepad++
  
 ===== Full Details ===== ===== Full Details =====
  
  
-[b]A - [u]Preparing Asset Files[/u][/b]+==== A - Preparing Asset Files ====
  
-A.1) The root-folder of your map should contain these files. Please note that '[font=Courier New]SampleModMap[/font]' could be whatever you have already renamed the files to;+ 
 +A.1) The root-folder of your map should contain these files. Please note that '​SampleModMap'​ could be whatever you have already renamed the files to;
  
   *  modDesc.XML   *  modDesc.XML
Line 39: Line 40:
  
  
-A.2) Copy only these files mentioned below (i.e [i]not[/i] [font=Courier New]modDesc.XML[/​font] ​nor [font=Courier New]map01.I3D[/font]), and paste into the same folder, so you get a duplicate of the files;+A.2) Copy only these files mentioned below (i.e not modDesc.XML nor map01.I3D), and paste into the same folder, so you get a duplicate of the files;
  
   * defaultVehicles.XML   * defaultVehicles.XML
Line 66: Line 67:
 A.4) Now rename the files, so you end up with a set for '​..._WithDLC2'​ and a set for '​..._NoDLC2';​ A.4) Now rename the files, so you end up with a set for '​..._WithDLC2'​ and a set for '​..._NoDLC2';​
  
- ​defaultVehicles.XML                ->  defaultVehicles[color=blue]_WithDLC2[/​color].XML\\ + ​defaultVehicles.XML                ->  defaultVehicles_WithDLC2.XML\\ 
- ​SampleModMap_briefing1.DDS         ->  SampleModMap[color=blue]_WithDLC2[/​color]_briefing1.DDS\\ + ​SampleModMap_briefing1.DDS         ->  SampleModMap_WithDLC2_briefing1.DDS\\ 
- ​SampleModMap_briefing2.DDS         ->  SampleModMap[color=blue]_WithDLC2[/​color]_briefing2.DDS\\ + ​SampleModMap_briefing2.DDS         ->  SampleModMap_WithDLC2_briefing2.DDS\\ 
- ​SampleModMap_briefing3.DDS         ->  SampleModMap[color=blue]_WithDLC2[/​color]_briefing3.DDS\\ + ​SampleModMap_briefing3.DDS         ->  SampleModMap_WithDLC2_briefing3.DDS\\ 
- ​SampleModMap.LUA                   ->  SampleModMap[color=blue]_WithDLC2[/​color].LUA\\+ ​SampleModMap.LUA                   ->  SampleModMap_WithDLC2.LUA\\
  
- ​defaultVehicles - Copy.XML         ->  defaultVehicles[color=blue]_NoDLC2[/​color].XML\\ + ​defaultVehicles - Copy.XML         ->  defaultVehicles_NoDLC2.XML\\ 
- ​SampleModMap_briefing1 - Copy.DDS  ->  SampleModMap[color=blue]_NoDLC2[/​color]_briefing1.DDS\\ + ​SampleModMap_briefing1 - Copy.DDS  ->  SampleModMap_NoDLC2_briefing1.DDS\\ 
- ​SampleModMap_briefing2 - Copy.DDS  ->  SampleModMap[color=blue]_NoDLC2[/​color]_briefing2.DDS\\ + ​SampleModMap_briefing2 - Copy.DDS  ->  SampleModMap_NoDLC2_briefing2.DDS\\ 
- ​SampleModMap_briefing3 - Copy.DDS  ->  SampleModMap[color=blue]_NoDLC2[/​color]_briefing3.DDS\\ + ​SampleModMap_briefing3 - Copy.DDS  ->  SampleModMap_NoDLC2_briefing3.DDS\\ 
- ​SampleModMap - Copy.LUA            ->  SampleModMap[color=blue]_NoDLC2[/​color].LUA\\+ ​SampleModMap - Copy.LUA            ->  SampleModMap_NoDLC2.LUA\\
  
  
 A.5) The result is that the root-folder of your map should now contain these files; A.5) The result is that the root-folder of your map should now contain these files;
  
-   * modDesc.XML+  ​* modDesc.XML
   *  map01.I3D   *  map01.I3D
   *  defaultVehicles_NoDLC2.XML   *  defaultVehicles_NoDLC2.XML
Line 95: Line 96:
  
  
-A.6) Go to the [font=Courier New]map01[/​font] ​folder, and take a duplicate of the [font=Courier New]map_preview.DDS[/​font] ​and [font=Courier New]pda_map.DDS[/​font] ​files;+A.6) Go to the map01 folder, and take a duplicate of the map_preview.DDS and pda_map.DDS files;
  
   * map_preview.DDS   * map_preview.DDS
-  *   [color=blue]map_preview - Copy.DDS[/color]+  *   map_preview - Copy.DDS
   *   pda_map.DDS   *   pda_map.DDS
-  *   [color=blue]pda_map - Copy.DDS[/color]+  *   pda_map - Copy.DDS
  
  
 A.7) Rename these like so; A.7) Rename these like so;
  
- ​ map_preview.DDS          ->  map_preview[color=blue]_WithDLC2[/​color].DDS\\ + ​ map_preview.DDS          ->  map_preview_WithDLC2.DDS\\ 
- ​ map_preview - Copy.DDS   ->  map_preview[color=blue]_NoDLC2[/​color].DDS\\ + ​ map_preview - Copy.DDS   ->  map_preview_NoDLC2.DDS\\ 
- ​ pda_map.DDS              ->  pda_map[color=blue]_WithDLC2[/​color].DDS\\ + ​ pda_map.DDS              ->  pda_map_WithDLC2.DDS\\ 
- ​ pda_map - Copy.DDS       ->  pda_map[color=blue]_NoDLC2[/​color].DDS\\+ ​ pda_map - Copy.DDS       ->  pda_map_NoDLC2.DDS\\
  
  
  
 ---- ----
-[b]B - [u]Modifying modDesc.XML[/​u][/​b] 
  
-B.1) Now that the files have been duplicated and renamed, you need to modify ​[font=Courier New]modDesc.XML[/​font] ​- so open up [font=Courier New]modDesc.XML[/​font] ​in Notepad++, and start by removing the extra-source-file DLC2Bga.LUA,​ either delete the line, or comment it out using XML-comment tags: + 
-[font=Courier New] +==== B - Modifying modDesc.XML ==== 
-    <​extraSourceFiles>​ + 
-[color=maroon]<​!--    <​sourceFile filename="​giantsLS11DLC2SDK/​DLC2Bga.lua"/>​ -->[/color] + 
-    </​extraSourceFiles>​ +B.1) Now that the files have been duplicated and renamed, you need to modify modDesc.XML - so open up modDesc.XML in Notepad++, and start by removing the extra-source-file DLC2Bga.LUA,​ either delete the line, or comment it out using XML-comment tags: 
-[/font]+ 
 +<​code> ​   <​extraSourceFiles>​ 
 +!--    <​sourceFile filename="​giantsLS11DLC2SDK/​DLC2Bga.lua"/>​ --> 
 +    </​extraSourceFiles>​</code> 
  
 B.2) Go duplicate the [font=Courier New]<​map>​[/​font]...[font=Courier New]</​map>​[/​font] block, so you end up with two [font=Courier New]<​map>​[/​font]-blocks within the [font=Courier New]<​maps>​[/​font] section, and add some XML-comment tags; B.2) Go duplicate the [font=Courier New]<​map>​[/​font]...[font=Courier New]</​map>​[/​font] block, so you end up with two [font=Courier New]<​map>​[/​font]-blocks within the [font=Courier New]<​maps>​[/​font] section, and add some XML-comment tags;
  
 Example (excluded some lines for clarity): Example (excluded some lines for clarity):
-[font=Courier New] 
-   <​maps>​ 
  
-     [color=blue]<!-- WithDLC2 -->[/color] +   <​code><​maps>​ 
-       <​map ​[color=gray]... + 
-         ...[/color]+     <!-- WithDLC2 --> 
 +       <​map... 
 +         ...
        </​map>​        </​map>​
  
-     [color=blue]<!-- NoDLC2 -->[/color] +     <!-- NoDLC2 --> 
-       <​map ​[color=gray]... +       <map ... 
-         ...[/color]+         ...
        </​map>​        </​map>​
  
-   </​maps>​ +   </​maps>​</code>
-[/font]+
  
-B.3) Also duplicate the three briefing ​[font=Courier New]<​text>​[/font]...[font=Courier New]</​text>​[/​font] ​blocks, found in the [font=Courier New]<​l10n>​[/​font] ​section, and add some XML-comment tags;+ 
 +B.3) Also duplicate the three briefing <​text>​...</​text>​ blocks, found in the <​l10n>​ section, and add some XML-comment tags;
  
 Example (excluded some lines for clarity): Example (excluded some lines for clarity):
-[font=Courier New] 
-    <​l10n>​ 
  
-      [color=blue]<!-- WithDLC2 -->[/color] +<​code>​    <​l10n>​ 
-        <​text ​[color=gray]...[/color]BriefingText1">​ + 
-          [color=gray]...[/color]+      <!-- WithDLC2 --> 
 +        <text ...BriefingText1">​ 
 +          ...
         </​text>​         </​text>​
-        <​text ​[color=gray]...[/color]BriefingText2">​ +        <text ...BriefingText2">​ 
-          [color=gray]...[/color]+          ...
         </​text>​         </​text>​
-        <​text ​[color=gray]...[/color]BriefingText3">​ +        <text ...BriefingText3">​ 
-          [color=gray]...[/color]+          ...
         </​text>​         </​text>​
  
-      [color=blue]<!-- NoDLC2 -->[/color] +      <!-- NoDLC2 --> 
-        <​text ​[color=gray]...[/color]BriefingText1">​ +        <text ...BriefingText1">​ 
-          [color=gray]...[/color]+          ...
         </​text>​         </​text>​
-        <​text ​[color=gray]...[/color]BriefingText2">​ +        <text ...BriefingText2">​ 
-          [color=gray]...[/color]+          ...
         </​text>​         </​text>​
-        <​text ​[color=gray]...[/color]BriefingText3">​ +        <text ...BriefingText3">​ 
-          [color=gray]...[/color]+          ...
         </​text>​         </​text>​
  
-    </​l10n>​ +    </​l10n>​</code> 
-[/font]+
  
-B.4) Now you modify ​[i]one[/i] of the [font=Courier New]<map>[/​font] ​blocks'​ content, so it refer to the '...[font=Courier New]_WithDLC2[/font]' file-assets and briefing texts.+B.4) Now you modify one of the <map> blocks'​ content, so it refer to the '​..._WithDLC2'​ file-assets and briefing texts.
  
-Please notice that the value enclosed by the [font=Courier New]<​briefingTextPrefix>​[/font]..[font=Courier New]</​briefingTextPrefix>​[/font], contains an extra underscore-character '​_'​.+Please notice that the value enclosed by the <​briefingTextPrefix>​..</​briefingTextPrefix>,​ contains an extra underscore-character '​_'​.
  
 Example (lines wrapped for clarity): Example (lines wrapped for clarity):
-[font=Courier New] + 
-    [color=blue]<!-- WithDLC2 -->[/color] +<​code> ​   <!-- WithDLC2 --> 
-    <map id="SampleModMap[color=blue]_WithDLC2[/​color]+    <map id="SampleModMap_WithDLC2
-         className="​SampleModMap[color=blue]_WithDLC2[/​color]+         className="​SampleModMap_WithDLC2
-         filename="​SampleModMap[color=blue]_WithDLC2[/​color].lua"​ +         filename="​SampleModMap_WithDLC2.lua"​ 
-         defaultVehiclesXMLFilename="​defaultVehicles[color=blue]_WithDLC2[/​color].xml">​+         defaultVehiclesXMLFilename="​defaultVehicles_WithDLC2.xml">​
  
         <​title>​         <​title>​
Line 192: Line 196:
         </​description>​         </​description>​
                  
-        <​briefingImagePrefix>​sampleModMap[color=blue]_WithDLC2[/​color]</​briefingImagePrefix>​ +        <​briefingImagePrefix>​sampleModMap_WithDLC2</​briefingImagePrefix>​ 
-        <​briefingTextPrefix>​sampleModMap[color=blue]_WithDLC2_[/​color]</​briefingTextPrefix>​ +        <​briefingTextPrefix>​sampleModMap_WithDLC2_</​briefingTextPrefix>​ 
-        [color=blue]<!--                ^^^^^^^^^^^^^^^^^^^^^^                  -->[/color] +        <!--                ^^^^^^^^^^^^^^^^^^^^^^                  --> 
-        <​iconFilename>​map01/​map_preview[color=blue]_WithDLC2[/​color].DDS</​iconFilename>​+        <​iconFilename>​map01/​map_preview_WithDLC2.DDS</​iconFilename>​
  
-    </​map>​ +    </​map>​</code>
-[/font]+
  
-B.5) Then modify ​[i]one[/i] of the sets of three briefing ​[font=Courier New]<​text>​[/​font] ​blocks, so they contain texts for the '...[font=Courier New]_WithDLC2[/font]' map.+ 
 +B.5) Then modify one of the sets of three briefing <​text>​ blocks, so they contain texts for the '​..._WithDLC2'​ map.
  
 Please notice that there is an underscore-character just before the "​BriefingText"​. Please notice that there is an underscore-character just before the "​BriefingText"​.
  
 Example: Example:
-[font=Courier New] + 
-      [color=blue]<!-- WithDLC2 -->[/color] +<​code> ​     <!-- WithDLC2 --> 
-        <text name="sampleModMap[color=blue]_WithDLC2_[/​color]BriefingText1">​ +        <text name="sampleModMap_WithDLC2_BriefingText1">​ 
-        [color=blue]<!--        ^^^^^^^^^^^^^^^^^^^^^^            -->[/color]+        <!--        ^^^^^^^^^^^^^^^^^^^^^^            -->
             <​en>​             <​en>​
                 <​![CDATA[Write something here!]]>                 <​![CDATA[Write something here!]]>
             </​en>​             </​en>​
         </​text>​         </​text>​
-        <text name="sampleModMap[color=blue]_WithDLC2_[/​color]BriefingText2">​ +        <text name="sampleModMap_WithDLC2_BriefingText2">​ 
-        [color=blue]<!--        ^^^^^^^^^^^^^^^^^^^^^^            -->[/color]+        <!--        ^^^^^^^^^^^^^^^^^^^^^^            -->
             <​en>​             <​en>​
                 <​![CDATA[Maybe also write something here too!]]>                 <​![CDATA[Maybe also write something here too!]]>
             </​en>​             </​en>​
         </​text>​         </​text>​
-        <text name="sampleModMap[color=blue]_WithDLC2_[/​color]BriefingText3">​ +        <text name="sampleModMap_WithDLC2_BriefingText3">​ 
-        [color=blue]<!--        ^^^^^^^^^^^^^^^^^^^^^^            -->[/color]+        <!--        ^^^^^^^^^^^^^^^^^^^^^^            -->
             <​en>​             <​en>​
                 <​![CDATA[And even some more, if you want!]]>                 <​![CDATA[And even some more, if you want!]]>
             </​en>​             </​en>​
-        </​text>​ +        </​text>​</code>
-[/font]+
  
-B.6) Do step B.4 and B.5 again, but this time modify the other blocks, so they refer to the '...[font=Courier New]_NoDLC2[/font]' file-assets and briefing texts.+ 
 +B.6) Do step B.4 and B.5 again, but this time modify the other blocks, so they refer to the '​..._NoDLC2'​ file-assets and briefing texts.
  
 Example (lines wrapped for clarity): Example (lines wrapped for clarity):
-[font=Courier New] + 
-    [color=blue]<!-- NoDLC2 -->[/color] +<​code>​   <!-- NoDLC2 --> 
-    <map id="SampleModMap[color=blue]_NoDLC2[/​color]+    <map id="SampleModMap_NoDLC2
-         className="​SampleModMap[color=blue]_NoDLC2[/​color]+         className="​SampleModMap_NoDLC2
-         filename="​SampleModMap[color=blue]_NoDLC2[/​color].lua"​ +         filename="​SampleModMap_NoDLC2.lua"​ 
-         defaultVehiclesXMLFilename="​defaultVehicles[color=blue]_NoDLC2[/​color].xml">​+         defaultVehiclesXMLFilename="​defaultVehicles_NoDLC2.xml">​
  
         <​title>​         <​title>​
Line 245: Line 249:
         </​description>​         </​description>​
                  
-        <​briefingImagePrefix>​sampleModMap[color=blue]_NoDLC2[/​color]</​briefingImagePrefix>​ +        <​briefingImagePrefix>​sampleModMap_NoDLC2</​briefingImagePrefix>​ 
-        <​briefingTextPrefix>​sampleModMap[color=blue]_NoDLC2_[/​color]</​briefingTextPrefix>​ +        <​briefingTextPrefix>​sampleModMap_NoDLC2_</​briefingTextPrefix>​ 
-        [color=blue]<!--                ^^^^^^^^^^^^^^^^^^^^                  -->[/color] +        <!--                ^^^^^^^^^^^^^^^^^^^^                  --> 
-        <​iconFilename>​map01/​map_preview[color=blue]_NoDLC2[/​color].DDS</​iconFilename>​+        <​iconFilename>​map01/​map_preview_NoDLC2.DDS</​iconFilename
 + 
 +    </​map></​code>
  
-    </​map>​ 
-[/font] 
 Example: Example:
-[font=Courier New] + 
-      [color=blue]<!-- NoDLC2 -->[/color] +      <​code>​<!-- NoDLC2 --> 
-        <text name="sampleModMap[color=blue]_NoDLC2_[/​color]BriefingText1">​ +        <text name="sampleModMap_NoDLC2_BriefingText1">​ 
-        [color=blue]<!--        ^^^^^^^^^^^^^^^^^^^^            -->[/color]+        <!--        ^^^^^^^^^^^^^^^^^^^^            -->
             <​en>​             <​en>​
                 <​![CDATA[Write something here!]]>                 <​![CDATA[Write something here!]]>
             </​en>​             </​en>​
         </​text>​         </​text>​
-        <text name="sampleModMap[color=blue]_NoDLC2_[/​color]BriefingText2">​ +        <text name="sampleModMap_NoDLC2_BriefingText2">​ 
-        [color=blue]<!--        ^^^^^^^^^^^^^^^^^^^^            -->[/color]+        <!--        ^^^^^^^^^^^^^^^^^^^^            -->
             <​en>​             <​en>​
                 <​![CDATA[Maybe also write something here too!]]>                 <​![CDATA[Maybe also write something here too!]]>
             </​en>​             </​en>​
         </​text>​         </​text>​
-        <text name="sampleModMap[color=blue]_NoDLC2_[/​color]BriefingText3">​ +        <text name="sampleModMap_NoDLC2_BriefingText3">​ 
-        [color=blue]<!--        ^^^^^^^^^^^^^^^^^^^^            -->[/color]+        <!--        ^^^^^^^^^^^^^^^^^^^^            -->
             <​en>​             <​en>​
                 <​![CDATA[And even some more, if you want!]]>                 <​![CDATA[And even some more, if you want!]]>
             </​en>​             </​en>​
-        </​text>​ +        </​text>​</code> 
-[/font]+ 
 + 
 +---- 
 + 
 + 
 +==== C - Changing map-script for With DLC2 ====
  
-[hr] 
  
-[b]C - [u]Changing map-script for WithDLC2[/​u][/​b] 
  
 C.1) With Notepad++ open the LUA-script file for WithDLC2; C.1) With Notepad++ open the LUA-script file for WithDLC2;
-[font=Courier New]+
     SampleModMap_WithDLC2.LUA     SampleModMap_WithDLC2.LUA
-[/font] 
  
-C.2) Do a search-replace,​ to change ​[i]all[/i] occurrences of [font=Courier New]SampleModMap[/​font] ​with [font=Courier New]SampleModMap_WithDLC2[/font]+ 
 +C.2) Do a search-replace,​ to change all occurrences of SampleModMap with SampleModMap_WithDLC2
  
 Example (excluded several lines for clarity): Example (excluded several lines for clarity):
- ​ Before:​[font=Courier New] + ​ Before:​ 
-    [color=gray]...[/color] +    <​code>​... 
-    [color=maroon]SampleModMap[/​color] ​= {}+    SampleModMap = {} 
 + 
 +    local SampleModMap_mt = Class(SampleModMap,​ Mission00);​ 
 + 
 +    function SampleModMap:​new(baseDirectory,​ customMt) 
 +    ...</​code>​
  
-    local [color=maroon]SampleModMap[/​color]_mt = Class([color=maroon]SampleModMap[/​color],​ Mission00);+ ​ After:​ 
 +    <​code>​... 
 +    SampleModMap_WithDLC2 ​{}
  
-    function [color=maroon]SampleModMap[/​color]:​new(baseDirectorycustomMt) +    local SampleModMap_WithDLC2_mt ​Class(SampleModMap_WithDLC2Mission00);
-    [color=gray]...[/​color] +
-[/font] +
- ​ After:​[font=Courier New] +
-    [color=gray]...[/​color] +
-    [color=blue]SampleModMap_WithDLC2[/​color] = {}+
  
-    local [color=blue]SampleModMap_WithDLC2[/color]_mt = Class([color=blue]SampleModMap_WithDLC2[/​color]Mission00);+    function ​SampleModMap_WithDLC2:new(baseDirectorycustomMt) 
 +    ...</​code>​
  
-    function [color=blue]SampleModMap_WithDLC2[/​color]:​new(baseDirectory,​ customMt) 
-    [color=gray]...[/​color] 
-[/font] 
  
-C.3) Copy these code lines here below and paste them into the LUA-script, just after the copyright notice and before the source-line containing the '[font=Courier New]SampleModMap_WithDLC2 = {}[/font]' line: +C.3) Copy these code lines here below and paste them into the LUA-script, just after the copyright notice and before the source-line containing the '​SampleModMap_WithDLC2 = {}' line: 
-[code]+<code>
 -- --
 -- Instead of using <​extraSourceFiles>​ in modDesc.XML,​ the needed DLC2Bga.lua script-file is inlined here. -- Instead of using <​extraSourceFiles>​ in modDesc.XML,​ the needed DLC2Bga.lua script-file is inlined here.
Line 316: Line 323:
 -- IMPORTANT!!                                                                      ^^^^^^^^^^^^ -- IMPORTANT!!                                                                      ^^^^^^^^^^^^
 -- --
-[/code]+</code>
  
  
-C.4) As you can see in what you just pasted into the LUA-script, ​[b]you must remember to change the folder-name[/b] to whatever you call your own map-folder or .ZIP file, [b]else it will not work correctly[/b].+C.4) As you can see in what you just pasted into the LUA-script, ​**you must remember to change the folder-name** to whatever you call your own map-folder or .ZIP file, else it will not work correctly.
  
  
-C.5) Remember to change the PDA map file-name too. You should be able to find it in the [font=Courier New]SampleModMap_WithDLC2:​load()[/​font] ​function; +C.5) Remember to change the PDA map file-name too. You should be able to find it in the SampleModMap_WithDLC2:​load() function; 
-[code]+<code>
     -- load the PDA map image     -- load the PDA map image
     self.missionPDA:​loadMap(Utils.getFilename("​map01/​pda_map_WithDLC2.png",​ self.baseDirectory));​     self.missionPDA:​loadMap(Utils.getFilename("​map01/​pda_map_WithDLC2.png",​ self.baseDirectory));​
Line 329: Line 336:
 -- NOTICE! The PDA map image has a different filename than normal. You can of cause replace it as you like. -- NOTICE! The PDA map image has a different filename than normal. You can of cause replace it as you like.
 -- --
-[/code]+</code>
  
-[hr] 
  
-[b]D - [u]Changing map-script for NoDLC2[/​u][/​b]+---- 
 + 
 + 
 +==== D - Changing map-script for No DLC2 ==== 
  
 D.1) With Notepad++ open the LUA-script file for NoDLC2; D.1) With Notepad++ open the LUA-script file for NoDLC2;
-[font=Courier New]+
     SampleModMap_NoDLC2.LUA     SampleModMap_NoDLC2.LUA
-[/font] 
  
-D.2) Do a search-replace,​ to change ​[i]all[/i] occurrences of [font=Courier New]SampleModMap[/​font] ​with [font=Courier New]SampleModMap_NoDLC2[/font]+ 
 +D.2) Do a search-replace,​ to change all occurrences of SampleModMap with SampleModMap_NoDLC2
  
 Example (excluded several lines for clarity): Example (excluded several lines for clarity):
- ​ Before:​[font=Courier New] + ​ Before:​ 
-    [color=gray]...[/color] +    <​code>​... 
-    [color=maroon]SampleModMap[/​color] ​= {}+    SampleModMap = {} 
 + 
 +    local SampleModMap_mt = Class(SampleModMap,​ Mission00);​ 
 + 
 +    function SampleModMap:​new(baseDirectory,​ customMt) 
 +    ...</​code>​
  
-    local [color=maroon]SampleModMap[/​color]_mt = Class([color=maroon]SampleModMap[/​color],​ Mission00);+ ​ After:​ 
 +    <​code>​... 
 +    SampleModMap_NoDLC2 ​{}
  
-    function [color=maroon]SampleModMap[/​color]:​new(baseDirectorycustomMt) +    local SampleModMap_NoDLC2_mt ​Class(SampleModMap_NoDLC2Mission00);
-    [color=gray]...[/​color] +
-[/font] +
- ​ After:​[font=Courier New] +
-    [color=gray]...[/​color] +
-    [color=blue]SampleModMap_NoDLC2[/​color] = {}+
  
-    local [color=blue]SampleModMap_NoDLC2[/color]_mt = Class([color=blue]SampleModMap_NoDLC2[/​color]Mission00);+    function ​SampleModMap_NoDLC2:new(baseDirectorycustomMt) 
 +    ...</​code>​
  
-    function [color=blue]SampleModMap_NoDLC2[/​color]:​new(baseDirectory,​ customMt) 
-    [color=gray]...[/​color] 
-[/font] 
  
-D.3) Copy these code lines here below and paste them into the LUA-script, just after the copyright notice and before the source-line containing the '[font=Courier New]SampleModMap_NoDLC2 = {}[/font]' line: +D.3) Copy these code lines here below and paste them into the LUA-script, just after the copyright notice and before the source-line containing the '​SampleModMap_NoDLC2 = {}' line: 
-[code]+<code>
 -- --
 -- --
Line 377: Line 387:
 -- --
 -- --
-[/code]+</code>
  
  
-D.4) Remember to change the PDA map file-name too. You should be able to find it in the [font=Courier New]SampleModMap_NoDLC2:​load()[/​font] ​function; +D.4) Remember to change the PDA map file-name too. You should be able to find it in the SampleModMap_NoDLC2:​load() function; 
-[code]+<code>
     -- load the PDA map image     -- load the PDA map image
     self.missionPDA:​loadMap(Utils.getFilename("​map01/​pda_map_NoDLC2.png",​ self.baseDirectory));​     self.missionPDA:​loadMap(Utils.getFilename("​map01/​pda_map_NoDLC2.png",​ self.baseDirectory));​
Line 387: Line 397:
 -- NOTICE! The PDA map image has a different filename than normal. You can of cause replace it as you like. -- NOTICE! The PDA map image has a different filename than normal. You can of cause replace it as you like.
 -- --
-[/code]+</code>