How to make Map options?

How to make Map options?

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

How to make Map options?

Post by TradeMark »

I want to make few options, to be able to choose which units will be disabled in the game, so you can easily change between different playstyles without need to select units yourself (which is agony).

The list could be like:

Code: Select all

[ ] Default
[ ] No AIR/KROGS/BB
[ ] No disabled units
[o] Custom:
   [v] NO AIR
   [ ] NO NUKES
   [ ] NO BB
   [v] NO WATER
   [v] NO HOVERS
[o] means radio button (can choose only one value)
[v] means checkbox (can choose multiple values)

So you could choose from several options, and each one of the options will disable some set of units.

Soo, how do i do this? Would be really useful.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: How to make Map options?

Post by SinbadEV »

I'm no dev, but I think this feature is already implemented for games to set options, extending this to maps would be more consistent then making something new up... args could be passed to the map via LUA or something and the map could react appropriately.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: How to make Map options?

Post by Pxtl »

Well, the lobbies have a "map options" box, so I assume there is some facility already included. I know how to do this for mods, but have no idea how you'd do it for a map.

edit: you create a "mapoptions.lua" file in the style of modoptions.lua (see mods that use this). I have no idea where you put the lua code that reads these map options after the user has set up their options in the client. In a mod, this would be done in unitdefs_post.lua
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: How to make Map options?

Post by Beherith »

Dont mean to whine here, but mapoptions.lua is just like the bumpwater smd tags. Every time we ask for help concerning it, all we get is 'its implemented'. A simple example file would help us billions more than drudging through source.
Some of us dont code, but we do want to develop content, but the level of miscommunication is apalling.
Its not like making this example file would take the implementer of mapoptions more than 10 minutes to write.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: How to make Map options?

Post by TradeMark »

So i will just forget about it
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: How to make Map options?

Post by BrainDamage »

User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: How to make Map options?

Post by TradeMark »

what about disabled units?
User avatar
SirArtturi
Posts: 1164
Joined: 23 Jan 2008, 18:29

Re: How to make Map options?

Post by SirArtturi »

TradeMark wrote:what about disabled units?
Isnt that option modoption related? You can simply disable units in modoptions if you havent noticed ?

And yes Trademark i tried to implement some useful mapoptions before but stuck up in lack of help and instructions...
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: How to make Map options?

Post by Pxtl »

If you want to create a quick-and-easy unit disabler, a better idea would be to create a derivative mutator of BA with some extra modoptions.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: How to make Map options?

Post by TradeMark »

But eh, the point is that the map has it, so no need to release every time new mutators when the base-mod changes.

The map will be played with just one mod anyways, so the easiest thing is to just make MapOptions to make it easier to change between playing styles.

And besides, people dont download shitty mutators just because for my map, or just because to have easy unit disabler >_> NOR join in my games if they dont have the mod.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: How to make Map options?

Post by smoth »

what happens when the map tries to disable units that don't exist in that mod, or if the mod has different naming conventions for the same thing.

Unit limits need to be done via mod options.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: How to make Map options?

Post by Pxtl »

smoth wrote:what happens when the map tries to disable units that don't exist in that mod, or if the mod has different naming conventions for the same thing.

Unit limits need to be done via mod options.
Well, it's possible to design the mod-options to be clever enough to be able to figure out the unit based on features (extreme range or anti-missile-targetable, etc.) rather than unit names, or at least to fail gracefully rather than crashing out if the unit exists.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: How to make Map options?

Post by smoth »

yeah but it isn't 100 percent.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: How to make Map options?

Post by Pxtl »

Either way, I wish we had UT-style (that is, non-exclusive) mutators for shiat like this.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: How to make Map options?

Post by lurker »

But where should the code to do the disabling be? If you put it in unitdefs_post or something it'll break horribly on any mod with an already-customized unitdefs_post.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: How to make Map options?

Post by imbaczek »

maybe lua maprules 0th gameframe or game init or whatever pregame is called? unit build menus can be edited in the game after all.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: How to make Map options?

Post by Pxtl »

lurker wrote:But where should the code to do the disabling be? If you put it in unitdefs_post or something it'll break horribly on any mod with an already-customized unitdefs_post.
Well, ideally the engine should process all the unit-defs-posts, first using the game's unitdefs_post and then following up with the mutators, in order of their selection. That's how those problems were resolved in Unreal Tournament, and it worked quite well.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: How to make Map options?

Post by TradeMark »

How can i make map options so i can disable / enable some units which i added in the map file itself ? (not mod file)

I would just disable/enable these free fusions in my speedball maps, if you want to play game without them (people whine at me its so lame)
Post Reply

Return to “Map Creation”