Page 1 of 3

Official Map Blueprint/Container

Posted: 13 May 2011, 19:50
by jK
Download/GitHub
https://github.com/jk3064/Map-Blueprint

Official Map Blueprint
Just put the smf&smt in there, configure the mapconfig.lua to your needs and be happy :D

Background
For a very long time mappers didn't really knew how to use all these new fancy things Lua offers them. The existing usages are limited and very specialized to the needs of the map. Also much code was written w/o full engine knowledge.
To finally stop this I took a map by smoth and inserted all missing tag&features the engine offers. Mappers can now just put their SMF&SMTs in there and configure the mapconfig.lua the same way they did with their SMDs. Some MapOptions are also included (day time/weather/economics).
I hope it will cleanup the future map development. And that mappers will fork this repo to share back their modifications/additions.

Tutorial
  • place your SMF&SMT into ./maps/
  • edit mapconfig.lua (give your map a new name & change lighting etc.)
  • edit mapoptions.lua in the case you want to disable a few mapoptions (invert, night, snow, ...)
  • finished
Hints
  • I rewrote huge parts of the fog & snow gadget (fixed visual inconsistencies & improved performance a lot), you can't use your old settings with the new ones
  • the mapconfig.lua contains many new features that get introduced in 0.83 (i.e. SoundReverb/EFX)
  • there will be also a MapDevMod, which will contain useful tools to customize many things at runtime via a GUI (water, sound, featureplacer, ...)
  • please extend it and further tweak the included mapoptions scripts (to change the day time etc.) and share back your modifications!
Thanks go to
  • trepan
  • user
  • smoth
  • forb
Screenshots (because all like them)

Re: Official Map Blueprint/Container

Posted: 13 May 2011, 20:08
by knorke
good idea.
Just yesterday I was wondering which files I have to (not) rename to make a v2 of a map.
So with
--mapfile = "", --// location of smf/sm3 file (optional)
it is possible to use whatever filenames one wishes for the smf/smt files?
Good that mapname can be read from mapinfo.lua instead of being decided by some file names.
Also startpositions etc. are now in mapinfo.lua and so the .smd is not needed anymore at all?
Maybe a minimal map/mapinfo.lua would be nice to have.

Re: Official Map Blueprint/Container

Posted: 13 May 2011, 20:10
by jK
knorke wrote:--mapfile = "", --// location of smf/sm3 file (optional)
it is possible to use whatever filenames one wishes for the smf/smt files?
You don't need to specify the smf/smt filenames anywhere. The engine scans the whole archive to locate them and in 0.83 they don't even have to be in ./maps/

Re: Official Map Blueprint/Container

Posted: 13 May 2011, 20:15
by knorke
But the file names still matter/mattered.
Old map had:
hotstepper.smt
hotstepper.smd
hotstepper.smf

Rename to:
hotstepper_v2.smt
hotstepper_v2.smd
hotstepper_v2.smf

-> Spring does not show the map, it had to be:
hotstepper.smt
hotstepper_v2.smd
hotstepper_v2.smf

I hope this gone now?

Re: Official Map Blueprint/Container

Posted: 13 May 2011, 20:16
by jK
no, but you can override the in the smf compiled smt filename via a tag in mapconfig.lua.
(In theory, you are able to write a lua script for that. Feel free to fork ;-))

Re: Official Map Blueprint/Container

Posted: 13 May 2011, 23:13
by smoth
Cool, thanks jk, I will hopefully get to try it tonight

Re: Official Map Blueprint/Container

Posted: 14 May 2011, 14:18
by Beherith
Really awesome, I'll def. use this from now on :D

Re: Official Map Blueprint/Container

Posted: 04 Jun 2011, 20:17
by smoth
What goes in the SMD?

Re: Official Map Blueprint/Container

Posted: 05 Jun 2011, 14:42
by jK
Nothing said of a SMD.

Re: Official Map Blueprint/Container

Posted: 05 Jun 2011, 15:08
by Beherith
Official Map Blueprint
Just put the smd&smt

Re: Official Map Blueprint/Container

Posted: 05 Jun 2011, 15:11
by jK
Beherith wrote:
Official Map Blueprint
Just put the smd&smt
Oops, typo

->
jK wrote: Tutorial
  • place your SMF&SMT into ./maps/
  • edit mapconfig.lua (give your map a new name & change lighting etc.)
  • finished

Re: Official Map Blueprint/Container

Posted: 11 Jun 2011, 00:13
by Forboding Angel
Excellent! Great work jk!

That said, The default settings for this are awful. I spent about 4 hours today trying to correct it, but I'm giving up at this point. I suggest getting smoth's settings and making them the default. The current default is unusable out of the box, and imo, it is bad for business for it to be that way.

Excellent work though. If we could get the defaults set nicely it would be pretty much perfection :-)

Re: Official Map Blueprint/Container

Posted: 11 Jun 2011, 00:25
by smoth
no worries forb, I will convert all my maps to use jk's new code and you can grab that. yay erryone is happeh.

Re: Official Map Blueprint/Container

Posted: 21 Jun 2011, 10:49
by Forboding Angel
Unfortunately, everyone isn't happy, because I have like 2 maps that I want to get done that I can't because I need new code.

Sigh :-/ There's always a roadblock, no matter what you're trying to do.

Re: Official Map Blueprint/Container

Posted: 21 Jun 2011, 15:39
by smoth
Hang on while I drop my irl obligations to fast track efforts for you

Re: Official Map Blueprint/Container

Posted: 03 Jul 2011, 18:06
by zwzsg

Code: Select all

    teams = {
        [0] = {startPos = {x = 2033, y = 852}},
        [1] = {startPos = {x = 10134, y = 852}},
        [2] = {startPos = {x = 0, y = 0}},
        [3] = {startPos = {x = 0, y = 0}},
    },
I believe you mean z not y.

Re: Official Map Blueprint/Container

Posted: 03 Jul 2011, 18:38
by smoth
suddenly... a certain error now makes sense..
Godamnit.

Re: Official Map Blueprint/Container

Posted: 03 Jul 2011, 18:43
by jK
zwzsg wrote:

Code: Select all

    teams = {
        [0] = {startPos = {x = 2033, y = 852}},
        [1] = {startPos = {x = 10134, y = 852}},
        [2] = {startPos = {x = 0, y = 0}},
        [3] = {startPos = {x = 0, y = 0}},
    },
I believe you mean z not y.
thx :mrgreen:

Re: Official Map Blueprint/Container

Posted: 17 Jul 2011, 11:05
by Forboding Angel

Code: Select all

[f=0000000] Failed to load: gui_dualfog_gadget.lua  ([string "LuaGaia/Gadgets/gui_dualfog_gadget.lua"]:133: attempt to perform arithmetic on local 'engv' (a nil value))
*shrug*

Also,
precipitation = {
density = 30000,
size = 1.5,
speed = 0.1,
windscale = 1.2,
texture = 'LuaGaia/effects/snowflake.png',
},
Speed does fuckall. Smoth's old stuff had the flakes floating slowly down and it was serene and beautiful.

Also, all the flakes are gray! Smoth's had them all different colors and it was super pretty.

Code: Select all

	depend      = {"Spring Features 1.0"},
^^ depend should be this by default

Re: Official Map Blueprint/Container

Posted: 17 Jul 2011, 15:39
by smoth
Forboding Angel wrote:

Code: Select all

	depend      = {"Spring Features 1.0"},
^^ depend should be this by default
no