Difference between revisions of "Mapcycle.cfg"

From King Arthur's Gold Wiki
Jump to: navigation, search
m (syntaxhighlight)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Often loaded by the [[dedicated_autostart.gm]] file, this script creates the array "mapcycle" with the cycle of maps, separated by semicolons (;).
+
Often loaded by the [[autoconfig.cfg]] file, this script creates the array "mapcycle" with the cycle of maps, separated by semicolons (;).
  
<syntaxhighlight lang="ini" enclose="div">
+
Here an example of loading a few maps:
mapcycle = Rules/CTF/Maps/mapname.png;
+
 
 +
<syntaxhighlight lang="actionscript" enclose="div">
 +
mapcycle = Maps/WAR/DaviesPlains.png; Maps/WAR/Juggernaut.png; Maps/WAR/MurkshireHills.png;
 
</syntaxhighlight>
 
</syntaxhighlight>
  
It is noteworthy that maps here can be either PNG's (.png), KAG (.kag) files, or gamemonkey scripts (.gm) files. Using a .gm file will allow you to run specific scripts prior to loading the map and during gameplay; however, you will need to call LoadMap in the .gm file. KAG map files will allow you to save entities such as rooms, lanterns, and other items not saveable by the png format.
+
It is noteworthy that maps here can be either PNG's (.png), KAG (.kag) or Generator (.cfg) files. KAG map files will allow you to save 'happenings' not saveable by the png format (mainly exact locations of things and how broken a block is). Generator files will allow you to create maps that look fairly similar, but are different every time since noise is used to create them.
 +
 
 +
For example, a Map cycle with two maps that are initialized in .kag files would look like this:
 +
 
 +
<syntaxhighlight lang="actionscript" enclose="div">
 +
mapcycle = Rules/WAR/Maps/mapname.kag; Rules/WAR/Maps/nameofmap.kag;
 +
</syntaxhighlight>
 +
 
 +
On the other hand, a Map Cycle that uses a generator file will look like this:
 +
 
 +
<syntaxhighlight lang="actionscript" enclose="div">
 +
mapcycle = Maps/test.kaggen.cfg;
 +
</syntaxhighlight>
 +
 
 +
<p>When loading maps, the game starts looking from <code>kagServer/Base</code>. If a map is not located located in the Base folder, then you will need to add directory for where the map is located before the file itself. For organizational purposes, it is recommended to create any subfolders (as needed) in the <code>kagServer/Base/Maps</code> directory rather than leaving map files in the base folder or Maps folder (especially if you are running multiple servers on the same machine)</p>
 +
<p>You may use a mixture of PNGS, KAG or Generator files, but make sure that you use the correct extension of the file when listing it. If the extension is not correct, it will not find it nor load it.</p>
 +
<p>If a file can not be found, it will skip onto the next file that it can find. If none of the files can be found, it will load the default generator.</p>
 +
= See also =
 +
* [[autoconfig.cfg]]
 +
* [[kaggen.cfg]]
 +
* [[map game files]]
 +
 
 +
[[Category:Modding]]

Latest revision as of 15:24, 9 November 2013

Often loaded by the autoconfig.cfg file, this script creates the array "mapcycle" with the cycle of maps, separated by semicolons (;).

Here an example of loading a few maps:

mapcycle = Maps/WAR/DaviesPlains.png; Maps/WAR/Juggernaut.png; Maps/WAR/MurkshireHills.png;

It is noteworthy that maps here can be either PNG's (.png), KAG (.kag) or Generator (.cfg) files. KAG map files will allow you to save 'happenings' not saveable by the png format (mainly exact locations of things and how broken a block is). Generator files will allow you to create maps that look fairly similar, but are different every time since noise is used to create them.

For example, a Map cycle with two maps that are initialized in .kag files would look like this:

mapcycle = Rules/WAR/Maps/mapname.kag; Rules/WAR/Maps/nameofmap.kag;

On the other hand, a Map Cycle that uses a generator file will look like this:

mapcycle = Maps/test.kaggen.cfg;

When loading maps, the game starts looking from kagServer/Base. If a map is not located located in the Base folder, then you will need to add directory for where the map is located before the file itself. For organizational purposes, it is recommended to create any subfolders (as needed) in the kagServer/Base/Maps directory rather than leaving map files in the base folder or Maps folder (especially if you are running multiple servers on the same machine)

You may use a mixture of PNGS, KAG or Generator files, but make sure that you use the correct extension of the file when listing it. If the extension is not correct, it will not find it nor load it.

If a file can not be found, it will skip onto the next file that it can find. If none of the files can be found, it will load the default generator.

See also