Official Map Blueprint/Container

Official Map Blueprint/Container

Tutorials & Resources For Mappers

Moderator: Moderators

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Official Map Blueprint/Container

Post 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)
Attachments
snowfog.jpg
(104.79 KiB) Downloaded 2 times
night0.jpg
(172.83 KiB) Downloaded 2 times
dawn1.jpg
(250.17 KiB) Downloaded 2 times
Last edited by jK on 06 Sep 2011, 09:13, edited 2 times in total.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Official Map Blueprint/Container

Post 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.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Official Map Blueprint/Container

Post 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/
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Official Map Blueprint/Container

Post 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?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Official Map Blueprint/Container

Post 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 ;-))
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Official Map Blueprint/Container

Post by smoth »

Cool, thanks jk, I will hopefully get to try it tonight
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Official Map Blueprint/Container

Post by Beherith »

Really awesome, I'll def. use this from now on :D
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Official Map Blueprint/Container

Post by smoth »

What goes in the SMD?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Official Map Blueprint/Container

Post by jK »

Nothing said of a SMD.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Official Map Blueprint/Container

Post by Beherith »

Official Map Blueprint
Just put the smd&smt
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Official Map Blueprint/Container

Post 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
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Official Map Blueprint/Container

Post 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 :-)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Official Map Blueprint/Container

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Official Map Blueprint/Container

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Official Map Blueprint/Container

Post by smoth »

Hang on while I drop my irl obligations to fast track efforts for you
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Official Map Blueprint/Container

Post 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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Official Map Blueprint/Container

Post by smoth »

suddenly... a certain error now makes sense..
Godamnit.
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Official Map Blueprint/Container

Post 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:
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Official Map Blueprint/Container

Post 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
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Official Map Blueprint/Container

Post by smoth »

Forboding Angel wrote:

Code: Select all

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

Return to “Map Tutorials & Resources”