Alright, I've seen this question asked a lot. I think it would be a great help for everyone and worth my time to write up a proper tutorial on MapInfo. Since Music is so closely related to MAPINFO, I'll also have a section for custom music and how to make it work in your maps.
Section 1: Making maps work in Zandronum
What is MAPINFO?
MapInfo by the text book definition, is how Zandronum and other ZDoom daughter ports define special characteristics for maps. This could be simple map by map episodes, what music plays in what level, how to make a hub, etc.
For what the majority of you readers, it's how to make your maps work properly in Megaman 8 Bit Deathmatch and what music plays.
Why do I need MAPINFO?
You need it to make your maps work! Without it you have no music, air control is doom's default, your map won't appear anywhere, you'll only be able to get to it by warping there. It's just not useful for online play. So all we do is add MAPINFO and bam, it works.
How do I use MAPINFO? In Theory
To make use of MAPINFO you'll need two things.
First off, MAPINFO is simply a .txt file inserted inside a .pk3 or inside the map.wad itself. The purpose of MapInfo as stated above is to make the map Zandronum friendly and to have music on your map.
How to use MAPINFO Practically
This is the method used by MM8BDM, and common to other mapmakers such as myself. To use this method, you will be making use of a master .pk3 file most likely. At the minimum, all this will contain is a few imported maps. For best results, ensure that the file name of the map.wad is the level code. In my I-Packs case, IDM##. That would be it. Inside each map.wad you will have make a blank lump. This lump will be named MAPINFO.
Below is the MAPINFO from IDM01 - Sand Canyon of the IX-Pack with comments explaining each part.
map IDM01 "Sand Canyon" //Level Code as you made it in Doom Builder and the "map name". The map name can be anything, it doesn't matter. The Level Code HAS to match the one you used for your map.
{
next = "IDM02" //next map in the default rotation.
sky1 = "BLACK", 0 //in case you don't have a skybox, the sky won't be a glitchy mess and instead be the black texture. This can be changed to other textures, like elecman's sky and so forth. If you intend to have something more complex then a simple texture, you'll want a Skybox.
cluster = 1 //Leave it alone, don't delete it, don't change the number.
music = "IDMMUS1" //Music file name. This should match what you named the music (to be explained later).
aircontrol = 0.5 //Leave it alone.
forcenoskystretch //Leave it alone.
clipmidtextures //Leave it alone.
}
This is just for IDM01 - Sand Canyon. Each entry, IDM02, IDM03, etc. would have it's own map info.
It's pretty simple. For a visual reference, it should look something like this.
(http://i628.photobucket.com/albums/uu9/YoukaiOfFlowers/Doom/MAPINFOtutorial/MAPINFOTUTORIAL1.png)
Below is a MAPINFO Template for your convenience. Anything in all caps is meant to be changed.
map LEVELCODE "MAPNAME"
{
next = "LEVELCODEFORNEXTMAP"
sky1 = "BLACK", 0
cluster = 1
music = "MUSICLUMPNAME"
aircontrol = 0.5
forcenoskystretch
clipmidtextures
}
Section 2: Music
How do I add custom music to my map?
This is pretty simple, first we'll start off with the music itself. Assuming you have the song you want, how do you make it work?
First off, you'll need to use a program such as audacity (http://audacity.sourceforge.net/) to convert it a .ogg format. MP3's work as well, but .ogg's have excellent quality and the most minimal file size possible. It is important to ensure the lump name is UNDER 8 CHARACTERS.
Once you have your music as a .ogg, you'll need to insert it into .wad or .pk3. Two possible methods include.
Method 1 is to simply make a folder titled music in your root .pk3 and import the songs into it.
(http://i628.photobucket.com/albums/uu9/YoukaiOfFlowers/Doom/MAPINFOtutorial/MAPINFOTUTORIAL3.png)
Method 2 is to make a separate wad and import the songs into it, then import the music.wad file into the .pk3.
(http://i628.photobucket.com/albums/uu9/YoukaiOfFlowers/Doom/MAPINFOtutorial/MAPINFOTUTORIAL2.png)Note: You DO NOTrequire the headings I have. I just like making things efficient.
How do I make it work with my maps?
With the above done, remember how in the above section we had the music = MAPLUMPNAME? Well here all we're doing is putting in the lump name.
music = "IDMMUS1"
Easy huh? That's all there is to it.
Section 3: Other
So to wrap this up, if you follow my tutorial, you'll be getting your custom map packs working, complete with custom music. Now there are other possible methods for using MAPINFO and far more options. I've only detailed what it is needed to make a MM8BDM map work. For more information, check out the ZDoom Wiki article.
http://zdoom.org/wiki/MAPINFO
Good Luck future mappers.
A lot of custom map packs use some variation on this script for non objective-focused maps:
// This entire paste file is plug-and-go. Just copy everything below these comments
// replace BOSSMUS and VICMUS with the song file names of your choice.
str BOSSSONG = "BOSSMUS";
str VICSONG = "VICMUS";
int bossMusic = 0;
script 25 DEATH
{
Delay(1);
int musiccheck = ACS_ExecuteWithResult(972);
if(bossmusic!=musiccheck)
{
bossmusic=musiccheck;
if(bossmusic==1)
{
SetMusic(BOSSSONG);
}
if(bossmusic==2)
{
SetMusic(VICSONG);
}
}
}
script 26 (int who) DISCONNECT
{
ACS_Execute(25, 0);
}
Just copy-paste that into the scripts of your map, change the song titles, make sure there's a line that says #include "zcommon.acs" and compile.
I replaced the Bossmus with "MM7FBOS" but sends me an error
"mm7fbos: identifier has not been declared." | SCRIPTS (line 27)
#include "zcommon.acs"
Script 1 Enter
{
if(GetCvar("duel")==1){terminate;}
if(PlayerFrags() == GetCVar("fraglimit") - 5){
SetMusic("MM7FBOS",0);
terminate;
}
Delay(1);
restart;
}
str BOSSSONG = "MM7FBOS";
str VICSONG = "VICMUS";
int bossMusic = 0;
script 2 DEATH
{
Delay(1);
int musiccheck = ACS_ExecuteWithResult(972);
if(bossmusic!=musiccheck)
{
bossmusic=musiccheck;
if(bossmusic==1)
{
SetMusic(MM7FBOS);
}
if(bossmusic==2)
{
SetMusic(VICSONG);
}
}
}
script 3 (int who) DISCONNECT
{
ACS_Execute(25, 0);
}
First, remove script 1
Second, BOSSSONG and VICSONG were supposed to stay as those two names.
Third, the script numbers were set up to be plug and play. There was no need to change them. Script 3 should be calling ACS_Execute(2, 0) if you're going to use those numbers.
The resulting scripts should look like:
The script should look like:
#include "zcommon.acs"
str BOSSSONG = "MM7FBOS";
str VICSONG = "MM4VIC"; // This should be some existing song
int bossMusic = 0;
script 2 DEATH
{
Delay(1);
int musiccheck = ACS_ExecuteWithResult(972);
if(bossmusic!=musiccheck)
{
bossmusic=musiccheck;
if(bossmusic==1)
{
SetMusic(BOSSSONG); // This should stay as BOSSSONG
}
if(bossmusic==2)
{
SetMusic(VICSONG);
}
}
}
script 3 (int who) DISCONNECT
{
ACS_Execute(2, 0);
}
Thank you! Now the map it works as it should
#include "zcommon.acs"
str BOSSSONG = "MM7FBOS";
str VICSONG = "MM4VIC";
int bossMusic = 0;
script 1 DEATH
{
Delay(1);
int musiccheck = ACS_ExecuteWithResult(972);
if(bossmusic!=musiccheck)
{
bossmusic=musiccheck;
if(bossmusic==1)
{
SetMusic(BOSSSONG);
}
if(bossmusic==2)
{
SetMusic(VICSONG);
}
}
}
script 2 (int who) DISCONNECT
{
ACS_Execute(1, 0);
}
Script 3 Enter
{
if(GetCvar("duel")==1){terminate;}
if(PlayerFrags() == GetCVar("fraglimit") - 5){
SetMusic("MM7FBOS",0);
terminate;
}
Delay(1);
restart;
}
^ The script if you wanna see ^