GTAMP.com

Grand Theft Auto Media Press
It is currently Tue Jun 18, 2013 7:24 am

All times are UTC




Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: The .mmp file standard
PostPosted: Mon Aug 02, 2010 8:49 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
Since, thanks to Vike, it is no longer required to have 6 .mmp files there is, in my opinion, a great opportunity to use
the mmp file as central storage point for all types of information about a map.
-It is easily expandable
-It is the only gta file that can be opened with a normal text editor
-It is already there
Maps with multiple scr files can also be made to work with only one scr: Keep the one with the biggest playercount and if your script crashes with different player counts use "IF (CHECK_CHARACTER_HEALTH(p1, 0))" for every command that has to do with that player.

At the moment there are 2 new entries available: GCIFile & GXTFile, added with vike's modification. I think there can be stored more information.
Edit: http://gta2dare.omnitude.net/maplist/list.php supports most of them already and TM is planing to add compatibility to many of them too in his editor.
I'm posting a suggestion here. This is primary not about if applications should implement features that use these entries. It's only about, if when they can become useful at some time, how the information should be organized into which entries. I'm going to store information about my maps there anyway instead of a readme file. I just thought it would be good if standards are discussed now. Then everyone who wants can write down information now and when a feature get implemented there is no need to update the map. That would also reduce the chicken or the egg problem with features.

Here the current suggestion-example (this is not the actual .mmp file of this map but the original would not have had all entries):
Quote:
[MapFiles]
GMPFile = rocha.gmp

STYFile = rocha.sty

SCRFile = rocha.scr

Description = Rocket Chamber

;PlayerCount = 1

GXTFile = rocha_en.gxt

GCIFile = rocha.gci

RAWFile = Audio/rocha.raw
;.sdt has always the same filename
;default: basename(STYFile).raw ;if not existent, the default vike set gta to use. (bil,ste,wil)

BaseRAW = Audio/rocha
;the base filename for multilanguage support. eg: rocha_de.raw would be german rocha_es.raw would be spanish

BaseGXT = rocha
;the base filename for multilanguage support. eg: rocha_de.gxt would be german rocha_es.gxt would be spanish

Vocals = Audio/vocals
;folder for alternative vocal .wav files

BaseVocals = Audio/vocals
;the base foldername for multilanguage support. eg: Audio/rocha_de would be german Audio/rocha_es would be spanish

[MMP]
MMPVersion = 3
;version numbering of the mmp file standard, if something changes later

[Map]
UpDate = 2010-08-01
;YYYY-MM-DD

CreaDate = 2010-08-01
;YYYY-MM-DD

LongDesc = A small rocket arena themed like the game Portal. No cake for you ;)

LongDesc-abc = Longdesc in abc language

Tags[] = arena
Tags[] = themed
;categories which the map belongs to
;discussion about which categories to use: viewtopic.php?f=4&t=117

Weapons[] = Rocket Launcher
;list of all occuring weapons and items on the map. not sure if short versions would be better than complete names

GTA2Version = 11.39
;GTA 2 version which is required to play this map

Author = elypter
;multiple authors can be added by writing instead:
;Author[]= elypter
;Author[]= lorne

Readme = rocket_chamber_readme.txt
;standard readme file

Readme-abc = rocket_chamber_replacewithlanguage.txt

Homepage = http://gta2dare.tk
;homepage or e-mail (starts with mailto://)

Fetch = http://elypter.net84.net/gta2.tk/maps/rocha.7z
;url where the map can be downloaded or updated

UpdateCheck = http://elypter.net84.net/gta2.tk/maps/update.ini
;url where it could be checked if an update is required

DuskSupport = false
;are there lights on the map

WantedLevel = 0
;can be "X" or "X-Y"

MapArea = 60 60 233 233
;visible Region x1 y1 x2 y2
;0 0 0 0 will disable the maparea functionality

PlayArea = 80 160 200 224
;playable Region x1 y1 x2 y2

Images[] = rocha_screenshot1.jpg
Images[] = rocha_screenshot2.jpg
;additional images of the map. The first is the default image.

Video = http://www.youtube.com/watch?v=NzCme0ISbFE
;links to ingame videos of the map for example on youtube.
;multiple videos can be added by writing instead:
;Video[] = http://www.youtube.com/watch?v=NzCme0ISbFE
;Video[] = http://www.youtube.com/watch?v=NzCme0ISbFE

[Host]
;suggested default settings for hosting this map (if an entry is not used settings stay untouched) (same variables as in registry)

game_type = frag
;frag|tag|point

game_time_limit = 0
;0-60

;game_speed = 1
;0-2

f_limit = 10
;0-99

police = false
;true|false


[Client]
;settings that are suggested for the game(but cannot be forced by host) (same variables as in registry)

show_player_names = true
;true|false

lighting = noon
;noon|dusk

;text_speed = 5
;1-5 1 is fastest, 5 is slowest
;not sure if to put in. it depends on the length of messages but also on the actual gamespeed.


Status of usage
<11.3beta1 - required
>11.3beta1 - required if those files are used
Out of Use
In use by Other Applications - optional
Read by Map List - optional

General Policy
-None of the variables is required or should be required by any application if it is not essential but "MMPVersion = 3" is highly recommended if you use one of the new features
-Variables should not force how a map is being treated. (neither "lighting" or "DuskSupport" should not force the host to use these settings)

Multilanguage
language codes should follow this standard:
http://en.wikipedia.org/wiki/IETF_language_tag

Areas
maparea: the area that is being edited, coordinates for edge repetition (TradeMarks Editor). (also screenshot)
playarea: the area where you can run or drive around or be shot by a rocket. (also screenshot)

on most maps the map area is just a bit larger than the play area. But there are some map makers that write their names on the map eg: bernaar's race or cut an arena map out of a bigger map but keep a relatively large area eg: multislayer cage.
Playarea could be used for sorting by map size or as an alternative screenshot area if you want an image that shows the place of action more detailed.

Packaging
The map or maps should be distributed in a single .zip .7z or .rar archive. The map files should be in the root folder of the archive.(map.7z/ == %ProgramFiles%\gta2\data\)

Implicit values
basename(GMPFile).jpg : preview image
basename(SCRFile).mis : not compiled mission script

basename(SCRFile).tmp: compiler temp file (deletable)
basename(SCRFile).txt: compiler temp file (deletable)
basename(GMPFile).\d\d\d: editor backup file (eg: rocha.001) (deletable)
basename(GMPFile).auto: editor backup file (deletable)

_________________
yur sa'nok ngeyä


Last edited by elypter on Sun Aug 28, 2011 12:57 pm, edited 49 times in total.

Top
 Profile  
 
PostPosted: Mon Aug 02, 2010 10:05 pm 
Offline
Janitor
User avatar

Joined: Wed Apr 01, 2009 8:38 pm
Posts: 142
I like and support this, keeping to a standard.

A few points:
1- When specifying a date, stick to the YYYY-MM-DD format.
2- A mmp should never be able to really force us to use a specific setting. If I want dusk I should be able to play dusk, even if the ambient is too low or whatever other reason there might be, without having to dick around in the mmp file. They should be guidelines only.
3- I don't see how "gtaversion" could be useful, since the new gta2 rip will only include vike's one. Including the old versions causes a big mess with the noobs, and I haven't read a single complaint about someone wanting to use 9.6f, for example, in stead of vike's newest. It's only one line of text, so although I don't care much about keeping or deleting it, it should absolutely not force anyone to use that version, just serve as a suggestion.
4- mmp files should not include any special characters.
5- Tags should either all be lowercase, or follow an easy to remember capitalization style. I'm for the former, since anything other than all lowercase (or all uppercase) is not easy to remember. Even your own example is inconsistent.
6- The "network gta2" window could use a new "dusk/noon" button. I know it's in GH, but imho it would belong better in "network gta2". I believe it would integrate better with the mmp suggestions.

I vaguely see myself, in the not too near future, making a small application for updating local maps and getting new ones, as well as gta2.exe versions and whatever else. This will require a standard too, and this mmp idea is as good as any.


Top
 Profile  
 
PostPosted: Tue Aug 03, 2010 12:16 am 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
1 Changed it
2 These are all only meant as suggested settings. But it's good to point this out.
3 Eg: This map works only with 11.39 because there is only one .mmp .Ok this could also be determined by the missing "PlayerCount". But in future and without a completely updated gh this might be useful. Imagine: A map uses a scripting function that crashed gta in earlier versions but was fixed by vike. Anyway the should only display a warning.
4 True
5 i also prefer lower case but the first entries were already mixed case (made them at least consistent)
6 True

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Tue Aug 03, 2010 12:47 am 
Offline
Lunatic

Joined: Sat Jul 19, 2008 2:14 pm
Posts: 421
Location: Poland / Szczecin
Quote:
2- A mmp should never be able to really force us to use a specific setting. If I want dusk I should be able to play dusk, even if the ambient is too low or whatever other reason there might be, without having to dick around in the mmp file. They should be guidelines only.
But if i want to create hide and seek map then i have to force night mode :D cose some players can/like cheat


Top
 Profile  
 
PostPosted: Tue Aug 03, 2010 2:29 am 
Offline
Boss
User avatar

Joined: Tue Mar 04, 2008 6:51 am
Posts: 984
Location: GTAMP.com
MMP files are a good place to store map information.

Depricated should be spelled Deprecated.

GTA2 stores settings in the registry with these names:

game_type
game_time_limit
game_speed
f_limit
show_player_names
police

For consistency, the MMP file should probably use the same names.


Top
 Profile  
 
PostPosted: Tue Aug 03, 2010 2:32 am 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
Razor wrote:
Quote:
2- A mmp should never be able to really force us to use a specific setting. If I want dusk I should be able to play dusk, even if the ambient is too low or whatever other reason there might be, without having to dick around in the mmp file. They should be guidelines only.
But if i want to create hide and seek map then i have to force night mode :D cose some players can/like cheat

The problem is: It is impossible to force it since you could change the settings back before the game starts, or use a registry blocker.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Tue Aug 03, 2010 7:47 am 
Offline
Hitman
User avatar

Joined: Sun Feb 28, 2010 10:34 pm
Posts: 129
Just a quick note to say that with the suggested improvements I totally agree with this stuff. And if we need to I can add some "forced" requirements to GTA2, I just also think we should have the option of preferred settings.

I'll comment on the Slony/elypter BATTLE (BATTLE) a bit later.


Top
 Profile  
 
PostPosted: Tue Aug 03, 2010 12:09 pm 
Offline
Hitman
User avatar

Joined: Sun Feb 28, 2010 10:34 pm
Posts: 129
3 Yeah keep it definitely but don't make it compulsory.
4 I guess that limits them to ASCII, the original 7-bit stuff and definitely not the extended because in this forum alone we have many different versions of the extended ASCII.
5 We'd need a central repository to keep the list of tags. People always bugger this stuff up when they enter it manually, and then it doesn't work because you can't use a machine to filter it which is the whole point. Personally I would like to see a simple MMP tool, with a drop-down system, and with the list of categories/mmp-spec periodically updated when someone makes a genuinely new sort of map (it does still happen).
6 Yeah I know shut up :P


Also, only use windows INI style comments: the semicolon (";" character).


Top
 Profile  
 
PostPosted: Tue Aug 03, 2010 1:22 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
Sektor wrote:
MMP files are a good place to store map information.

Depricated should be spelled Deprecated.

GTA2 stores settings in the registry with these names:

game_type
game_time_limit
game_speed
f_limit
show_player_names
police

For consistency, the MMP file should probably use the same names.


changed it

Vike the Hube wrote:
5 We'd need a central repository to keep the list of tags. People always bugger this stuff up when they enter it manually, and then it doesn't work because you can't use a machine to filter it which is the whole point. Personally I would like to see a simple MMP tool, with a drop-down system, and with the list of categories/mmp-spec periodically updated when someone makes a genuinely new sort of map (it does still happen).

it would be nice to have a tool where you can enter all this stuff and then packages all files and loads them up somewhere via ftp.
I think that is a good place to discuss categories: viewtopic.php?f=4&t=117

Vike the Hube wrote:
Also, only use windows INI style comments: the semicolon (";" character).

The example should now be a valid ini & mmp file

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Thu Aug 05, 2010 1:02 am 
Offline
Hitman
User avatar

Joined: Sun Feb 28, 2010 10:34 pm
Posts: 129
Quote:
Depricated should be spelled Deprecated.

This one isn't fixed yet ;)

Quote:
it would be nice to have a tool where you can enter all this stuff and then packages all files and loads them up somewhere via ftp.
I think that is a good place to discuss categories: viewtopic.php?f=4&t=117

Definitely. I would also prefer that the update URLs referenced a central repository run by someone reliable, e.g. Sektor :lol:

But besides that looks like I have some work to do implementing a few more items directly in GTA2 soon :)


Top
 Profile  
 
PostPosted: Thu Aug 05, 2010 1:58 am 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
Vike the Hube wrote:
Quote:
Depricated should be spelled Deprecated.

This one isn't fixed yet ;)

fixed now

Also changed
RAWFile = rocha.raw to RAWFile = Audio/rocha.raw
and
Vocals = vocals to Vocals = Audio/vocals

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Thu Aug 05, 2010 11:53 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
i checked some things.

gta is able to handle:
at least 64000 characters per line
at least 64000 lines
comments when the line starts with ";"
utf8 without bom
ucs2 little endian
ansi
windows, unix & mac newlines
multiple entries (the first one gets chosen)

gta is not able to handle:
utf8 with bom
ucs2 big endian

I think that is more than we need :)

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Fri Aug 06, 2010 12:44 am 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
although this would likely not be relevant in near future i rethought multi language support.

changed:
GXTFile
GXTBase
added:
LongDesc-abc
Readme-abc

the reason i changed the first 2 from the gta style e for english, s for spanish, ... to en for english and es for spain is that this is a standard that works for all languages. If other languages than the ones that were included in gta were used the original ones would become an exception.

I think this one is the best standard for applications:
http://en.wikipedia.org/wiki/IETF_language_tag
It is used almost everywhere and is easy to handle.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Fri Aug 06, 2010 11:19 am 
Offline
User avatar

Joined: Wed Mar 17, 2010 4:07 am
Posts: 395
Location: Wales, UK
I find a lot of the stuff you want in an MMP file pretty irrelevant. Most of the spare information can easily be put in the readme file anyway.

Things that would be good in the MMP (and most are already there):

  • Map File - basic gmp file
  • STY File - what sty to use
  • SCR File - the script!
  • Description - short description of map
  • Player Count - I like the idea of a single MMP file for all 6 players so this entry could say "1;6" or "2,4,6" for specific player numbers, of course still allow separate MMP's if needs be
  • GXT File - for any custom text
  • GCI File - custom car handling

Things like the playable width and height of a map are pointless, who would actually look it up if there's a picture added with it? :roll: Even then it could be a massive, empty map or a small but densely packed map making the listed "size" more irrelevant. As I said earlier, the rest can be put in the readme. As you said, the longer it is the more errors are bound to happen.

_________________


Top
 Profile  
 
PostPosted: Fri Aug 06, 2010 12:52 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
all those options are optional.
The advantage of information in the .mmp file over a readme is that it is machine readable. Although the need of some entries is questionable now, i think they do not harm. i thought of this standard as a guidline how to include information not which information to include. So i threw in everything that might be relevant in some situation. Eg playable width and height: it could be used to sort maps by size or shape (it was mentioned on the thread about the new map page). Or it would be possible to show the playable area of the map image with the help of the entry Visible region.
These were just random ideas. I just want to point out that some of these entries could only become relevant when they exist.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Fri Aug 06, 2010 9:50 pm 
Offline

Joined: Sat May 16, 2009 6:14 am
Posts: 784
Location: London, UK
elypter wrote:
Although the need of some entries is questionable now, i think they do not harm. i thought of this standard as a guidline how to include information not which information to include.
That's precisely why they do cause harm. More complex a standard, the worse it gets authored and thus the format becomes unusable by machines. (As Vike has hinted at.) This defeats the whole point of having such a format.

If it's going to work it must be kept extremely lean, like Pyro suggests. And, unsurprisingly, like the existing MMP format does. ;)

elypter wrote:
So i threw in everything that might be relevant in some situation.
Which means most of it is irrelevant most of the time. Sure sign of a terrible format.

elypter wrote:
I just want to point out that some of these entries could only become relevant when they exist.
I'd like to point out that all current maps pre-date this format existing. So we could re-distribute all current maps, after getting permission from dozens of inactive modders. Maybe we'd have something used widely enough by, say, 2011.

Meanwhile, players experience the pain of incompatible versions due to format changes to a file they don't care about, for features they don't need.


I'd even argue that the "Description" field is irrelevant. !maps has a description. The readme with the files has a description. Someone in the channel can usually describe just about any public level. And you must have some idea what the level includes before you decide to download it, in the first place!

_________________
Multiplayer Levels | Mission Code Tutorials | Multiplayer Videos


Top
 Profile  
 
PostPosted: Wed Aug 11, 2010 8:32 pm 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
Changes:
-changed the order a bit (that doesnt belong to the standard but i think it fits better that way)
-added BaseVocals
-added BaseRAW
-changed GXTBase to BaseGXT (to avoid problems with unsecure implemented code in advance)
-added UpdateCheck



BenMillard wrote:
elypter wrote:
Although the need of some entries is questionable now, i think they do not harm. i thought of this standard as a guidline how to include information not which information to include.
That's precisely why they do cause harm. More complex a standard, the worse it gets authored and thus the format becomes unusable by machines. (As Vike has hinted at.) This defeats the whole point of having such a format.

.ini files are easy to parse. it doesn't matter how many parameters or values it has and how they are called.
It cannot become incompatible because there are values in it an application doesn't know.
BenMillard wrote:
If it's going to work it must be kept extremely lean, like Pyro suggests. And, unsurprisingly, like the existing MMP format does. ;)

But the original MMP format wasn't designed for an online community.
BenMillard wrote:

elypter wrote:
So i threw in everything that might be relevant in some situation.
Which means most of it is irrelevant most of the time. Sure sign of a terrible format.

only if it causes performance decline or makes the whole thing more complex. But this is NOT the case. It is still a simple .ini format. It doesn't hurt when some features are no required by any program or not included in any map. Do you know what is worse than a terrible format? 2 formats! And it doesn't matter if they are good or bad.
BenMillard wrote:
elypter wrote:
I just want to point out that some of these entries could only become relevant when they exist.
I'd like to point out that all current maps pre-date this format existing. So we could re-distribute all current maps, after getting permission from dozens of inactive modders. Maybe we'd have something used widely enough by, say, 2011.

Meanwhile, players experience the pain of incompatible versions due to format changes to a file they don't care about, for features they don't need.

does gta 11.39 crash when there is no GXTFile entry? No! If a value is missing the standard is assumed. Thats the basic procedure of every reasonably programmed application.

If a feature is not wanted it would not have been implemented by an application. thus incompatibilities are impossible. If the feature is wanted and if it is incompatible then only because nobody wanted to discuss it here in advance.

BenMillard wrote:
Someone in the channel can usually describe

With this argument we wouldn't need game hunter. we could also use the irc channel and sharing ip numbers.
BenMillard wrote:
And you must have some idea what the level includes before you decide to download it, in the first place!

It's not like signing a life assurance. For me it's only 3-4 clicks to be able to join a game. If i like the map -> fine. If not -> i have wasted ~2 MB of my 6 TB disk space.

BTW: you could make an online repository of mmp files that include all this information. Then you could look before.


Overall, I asked HOW to implement these entries and not if because the if doesnt matter(in terms of application compatiblility) and is a personal decision. If you see conflicts between entries or if you want to make an application then please tell. Or at least: Tell what feature is not usefull in your opinion. That's what this thread is about.

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Thu Aug 12, 2010 12:07 am 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 829
Location: F21B3EED
Heres my suggestion for map size/pos and play area size/pos:
Code:
VPosX,VPosY,VSizeX,VSizeY -> MapArea = 60 60 233 233
PPosX,PPosY,PSizeX,PSizeY -> PlayArea = 80 160 200 224


MapArea = x1 y1 x2 y2

So i dropped the width/height since i find it confusing to use, and it doesnt make it any harder to use, actually i am sure its easier to put the end block position with the DMA editor, than try to guess the width/height yourself. Also the names VPosX PPosX etc, are kinda confusing.

Using 8 different variables seems a bit too much for something which is most probably machine generated code in the future.

_________________
My GTA2 related projects:


Top
 Profile  
 
PostPosted: Thu Aug 12, 2010 1:10 am 
Offline
User avatar

Joined: Sat Dec 26, 2009 11:53 pm
Posts: 933
TradeMark wrote:
Heres my suggestion for map size/pos and play area size/pos:
Code:
VPosX,VPosY,VSizeX,VSizeY -> MapArea = 60 60 233 233
PPosX,PPosY,PSizeX,PSizeY -> PlayArea = 80 160 200 224


MapArea = x1 y1 x2 y2

So i dropped the width/height since i find it confusing to use, and it doesnt make it any harder to use, actually i am sure its easier to put the end block position with the DMA editor, than try to guess the width/height yourself. Also the names VPosX PPosX etc, are kinda confusing.

Using 8 different variables seems a bit too much for something which is most probably machine generated code in the future.


Yes, good suggestion.
First it were only sizex & sizey. then i added the other values. Looking at it now your approach is clearly the better one.
-changed

_________________
yur sa'nok ngeyä


Top
 Profile  
 
PostPosted: Sun Aug 15, 2010 10:59 pm 
Offline
User avatar

Joined: Fri Jan 29, 2010 3:00 pm
Posts: 829
Location: F21B3EED
I added the support of "MapArea" and "PlayArea" on my editor now, but i noticed something on your test map (tinytinytown): the PlayArea is too small for a map image. Werent the plan to make MapArea as the edges of the map, so you dont have to repeat water or etc around your map: the editor will do that for you. And the PlayArea was supposed to be the area where you show the map image on some website, instead of showing whole map in small image, you could use the PlayArea as the screenshot area? I think this needs some clarification here and on the MMP file standard info.

_________________
My GTA2 related projects:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group