Question about merging maps [Solved]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Question about merging maps [Solved]

Post 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?
Last edited by Marth8880 on Sat Feb 26, 2011 12:26 am, edited 1 time in total.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Question about merging maps

Post by Teancum »

Build two different maps, load them based on the specific lua gametype
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Question about merging maps

Post by Marth8880 »

Teancum wrote:Build two different maps, load them based on the specific lua gametype
I'm not sure what you mean. :?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Question about merging maps

Post 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?
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Question about merging maps

Post by Marth8880 »

Wouldn't I have to edit some addme scripts?
User avatar
Firefang
Major
Major
Posts: 518
Joined: Mon Nov 15, 2010 8:55 pm
Location: California

Re: Question about merging maps

Post 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.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Question about merging maps

Post by Marth8880 »

So I would stick the line for DEF.lvl under the line for ABC.lvl? That seems suspiciously simple. :?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Question about merging maps

Post 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.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Question about merging maps

Post 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. :?
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Question about merging maps

Post by DarthD.U.C.K. »

if you want to load the heroassaultlayer from the ma def, that is.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Question about merging maps

Post 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.)
Post Reply