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:11]
jdmfarms
2n1map [2017/05/24 14:27] (current)
Line 26: Line 26:
  
  
-__**A - Preparing Asset Files**__+==== A - Preparing Asset Files ==== 
  
 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; 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;
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\\
  
  
Line 105: 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\\
  
  
  
 ---- ----
-**__B - Modifying modDesc.XML__**+ 
 + 
 +==== B - Modifying modDesc.XML ==== 
  
 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: 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:
  
-'' ​   <​extraSourceFiles>​+<​code> ​   <​extraSourceFiles>​
 !--    <​sourceFile filename="​giantsLS11DLC2SDK/​DLC2Bga.lua"/>​ --> !--    <​sourceFile filename="​giantsLS11DLC2SDK/​DLC2Bga.lua"/>​ -->
-    </​extraSourceFiles>​''​+    </​extraSourceFiles>​</​code>​
  
  
Line 126: Line 130:
 Example (excluded some lines for clarity): Example (excluded some lines for clarity):
  
- ​  ​''​<​maps>​+ ​  ​<​code>​<​maps>​
  
      <!-- WithDLC2 -->      <!-- WithDLC2 -->
Line 138: Line 142:
        </​map>​        </​map>​
  
-   </​maps>​''​+   </​maps>​</​code>​
  
  
Line 145: Line 149:
 Example (excluded some lines for clarity): Example (excluded some lines for clarity):
  
-'' ​   <​l10n>​+<​code> ​   <​l10n>​
  
       <!-- WithDLC2 -->       <!-- WithDLC2 -->
Line 169: Line 173:
         </​text>​         </​text>​
  
-    </​l10n>​''​+    </​l10n>​</​code>​
  
  
Line 178: Line 182:
 Example (lines wrapped for clarity): Example (lines wrapped for clarity):
  
-'' ​   <!-- WithDLC2 -->+<​code> ​   <!-- WithDLC2 -->
     <map id="​SampleModMap_WithDLC2"​     <map id="​SampleModMap_WithDLC2"​
          className="​SampleModMap_WithDLC2"​          className="​SampleModMap_WithDLC2"​
Line 193: 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>​
  
-    </​map>​''​+    </​map>​</​code>​
  
  
Line 206: Line 210:
 Example: Example:
  
-'' ​     <!-- WithDLC2 -->+<​code> ​     <!-- WithDLC2 -->
         <text name="​sampleModMap_WithDLC2_BriefingText1">​         <text name="​sampleModMap_WithDLC2_BriefingText1">​
         <!--        ^^^^^^^^^^^^^^^^^^^^^^            -->         <!--        ^^^^^^^^^^^^^^^^^^^^^^            -->
Line 213: Line 217:
             </​en>​             </​en>​
         </​text>​         </​text>​
-        <text name="sampleModMap[color=blue]_WithDLC2_[/​color]BriefingText2">+        <text name="sampleModMap_WithDLC2_BriefingText2">
         <!--        ^^^^^^^^^^^^^^^^^^^^^^            -->         <!--        ^^^^^^^^^^^^^^^^^^^^^^            -->
             <​en>​             <​en>​
Line 224: Line 228:
                 <​![CDATA[And even some more, if you want!]]>                 <​![CDATA[And even some more, if you want!]]>
             </​en>​             </​en>​
-        </​text>​''​+        </​text>​</​code>​
  
  
Line 231: Line 235:
 Example (lines wrapped for clarity): Example (lines wrapped for clarity):
  
-'' ​  <!-- NoDLC2 -->+<​code> ​  <!-- NoDLC2 -->
     <map id="​SampleModMap_NoDLC2"​     <map id="​SampleModMap_NoDLC2"​
          className="​SampleModMap_NoDLC2"​          className="​SampleModMap_NoDLC2"​
Line 250: Line 254:
         <​iconFilename>​map01/​map_preview_NoDLC2.DDS</​iconFilename>​         <​iconFilename>​map01/​map_preview_NoDLC2.DDS</​iconFilename>​
  
-    </​map>​''​+    </​map>​</​code>​
  
 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 ​[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 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>