Page 1 of 1
How to make Map options?
Posted: 13 Jan 2009, 02:31
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.
Re: How to make Map options?
Posted: 13 Jan 2009, 04:21
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.
Re: How to make Map options?
Posted: 13 Jan 2009, 04:33
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
Re: How to make Map options?
Posted: 13 Jan 2009, 12:48
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.
Re: How to make Map options?
Posted: 13 Jan 2009, 14:02
by TradeMark
So i will just forget about it
Re: How to make Map options?
Posted: 13 Jan 2009, 14:07
by BrainDamage
Re: How to make Map options?
Posted: 13 Jan 2009, 14:49
by TradeMark
what about disabled units?
Re: How to make Map options?
Posted: 13 Jan 2009, 15:01
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...
Re: How to make Map options?
Posted: 13 Jan 2009, 15:33
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.
Re: How to make Map options?
Posted: 13 Jan 2009, 15:53
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.
Re: How to make Map options?
Posted: 13 Jan 2009, 17:43
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.
Re: How to make Map options?
Posted: 13 Jan 2009, 17:48
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.
Re: How to make Map options?
Posted: 13 Jan 2009, 17:54
by smoth
yeah but it isn't 100 percent.
Re: How to make Map options?
Posted: 13 Jan 2009, 18:03
by Pxtl
Either way, I wish we had UT-style (that is, non-exclusive) mutators for shiat like this.
Re: How to make Map options?
Posted: 13 Jan 2009, 18:04
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.
Re: How to make Map options?
Posted: 13 Jan 2009, 18:07
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.
Re: How to make Map options?
Posted: 13 Jan 2009, 18:23
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.
Re: How to make Map options?
Posted: 20 Jan 2009, 16:49
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)