Mappack help

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
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Mappack help

Post by ARCTroopaNate »

I'm trying to add a map to an existing project, I have added it in the mission folder the mission.req, the addme and put it's scripts in my mods scripts folder. I have put the new maps world1 folder in my worlds folder and I have created a folder in _BUILD for it. I've munged and tried many things and it's still not working. This is my first time doing this so it could be an error on my part. If it's a stupid error I apologize in advance.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Mappack help

Post by AQT »

So it seems you have all the necessary .lua files and their corresponding .req files in the correct directories. You are using a single addme.lua file as well as a single mission.req file for both of these maps, then?

As for the map's world files, you need to move the entire three-character I.D. folder containing msh, odf, world1, etc. folders from data_***\Worlds to the same location but in the other project folder, similar to how there can multiple sides in the data_***\Sides.
ARCTroopaNate wrote:I have created a folder in _BUILD for it.
This folder is called _BUILD\Worlds\***, and it contains the two necessary munge and clean batch files?
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: Mappack help

Post by ARCTroopaNate »

Yes, I have done all of that and it still does not work, I've tried to clean and manual clean and it's still not working.
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Mappack help

Post by THEWULFMAN »

Please post your addme.lua.
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: Mappack help

Post by ARCTroopaNate »

addme
Hidden/Spoiler:
--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


ReadDataFile("..\\..\\addon\\BFE\\data\\_LVL_PC\\shell.lvl")
ReadDataFile("..\\..\\addon\\BFE\\data\\_LVL_PC\\common.lvl")
--insert totally new maps here:
sp_missionselect_listbox_contents[sp_n+1] = { isModLevel = 1, mapluafile = "CHG%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]
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)

AddNewGameModes(
sp_missionselect_listbox_contents,
"kam1%s_%s",
{
era_e = 1,
era_b = 1,
mode_con_e = 1,
mode_con_b = 1,
change = {
era_e = { name="BFE Clone Wars" , icon2="cw_icon" },
era_b = { name="BFE Galactic Civil War", icon2="gcw_icon" },},})

AddNewGameModes(
mp_missionselect_listbox_contents,
"kam1%s_%s",
{
era_e = 1,
era_b = 1,
mode_con_e = 1,
mode_con_b = 1,
change = {
era_e = { name="BFE Clone Wars" , icon2="cw_icon" },
era_b = { name="BFE Galactic Civil War", icon2="gcw_icon" },},})

AddNewGameModes(
sp_missionselect_listbox_contents,
"kas2%s_%s",
{
era_e = 1,
era_b = 1,
mode_con_e = 1,
mode_con_b = 1,
change = {
era_e = { name="BFE Clone Wars" , icon2="cw_icon" },
era_b = { name="BFE Galactic Civil War", icon2="gcw_icon" },},})

AddNewGameModes(
mp_missionselect_listbox_contents,
"kas2%s_%s",
{
era_e = 1,
era_b = 1,
mode_con_e = 1,
mode_con_b = 1,
change = {
era_e = { name="BFE Clone Wars" , icon2="cw_icon" },
era_b = { name="BFE Galactic Civil War", icon2="gcw_icon" },},})

-- 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("kam1","kam1b_con",4)
AddDownloadableContent("kam1","kam1e_con",4)
AddDownloadableContent("kas2","kas2b_con",4)
AddDownloadableContent("kas2","kas2e_con",4)
AddDownloadableContent("CHG","CHGc_con",4)
AddDownloadableContent("CHG","CHGg_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\BFE\\data\\_LVL_PC\\core.lvl")
ReadDataFile("..\\..\\addon\\BFE\\data\\_LVL_PC\\CHG\\CHG.lvl")
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Mappack help

Post by AQT »

The addme.lua looks about right.
ARCTroopaNate wrote:Yes, I have done all of that and it still does not work
What doesn't work exactly? Have you edited the individual mission .lua files so that they read the map .lvl/layer from the correct directory in your addon folder?
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: Mappack help

Post by ARCTroopaNate »

Isn't it correct by default?

ReadDataFile("dc:CHG\\CHG.lvl", "CHG_gcwconq")

Is what I have for one of them, you have to change them?
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Mappack help

Post by AQT »

If all of the world .lvl files are located in the _LVL_PC\CHG folder, then yes, you will obviously need to change the directory location. And how exactly are you adding another map to an existing project? Based on your addme.lua, it seems you are adding additional eras to two stock maps, as well as having the map that is created when you use VisualMunge for the first time. Also, what doesn't work exactly? You never answered that.
ARCTroopaNate
Jedi
Jedi
Posts: 1161
Joined: Mon Mar 21, 2011 8:12 pm
Projects :: Star Wars Battlefront - Tides of War
Games I'm Playing :: SWBF2 RC EAW
xbox live or psn: I have ps4
Location: STALKER!
Contact:

Re: Mappack help

Post by ARCTroopaNate »

I put the world file for the map in my worlds folder. Added a folder for it in _BUILD/Worlds with the neccesary .bat files. I put in a new folder in data_BFE/Common/Scripts called CHG and put in the lua files for the map there. I added it in the addme by replacing the lines that munged the new projects map with the lines of my old map, mission.req. That's what I've done. Right now the map just does not show up in the instant action list. I also changed the directory in my lua scripts to dc:BFE instead of dc:CHG and it still does not work.
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: Mappack help

Post by Marth8880 »

Have you checked the debug log?
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Mappack help

Post by THEWULFMAN »

ARCTroopaNate wrote:I put in a new folder in data_BFE/Common/Scripts called CHG and put in the lua files for the map there.
You don't need to, nor should you do that. Just keep them all together in the same folder, specifically the BFE one that should still be there.
ARCTroopaNate wrote:Right now the map just does not show up in the instant action list.

Then you have an Addme problem somewhere. Regardless of whether your mission.req, your mission reqs, or your mission scripts are set up properly or not, the addme.script is solely responsible for a map showing up on the Instant Action menu.
Post Reply