Map pk3 layout and information about .mapinfo

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

Map pk3 layout and information about .mapinfo

Postby divVerent » Mon Nov 05, 2007 8:31 am

As I am currently making a new menu system, I will change the way the game finds maps and gets information about them. That means: no more mapcfg. Instead, the game will make ".mapinfo" files (of a layout that is yet to specified) that the mappers are supposed to edit. Most of its data (like possible game modes) will be autodetected from the .bsp file (which takes some seconds on the first run). In the future, mappers will be supposed to load up the menu once to make mapinfo files for their maps.

To already prepare your maps for that menu system, please follow the following map pk3 layout:

  • maps/mapname.bsp - well, as usual. You may add a version number to this. If you do it, follow the convention maps/mapname_v2r3.bsp ("version 2, release 3") or just maps/mapname_v2.bsp. Each incompatible change requires a new bsp name change, or it won't redownload. Note that this convention leads to the correct sorting order: mapname, mapname_v2, mapname_v2r1, mapname_v2r2, mapname_v3, etc. If you follow this rule, vcall and suggestmap will find the map without the version number too (by looking for the pattern specified_v*). The very first release of a map does not need a version number.
  • name the pk3 just like the bsp file, possibly with a prepended "map-" (actually, this naming does not matter at all, other than the pk3 name should be different for each new release). If you release a compatible update to a map that does not require a redownload (maybe just repositioned entities), keep the bsp name mapname_v2r3.bsp, but make the pk3 mapname_v2r3a.pk3. This will also behave nicely with the sorting order.
  • name the mapcfg files always dm_mapname.mapcfg, ctf_mapname.mapcfg (with the version number left out).
  • the map screenshot is to be called maps/mapname.jpg (or mapname_v2r3.jpg, etc.). There won't be a file any more to specify its location! Most mappers already follow this convention anyway.
  • you have to specify a key "message" in the worldspawn entity that contains the title of the map (it is where the title already belongs, just stating it again)
  • you should specify a new "author" key in the worldspawn entity to enter your own name
  • you should also specify a new "license" key in the worldspawn entity, although the game will ignore it


By following these conventions, it will be easiest for your maps to work with the new menu system and after the death of the mapcfg system. The menu will then autogenerate the required .mapinfo file from the data you specified, and you shouldn't need to fine tune it any more.

The possible game modes, BTW, will be autodetected by the types of entities you place - for example, item_flag_team2 causes the map to get CTF support, dom_controlpoint causes the map to get DOM support, LMS, DM will be always active, Arena if the map is below a certain size, TDM and KH if it is above a certain size and #spawnpoints, etc. You'll then be able to fine tune this in the .mapinfo file, though, as well as the default time/fraglimit for these modes.

No idea when this new system will come out, but if you in the future follow these simple rules (which also make sense with the current system), the transition will be smooth.

In the unlikely event that you will reach _v9r9... no idea, you may be screwed then :P Maybe _vv10r1, ..., _vv10r9, _vv10rr10, _vv10rr11, ... is how the sequence could go on (also works with the sorting order).

As you see, the primary goal is to make maps work even without a mapcfg file at all - everything the game really needs will be autodetected. However, parsing a BSP file takes about two seconds, so mapinfo will cache it and also allow modification of the dumb guesses the code will do (like possible game modes).

Example worldspawn entity:

Code: Select all
{
"classname" "worldspawn"
"message" "Foo! Just a stupid example map."
"author" "/dev/urandom"
"license" "GPL"


Note: took out "playercount" as mappers never get this right anyway ;) maybe I will make some visible indication of map size - but it won't be fixed player count values.
Last edited by divVerent on Wed Dec 05, 2007 8:56 am, edited 2 times in total.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby 2pong » Mon Nov 05, 2007 5:27 pm

Woah Woah Woah Woah Woah.
_ANOTHER_ change in the map layout process.
We allready had a change a year ago. Now ANOTHER one.
You really don't have a big enough community to keep making these changes and expect not to lose mappers.
What do we with all the existing nexuiz maps. Do we have to redo them because they don't have the keys and your new menu system doesn't recognize the mapcfgs

Why are you doing all this busy work and forcing it upon the community. Will this new thing real mapcfgs too for backward compatability or are you throwing that out too for your amusement. What about custom server map cfgs? Those exist. Man you're going backwards if you get rid of mapcfg totally.

We don't really like the fischer price menu system. You don't care and plug forward with this change anyway.

Don't you know how LONG it takes to recompile a map vs how easy it is to change a mapcfg. I guess not. Yea screw the little guy that doesn't have m3g4 rig.

Thanks DiV, you're a real great fellow.
Keep driving both players (unattractive menu) and developers (less flexible, not backwards compatable packaging system, frequent changes in it) away.

What about setting timelimits and all that. Diffrent timelimits are good for diffrent maps.
What about having large arena maps, what if some servers want that?

Nope, it's all going to be forced upon us by DiV, no backwards compatability because he needs to force us to comply.

Maybe he just want's to get rid of old maps for some reason. This is almost like a propritary game where Div decideds all.
2pong
Banned
 
Posts: 1
Joined: Mon Nov 05, 2007 5:21 pm

Postby PinkRobot » Mon Nov 05, 2007 5:43 pm

I could attack you with arguments Mikee but you would just start screaming at me again how muslims are going to kill me so I don't think I will bother.
Now with new shiny avatar.
PinkRobot
Alien trapper
 
Posts: 443
Joined: Fri Jul 21, 2006 7:06 pm
Location: #brlogetc

Postby tZork » Mon Nov 05, 2007 7:57 pm

Nice! Not having to maintain seventyelevel .mapcfg's & txt's for each map if a very good thing, specialy for sloppy typers like me.. xD Good work divVerent.
HOF:
<Diablo> the nex is a "game modification"
<Diablo> quake1 never had a weapon like that.
<Vordreller> there was no need for anything over 4GB untill Vista came along
<Samua>]Idea: Fix it? :D
<Samua>Lies, that only applies to other people.
tZork
tZite Admin
 
Posts: 1337
Joined: Tue Feb 28, 2006 6:16 pm
Location: Halfway to somwhere else

Postby Shoe » Mon Nov 05, 2007 8:00 pm

Yes, obviously a system that cuts down on extraneous, slightly awkward file conventions is going to kill the community. Obviously! :roll:

Can't entities be changed within the map without recompiling, anyways?
Shoe
Keyboard killer
 
Posts: 517
Joined: Wed Mar 08, 2006 2:18 am

Postby divVerent » Mon Nov 05, 2007 8:08 pm

Just to make one point clear:

Any old map will RUN after the change, it just won't show author and title right in the menu (in case of title, maps where this stops working already WERE made wrong). So compatibility does not get broken. I'll even supply pre-made cache files for all maps I have so it doesn't take you guys longer to start up Nexuiz for the first time.

And if you complain about the menu graphics - these are the easiest thing to change in the end. I currently am moving graphics that Morphed made for me. So don't insult me, insult him :P or just make a better menu skin.

Different timelimits and fraglimits will of course still be possible, they just need to be rewritten by hand by editing the mapinfo file.

Basically, the reasons why I want to get rid of mapcfg are the following two:

  • it got abused, and people changed game cvars in a mapcfg, like gravity, running speed, etc. - WITHOUT CHANGING THEM BACK AT THE END OF THE MAP USING AN exit_cfg. This is a big annoyance on servers that run more than one map. I want to completely kill the "feature" of changing game parameters by a map. It's not the mapper whose decision it is how "maxplayers" or the jump height is set, but the one of the server admin.
  • naming of the mapcfg files often had no relation to the BSP name or to the pk3 name, so it's hard to guess how to load a map.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby divVerent » Mon Nov 05, 2007 8:12 pm

Shoe wrote:Yes, obviously a system that cuts down on extraneous, slightly awkward file conventions is going to kill the community. Obviously! :roll:

Can't entities be changed within the map without recompiling, anyways?


Yes (q3map2 -onlyents), but as I said - you do not NEED to for the new system. All that "breaks" when not following the conventions is that the map title isn't shown, and that the recommended player count is taken from the map as a wild guess, instead from the mapper. But it can be easily changed by hand. Fixing what goes wrong takes less time than writing a single mapcfg and txt file.

I still promise that ANY old map will RUN with this without any changes. But following the conventions I presented will ensure least extra work to make the map show up nicely - with picture, recommended player count, etc.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby divVerent » Mon Nov 05, 2007 8:18 pm

Oh, and speaking of custom mapcfgs on servers - I'll think of a way to keeping these features. Maybe cvars that specify special settings for each map. That way, only server admins can specify them, but mappers can't abuse it.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby [-z-] » Mon Nov 05, 2007 9:11 pm

Sounds pretty convenient to me... not sure what all the fuss in the beginning was about :-P.

Without straying too far off topic... perhaps a new system for browsing maps is in order? maybe a way to list all maps and then check off which game types you want to filter by... Something about the current UI just doesn't keep me.
[-z-]
Site Admin and Nexuiz Ninja
 
Posts: 1794
Joined: Mon Nov 13, 2006 12:20 am
Location: Florida

Postby divVerent » Mon Nov 05, 2007 9:59 pm

Of course, I am completely redesigning the create-game dialog too. It will be a scrollable list of maps with screenshots, that can be doubleclicked to add/remove from g_maplist. I don't think I'll make g_maplist orderable, it needlessly makes the UI more complex. Use the voting to achieve a "predefined" order of maps, or a dedicated server.
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Next

Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest