Page 1 of 1

Trouble with adding maps to one project

Posted: Fri Jul 01, 2011 8:58 pm
by modmaster13
Ok I am trying to munge 2 maps from one project, using this tutorial by Teancum. I got all the world source files in the "Worlds" folder, setup the luas, addme, mission req, but it isn't munging correctly. It says:
Hidden/Spoiler:
"Error (Invalid Parameter): RVH"


and:
Hidden/Spoiler:
"Usage: munge [PC|PS2|XBOX] [world1> <world2> ...}
addme.LUA:
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




--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] = {red = 255, blue = 255, green = 255, isModLevel = 1, mapluafile = "RVC%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c = 1, mode_ctf_g = 1, mode_ctf_c = 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]

sp_missionselect_listbox_contents[sp_n+1] = {red = 255, blue = 255, green = 255, isModLevel = 1, mapluafile = "RVH%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c = 1, mode_1flag_g = 1, mode_1flag_c = 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("RVC","RVCg_con",4)
AddDownloadableContent("RVC","RVCc_con",4)
AddDownloadableContent("RVC","RVCg_ctf",4)
AddDownloadableContent("RVC","RVCc_ctf",4)
AddDownloadableContent("RVC","RVCg_eli",4)

AddDownloadableContent("RVH","RVHg_con",4)
AddDownloadableContent("RVH","RVHc_con",4)
AddDownloadableContent("RVH","RVHg_1flag",4)
AddDownloadableContent("RVH","RVHc_1flag",4)
AddDownloadableContent("RVH","RVHg_eli",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\BF1\\data\\_LVL_PC\\core.lvl")
mission.req
Hidden/Spoiler:
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"
"RVCg_con"
"RVCc_con"
"RVCg_ctf"
"RVCc_ctf"
"RVCg_eli"
"RVHg_con"
"RVHc_con"
"RVHg_1flag"
"RVHc_1flag"
"RVHg_eli"
}
}
All script req files are in the following location:
Hidden/Spoiler:
C:\BF2_ModTools\data_BF1\Common\mission
They are working because I already tested them out in a different project

World folders "RVC" and "RVH" are in the following location:
Hidden/Spoiler:
C:\BF2_ModTools\data_BF1\Worlds
Script Folders "RVC" and "RVH" with all the needed scripts are in this location:
Hidden/Spoiler:
C:\BF2_ModTools\data_BF1\Common\scripts
The result of this problem: Not being able to spawn and my RVH map showing up like
Hidden/Spoiler:
RVH%s_%s
Please help! :faint:
Hidden/Spoiler:
Hopefully I didnt forget anything :|

Re: Trouble with adding maps to one project

Posted: Sat Jul 02, 2011 4:57 pm
by Marth8880
I had the same question awhile ago: viewtopic.php?f=27&t=25554

Look at the last post to download the test version project folder which works.

Re: Trouble with adding maps to one project

Posted: Sun Jul 03, 2011 10:08 pm
by modmaster13
Can you please tell me how this is suppost to help me? I want to get multiple maps in one project, not loading different worlds or terrain from multiple modes.

Re: Trouble with adding maps to one project

Posted: Sun Jul 03, 2011 10:14 pm
by Marth8880
modmaster13 wrote:Can you please tell me how this is suppost to help me? I want to get multiple maps in one project, not loading different worlds or terrain from multiple modes.
My apologies, I thought you meant multiple worlds in one project, and by project you mean to say map pack; but really, whatever it is you are trying to do looks virtually identical to what I did to multiple worlds in one map listing; I would suggest you look at that project folder I uploaded either way. Anyways, are you positive that you localized RVH?

EDIT:

Wait a minute, what? You are not using the proper terms . What are you talking about when you say project?

Re: Trouble with adding maps to one project

Posted: Sun Jul 03, 2011 11:22 pm
by modmaster13
I am trying to fit a bunch of maps into a data_*** project

Re: Trouble with adding maps to one project

Posted: Mon Jul 04, 2011 1:59 am
by Marth8880
modmaster13 wrote:I am trying to fit a bunch of maps into a data_*** project
And are you aiming to make it so the maps are stored in one separate folder in the \addon\ directory, or are you trying to make it so the worlds are all contained in only one map listing in-game?

Re: Trouble with adding maps to one project

Posted: Mon Jul 04, 2011 2:13 pm
by modmaster13
Marth8880 wrote:
modmaster13 wrote:I am trying to fit a bunch of maps into a data_*** project
And are you aiming to make it so the maps are stored in one separate folder in the \addon\ directory,
Yes. If you don't know what I am talking about, DL the convo pack