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 19:37]
jdmfarms
2n1map [2017/05/24 14:27] (current)
Line 67: 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\\
  
  
Line 106: Line 106:
 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\\
  
  
Line 197: Line 197:
                  
         <​briefingImagePrefix>​sampleModMap_WithDLC2</​briefingImagePrefix>​         <​briefingImagePrefix>​sampleModMap_WithDLC2</​briefingImagePrefix>​
-        <​briefingTextPrefix>​sampleModMap[color=blue]_WithDLC2_</​briefingTextPrefix>​+        <​briefingTextPrefix>​sampleModMap_WithDLC2_</​briefingTextPrefix>​
         <!--                ^^^^^^^^^^^^^^^^^^^^^^                  -->         <!--                ^^^^^^^^^^^^^^^^^^^^^^                  -->
         <​iconFilename>​map01/​map_preview_WithDLC2.DDS</​iconFilename>​         <​iconFilename>​map01/​map_preview_WithDLC2.DDS</​iconFilename>​
Line 217: Line 217:
             </​en>​             </​en>​
         </​text>​         </​text>​
-        <text name="sampleModMap[color=blue]_WithDLC2_[/​color]BriefingText2">+        <text name="sampleModMap_WithDLC2_BriefingText2">
         <!--        ^^^^^^^^^^^^^^^^^^^^^^            -->         <!--        ^^^^^^^^^^^^^^^^^^^^^^            -->
             <​en>​             <​en>​
Line 271: Line 271:
             </​en>​             </​en>​
         </​text>​         </​text>​
-        <text name="sampleModMap[color=blue]_NoDLC2_[/​color]BriefingText3">+        <text name="sampleModMap_NoDLC2_BriefingText3">
         <!--        ^^^^^^^^^^^^^^^^^^^^            -->         <!--        ^^^^^^^^^^^^^^^^^^^^            -->
             <​en>​             <​en>​
Line 282: Line 282:
  
  
-== C - Changing map-script for WithDLC2 ​==+==== C - Changing map-script for With DLC2 ==== 
  
  
Line 290: Line 291:
  
  
-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 ​[color=maroon]SampleModMap[/​color]_mt ​= Class([color=maroon]SampleModMap[/color], Mission00);+    local ​SampleModMap_mt ​= Class(SampleModMap,​ Mission00);
  
-    function ​[color=maroon]SampleModMap[/color]:​new(baseDirectory,​ customMt) +    function SampleModMap:​new(baseDirectory,​ customMt) 
-    [color=gray]...[/color] +    ...</code>
-[/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);+ ​ After:​ 
 +    <​code>​... 
 +    SampleModMap_WithDLC2 = {}
  
-    function [color=blue]SampleModMap_WithDLC2[/​color]:​new(baseDirectorycustomMt) +    local SampleModMap_WithDLC2_mt ​Class(SampleModMap_WithDLC2, ​Mission00);
-    [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: +    function SampleModMap_WithDLC2:​new(baseDirectory,​ customMt) 
-[code]+    ...</​code>​ 
 + 
 + 
 +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>
 -- --
 -- 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 322: 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 335: 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 383: 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 393: 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>