SWBF CUSTOM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

SWBF CUSTOM

The best way to custom your games.
 
HomeLatest imagesSearchRegisterLog in

Share
 

 [FAQ]How to put multiple maps into one addon folder

View previous topic View next topic Go down 
AuthorMessage
commander_fett
Pawn
Pawn
avatar

Messages : 1
Registration Date : 2010-05-15

[FAQ]How to put multiple maps into one addon folder Empty
PostSubject: [FAQ]How to put multiple maps into one addon folder   [FAQ]How to put multiple maps into one addon folder I_icon_minitime5/15/2010, 1:52 pm

Well, here's a tut I wrote on how to put multiple maps in one addon folder, like the 607th or the convo pack. I tried to add as much detail aspossble, so it would be easy to understand.

link

or, the posted version:

How to add multiple maps in one addon folder
By Commander_Fett

So, you want to know how to add more than one map in an addon, eh?
Well, here's the simple-ish steps on how to do so.

Step 1: Well, make your maps. Mine will be AOH and MAB in the examples.

Step 2: Make a new map. Give it only one mode, It doesn't really matter what it is, as it's going to be taken
out later annyway. Mine will be 347.

Step 3: Copy the LUAs from your other to maps to your new one's common/scripts/347 folder, with the other LUAs.
Note: These are the LUAs that will setup the game, the old LUAs don't affect it anymore when you're done
with this tutorial.

Step 4: Make (or copy) the LUAs' reqs from your other two maps. These reqs will be located in your
data_AOH/common/mission folder, they will be the same name as the LUAs. Make (or copy them from your other 2 maps)
in your data_347/common/mission folder.

Step 5:Now, open up your mission.req located in your data_347/common folder. It should look something like this:

Code:
ucft
{
    REQN
    {
        "config"
        "ingame_movies"   
    }

    REQN
    {
        "script"
        "setup_teams"
        "gametype_conquest"
        "gametype_capture"
        "Objective"
        "MultiObjectiveContainer"
        "ObjectiveCTF"
        "ObjectiveAssault"
        "ObjectiveSpaceAssault"
        "ObjectiveConquest"
        "ObjectiveTDM"
        "ObjectiveOneFlagCTF"
   "SoundEvent_ctf"
        "ObjectiveGoto"       
        "LinkedShields"
        "LinkedDestroyables"
        "LinkedTurrets"
        "Ambush"
        "PlayMovieWithTransition"
    }

    REQN
    {
        "lvl"
   "347g_con"
   "347c_con"
    }
}
Change it to read your maps' LUAs, like so:

Code:
ucft
{
    REQN
    {
        "config"
        "ingame_movies"   
    }

    REQN
    {
        "script"
        "setup_teams"
        "gametype_conquest"
        "gametype_capture"
        "Objective"
        "MultiObjectiveContainer"
        "ObjectiveCTF"
        "ObjectiveAssault"
        "ObjectiveSpaceAssault"
        "ObjectiveConquest"
        "ObjectiveTDM"
        "ObjectiveOneFlagCTF"
   "SoundEvent_ctf"
        "ObjectiveGoto"       
        "LinkedShields"
        "LinkedDestroyables"
        "LinkedTurrets"
        "Ambush"
        "PlayMovieWithTransition"
    }

    REQN
    {
        "lvl"
   "MABg_con"
   "MABc_con"
        "MABg_eli"
   "AOHg_con"
   "AOHc_con"
        "AOHc_xl"
    }
}
Step 6: Now to Edit the addme scripts. Go to your data_347/addme folder and open up the addme.LUA.
It will look something like this:

Code:
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
   for i, mission in missionList do
      if mission.mapluafile == mapName then
         for flag, value in pairs(newFlags) do
            mission[flag] = value
         end
      end
   end
end




--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "347%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c  = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier.  the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("347","347g_con",4)
AddDownloadableContent("347","347c_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\347\\data\\_LVL_PC\\core.lvl")
Copy it for our 2 maps, like this:

Code:
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
   for i, mission in missionList do
      if mission.mapluafile == mapName then
         for flag, value in pairs(newFlags) do
            mission[flag] = value
         end
      end
   end
end




--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "347%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c  = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

--note to readers of this tut:just copy the 3 lines above, and BE SURE TO ALSO COPY sp_n = table.getn(sp_missionselect_listbox_contents) and paste it above that, otherwise it won't work right

sp_n = table.getn(sp_missionselect_listbox_contents)
sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "347%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c  = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier.  the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("347","347g_con",4)
AddDownloadableContent("347","347c_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\347\\data\\_LVL_PC\\core.lvl")
Now, just so it's easier to read, split up the map section like this:

Code:
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
   for i, mission in missionList do
      if mission.mapluafile == mapName then
         for flag, value in pairs(newFlags) do
            mission[flag] = value
         end
      end
   end
end




--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1,
mapluafile = "347%s_%s",
era_g = 1,
era_c = 1,
mode_con_g = 1,
mode_con_c  = 1,
}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

--note to readers of this tut:just copy the 3 lines above, and BE SURE TO ALSO COPY sp_n = table.getn(sp_missionselect_listbox_contents) and paste it above that, otherwise it won't work right

sp_n = table.getn(sp_missionselect_listbox_contents)
sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1,
mapluafile = "347%s_%s",
era_g = 1,
era_c = 1,
mode_con_g = 1,
mode_con_c  = 1,
}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier.  the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("347","347g_con",4)
AddDownloadableContent("347","347c_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\347\\data\\_LVL_PC\\core.lvl")
Now edit the mapluafile = "347%s_%s", part of the addme to read your map, like mapluafile = "AOH%s_%s", .
Then, add your modes and eras to your addme.LUA, like I have. Change it to match your LUA setup. So, in
my AOH map, I have extra large mode for clone wars, and conquest for galactic ciivil war and clone wars.
In MAB, I have galactic civil war and clone wars conquest, and galactic civil war hero assault.
My addme would look like this:

Code:
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
   for i, mission in missionList do
      if mission.mapluafile == mapName then
         for flag, value in pairs(newFlags) do
            mission[flag] = value
         end
      end
   end
end




--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1,
mapluafile = "AOH%s_%s",
era_c = 1,
era_g = 1,
mode_con_c = 1,
mode_con_g = 1,
mode_xl_c = 1,
change = {
      mode_xl = { name="Uber Mode",},
      }
}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

sp_n = table.getn(sp_missionselect_listbox_contents)
sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1,
mapluafile = "MAB%s_%s",
era_c = 1,
era_g = 1,
mode_con_c = 1,
mode_con_g = 1,
mode_eli_g = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]

-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier.  the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)

AddDownloadableContent("347","347g_con",4)
AddDownloadableContent("347","347c_con",4)


-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\347\\data\\_LVL_PC\\core.lvl")

Now, almost done with editing the addme. at the part that says

Code:
AddDownloadableContent("347","347g_con",4)
AddDownloadableContent("347","347c_con",4)
make it read your maps, like so:

Code:
AddDownloadableContent("AOH","AOHg_con",4)
AddDownloadableContent("AOH","AOHc_con",4)
AddDownloadableContent("AOH","AOHc_xl",4)
AddDownloadableContent("MAB","MABg_con",4)
AddDownloadableContent("MAB","MABc_con",4)
AddDownloadableContent("MAB","MABg_eli",4)
Step 7: okay, now that you have your LUAs, their respective reqs, have edited your mission.req and set up your
addme.LUA, it's time to munge!

Step 8: Okay, now that you've munged your map (make sure to munge localizations for the maps and sides too,
I'll explain this at the bottom) It's time to head on over to the gamedata folder. go to the directory wher
you installed the game (default is C:\Program Files\LucasArts\Star Wars Battlefront II) and open up the Gamedata
folder. go to the addon folder, and open up your other 2 maps (MAB and AOH). Now, go into data/_LVL_PC and copy
over the map's folder (will say MAB or AOH) to the 347/data/_LVL_PC folder. Once you've copied over the maps, copy
over your custom sides .lvl files into your 347/data/_LVL_PC/SIDE folder (make the folder). Now, copy any custom
Loadscreens into a LOad folder (note: loadscreens must have different names, or else one will overwright the
others)

Now, you have a working mappack folder! Yay!

Instructions on setting up the localization for your maps: in your data_347 folder, open up the editlocalize.bat.
Go to the section that says mapname, then right click on descripton. select "add key" (scopes open up, keys are
what's being localized). Name the key MAB (or whatever the map's 3 letter initial is) and type the name of the
map in the box on the right. Do it for all the languages in the dropdown box. Repeat this procces for the other
maps in 347. Next, go to "description, add the keys, and write the map's description. Next, munge and make sure
you select the "localize" box and after it's done, your maps have names.
Back to top Go down
 

[FAQ]How to put multiple maps into one addon folder

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Modeling Software Trials + Pandemic Addon
» Multiple Weapons Sharing One Award Weapon
» [résolu]Purpose of the PC folder?
» [résolu]Converting BF1 Maps
» Greatest SWBF2 Maps

Permissions in this forum:You cannot reply to topics in this forum
SWBF CUSTOM :: Star Wars Battlefront Games :: Modding-