Worlds map.inf Guide

by Wirlaburla

Worlds map.inf files are simple text-based configuration files for the worlds map data. They control and tell the client about where buttons are and where they go. Map files always start with the worlds name, followed by a '-map.inf'.

The workings of a map file.

Let's look at an already existing file. We'll do GroundZero.

groundzero-map.inf

8
        120 0 38 34 Home -world:
        120 80 38 35 Worlds_Club -home:AnimalHouse/AHclub.world#CLUB@507.0,699.0,150.0,49.0,0.0,0.0,-1.0
        52 0 56 21 Worlds_Center -home:WorldsChat/hub22.world#hub_center@1837.0,1838.0,150.0,0.0,0.0,0.0,-1.0
        0 0 42 33 Avatar_Gallery -home:AvatarGallery/avatar.world#AVATARgallery@114.0,110.0,150.0,86.0,0.0,0.0,-1.0
        120 38 38 38 Hang -home:lets/lets.world#Hub@-88.0,712.0,150.0,138.0,0.0,0.0,-1.0
        0 75 31 36 Chat_Deck -home:WorldsChat/hubtoo.world#hupns@22.0,-39.0,150.0,321.0,0.0,0.0,-1.0
        47 99 68 25 Animal_House -home:/AnimalHouse/AnimalHouse.world#FrontYard@191.0,173.0,150.0,45.0,0.0,0.0,-1.0
        0 37 39 24 Meteor -home:Meteor/meteor.world#meteor01@1001.0,2659.0,150.0,165.0,0.0,0.0,-1.0
        

The first line is the number of buttons or locations there are. The map file will stop reading after 9 lines (One for the number line plus the number it defines).

Now, we get to the important button parts. We have 8 lines in this file, and we are going to look at one. We'll use the 'Worlds Club' line.

120 80 38 35 Worlds_Club -home:AnimalHouse/AHclub.world#CLUB@507.0,699.0,150.0,49.0,0.0,0.0,-1.0
        

The first two numbers, 120 and 80 are position values X and Y. Worlds map files will have these in the top left corner of the entire element, and all units are in pixels.

38 and 35 are size values, and will be the amount of pixels on the X and Y axis that are expanded from it's position. That means that the button is 38 pixels tall and 35 pixels long.

Worlds_Club is the name of the button. This appears near the map on the clients bar when hovering. Underscores (_) are whitespace, so the name for this button will show up as "Worlds Club".

The next is the link, which is usually how any traditional location mark it. It can be to a location, another world, another room, etc. The dash - before the link is required!

Now, let's take a look at it's image file named the name thing but with the gif extension instead of inf.

This image is divided into 4 sections of 158x124 sized images. The first is only used for pre-loads and if an error occurs on loading the rest. The second is the main image, being the one completely shown in the map. The third is for hover action, only parts with buttons set will show on this one and the next. The fourth is clicked, which appears when a button is clicked.