Page 1 of 1
Question about merging maps [Solved]
Posted: Thu Feb 24, 2011 11:27 pm
by Marth8880
Let's say you want to have your map have grass terrain or something with hills in Conquest, and you want it to have snow terrain or something with hills in different spots in Assault. Also, you want both modes to have their own seperate sky, sun placement, weather, etc.
How would you go about doing this without having two different maps in the map selection screen?
Re: Question about merging maps
Posted: Thu Feb 24, 2011 11:40 pm
by Teancum
Build two different maps, load them based on the specific lua gametype
Re: Question about merging maps
Posted: Fri Feb 25, 2011 12:20 am
by Marth8880
Teancum wrote:Build two different maps, load them based on the specific lua gametype
I'm not sure what you mean.

Re: Question about merging maps
Posted: Fri Feb 25, 2011 1:24 am
by AQT
Search for this line in your LUA's:
Code: Select all
ReadDataFile("dc:ABC\\ABC.lvl", "ABC_conquest")
This is the line that loads the map (ABC.lvl) and the mode layer (ABC_conquest). ABC.lvl is located at ...\addon\ABC\data\_LVL_PC\ABC. Let's say ABC.lvl is your grassy map.
For your Assault LUA, you can load the snowy map. Let's say it is DEF.lvl. You would load it as follows:
Code: Select all
ReadDataFile("dc:ABC\\DEF.lvl", "DEF_eli")
Or you can create a new folder at ...\addon\ABC\data\_LVL_PC\ called DEF and place DEF.lvl in there instead. You can also do that if DEF.lvl was still called ABC.lvl. This way grassy ABC.lvl won't conflict with snowy ABC.lvl.
Does this kind of help at all?
Re: Question about merging maps
Posted: Fri Feb 25, 2011 1:48 am
by Marth8880
Wouldn't I have to edit some addme scripts?
Re: Question about merging maps
Posted: Fri Feb 25, 2011 1:56 am
by Firefang
If you wanted to add a new mode for each location then yes. But if it is just modes you already have with different locations, then no.
Re: Question about merging maps
Posted: Fri Feb 25, 2011 6:29 pm
by Marth8880
So I would stick the line for DEF.lvl under the line for ABC.lvl? That seems suspiciously simple.

Re: Question about merging maps
Posted: Fri Feb 25, 2011 6:37 pm
by AQT
No, you would completely replace the line. And yes, it is that simple. I'd say creating the DEF.lvl and placing it in the correct directory is the more complicated part.
Re: Question about merging maps
Posted: Fri Feb 25, 2011 7:35 pm
by Marth8880
AQT wrote:No, you would completely replace the line. And yes, it is that simple.
So in ABCcw_con.lua, I'd replace this:
Code: Select all
ReadDataFile("dc:ABC\\ABC.lvl", "ABC_conquest")
With this?:
Code: Select all
ReadDataFile("dc:ABC\\DEF.lvl", "DEF_eli")
Sorry, I'm a bit confused.

Re: Question about merging maps
Posted: Fri Feb 25, 2011 7:44 pm
by DarthD.U.C.K.
if you want to load the heroassaultlayer from the ma def, that is.
Re: Question about merging maps
Posted: Fri Feb 25, 2011 8:11 pm
by Marth8880
DarthD.U.C.K. wrote:if you want to load the heroassaultlayer from the ma def, that is.
So in order to have two different modes load their own separate levels, I'd put ABCc_con.lua and DEFg_eli.lua in ABC's scripts folder, and put all of DEF's assets and stuff into the proper folders in ABC?
EDIT:
Nevermind, I got it working! YAY! Click
HERE to download the test version project folder. (I forgot to put in some command posts for Assault. Whatevs.)