Page 1 of 1

Lua map config files + MapOptions.lua

Posted: 02 Jun 2008, 05:02
by trepan
I've just committed the TDF -> LUA change for maps
to SVN. This will allow mappers more "game-time"
control of their map configuration (although there is
still a little work to be done for the SM3 format). Any
parameter in the SMD file can be setup with the help
of the MapOptions.lua file before a game starts. Some
things you can do with this feature:

- adjustable metal density / extraction radius
- adjustable tidal strength
- adjustable wind (min and max)
- adjustable gravity
- rendering themes
  • - lighting tints
    - fog adjustments
    - cloud density
    - water color (and texture changes, esp for the new BumpWater)
    - skyBox texture
- terrain type speed changes (tank, kbot, etc...)
- map deformation (allow? hardness)

Once the SM3 format is fully converted, you'll also be
able to change its texture usage via MapOptions.lua.

The MapOptions.lua file can also access the map's config script
file to pull out the map defaults. This makes it so that you can
have a generic MapOptions.lua and map parser file set that you
can add to any map archive to make it "game-time" configurable.

Re: Lua map config files + MapOptions.lua

Posted: 02 Jun 2008, 19:02
by Forboding Angel
Does this mean that you are working on unforking sm3? Cause if so.......

WIN!!!

TBH, I really cba to do smt mapping anymore. If I didn't have evolution to worry about then maybe I would start doing it again, but SM3 is the logical choice for many obvious reasons.

Re: Lua map config files + MapOptions.lua

Posted: 02 Jun 2008, 19:23
by trepan
No, it does not mean that I'm doing any work on
SM3 other than changing it's configuration setup.
There was nothing in my post to indicate
otherwise. To be honest, I'll probably leave that
as the last TDF->lua conversion (seeing as it's
basically not being used).

Add a decent feature, and all I get for my efforts
is a feature request post (essentially off-topic
given the limited scope of my topic). So be it.

Re: Lua map config files + MapOptions.lua

Posted: 02 Jun 2008, 19:27
by Forboding Angel
huh?

I was just hoping. No need to get upset. And the feature is appreciated, because someday SM3 will actually be possible to use and this will be needed (worldbuilder anyone).

Sorry for that.

Re: Lua map config files + MapOptions.lua

Posted: 02 Jun 2008, 19:35
by smoth
I read your post and was most excited about it but i am too over-extended to currently utilize it trepan. That does not mean that I did not read the post and think of future applications including weather and day/night. I really thought that it is spiffy.

Re: Lua map config files + MapOptions.lua

Posted: 02 Jun 2008, 19:39
by trepan
I plan to add a MapOptions.lua / map_config.lua set to the
base maphelper.sdz archive that will let you use this feature
by simply adding "useMapOptions = true" to your map config
file (whether it be SMD or SM3, format varying based on TDF or
LUA file type). I'll add the basics in there (grav, wind, tidal, metal,
etc...), and some lighting junk. Might get a preliminary version
in today.

Re: Lua map config files + MapOptions.lua

Posted: 03 Jun 2008, 19:00
by SirArtturi
Great !

I was about to do some mapoption.lua's for my new map but seems that maybe theres no need... :>

Re: Lua map config files + MapOptions.lua

Posted: 03 Jun 2008, 19:58
by hunterw
oh man the lighting junk would really help

Re: Lua map config files + MapOptions.lua

Posted: 17 Jul 2008, 12:06
by Beherith
Trepan, could you please post an example script to this or point me to some form of documentation? I am immensly interested in this, and would like to make some form of showcase by the time .77 gets released :)