Page 1 of 1

Problems with the Mission.lvl [Solved]

Posted: Sat Jul 25, 2009 12:15 pm
by Fierfek
Okay, so I add an era to all the maps, and suddenly I get all sorts of crazy errors in my mungelog:
No need to use 3 posts, I posted it on txtb.in for you -Staff
http://txtb.in/3vk

Also, I get this error when I start the map ingame:
Hidden/Spoiler:
FATAL - Could not open Mission OPSc_con.lvl
I tried a manual clean - didnt help.
Can someone please help?

Re: Problems with the Mission.lvl

Posted: Sat Jul 25, 2009 12:20 pm
by mswf
You're probably missing some files...

Re: Problems with the Mission.lvl

Posted: Sat Jul 25, 2009 12:22 pm
by Xavious
Explain how you tried to set this up.

Re: Problems with the Mission.lvl

Posted: Sat Jul 25, 2009 12:23 pm
by mswf
I guess he just copied over an old side, and edited it. In the progress, he forgot to include all the other models, textures etc that the old side referenced to.

Re: Problems with the Mission.lvl

Posted: Sat Jul 25, 2009 12:25 pm
by Fierfek
Xavious wrote:Explain how you tried to set this up.
Okay, here is my 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 the new gamemodes or maps here for pre-existing maps:

AddNewGameModes( sp_missionselect_listbox_contents, "cor1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "dag1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "dea1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "end1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "fel1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "geo1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "hot1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "kam1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "kas2%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "mus1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "myg1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "nab2%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "pol1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "tan1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "tat2%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "tat3%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "uta1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )

AddNewGameModes( sp_missionselect_listbox_contents, "yav1%s_%s", {era_n = 1, mode_con_n = 1, change = {era_n = { name="CW Spec Ops", icon2="mode_icon_ord66" },},} )


--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 = "ops%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("COR1","cor1n_con",4)
AddDownloadableContent("DAG1","dag1n_con",4)
AddDownloadableContent("DEA1","dea1n_con",4)
AddDownloadableContent("END1","end1n_con",4)
AddDownloadableContent("FEL1","fel1n_con",4)
AddDownloadableContent("GEO1","geo1n_con",4)
AddDownloadableContent("HOT1","hot1n_con",4)
AddDownloadableContent("KAM1","kam1n_con",4)
AddDownloadableContent("KAS2","kas2n_con",4)
AddDownloadableContent("MUS1","mus1n_con",4)
AddDownloadableContent("MYG1","myg1n_con",4)
AddDownloadableContent("NAB2","nab2n_con",4)
AddDownloadableContent("POL1","pol1n_con",4)
AddDownloadableContent("TAN1","tan1n_con",4)
AddDownloadableContent("TAT2","tat2n_con",4)
AddDownloadableContent("TAT3","tat3n_con",4)
AddDownloadableContent("UTA1","uta1n_con",4)
AddDownloadableContent("YAV1","yav1n_con",4)
AddDownloadableContent("OPS" ,"opsc_con",4)

-- all done
newEntry = nil
n = nil

-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\ops\\data\\_LVL_PC\\core.lvl")
Then I made a missin.req for each map, then created scripts for each of the maps for my new era.
Then I munge, and everything works perfectly.
Then make some minor sides changes, munge, and everything goes to osik, as seen above.

@mswf - The side has been working perfectly until now. If you want proof, check out this topic:
http://www.gametoast.com/forums/viewtop ... 29&t=19592
It is the announcement of the mod.

Re: Problems with the Mission.lvl

Posted: Sat Jul 25, 2009 8:24 pm
by [RDH]Zerted
If you get errors in your munge log, the map won't work ingame. There is no point in even trying. Do a full, manual clean then remunge with only Common checked.

Re: Problems with the Mission.lvl

Posted: Sat Jul 25, 2009 8:32 pm
by Fierfek
Don't worry - I fixed this by making a new map. Barely any work.
Thanks everyone!

Re: Problems with the Mission.lvl

Posted: Sun Jul 26, 2009 1:07 am
by [RDH]Zerted
What are you going to do when you get those same messages on a map you've put in a lot of development time and don't want to lose it? I've seen those errors a bunch of times...

Re: Problems with the Mission.lvl

Posted: Sun Jul 26, 2009 5:36 am
by Par3210
[RDH]Zerted wrote:What are you going to do when you get those same messages on a map you've put in a lot of development time and don't want to lose it? I've seen those errors a bunch of times...
Me too. I found out that for the first few errors it worked for me doing a manual clean. It is to do with not localizing properly. I think.

Re: Problems with the Mission.lvl

Posted: Sun Jul 26, 2009 7:29 pm
by Fierfek
[RDH]Zerted wrote:What are you going to do when you get those same messages on a map you've put in a lot of development time and don't want to lose it? I've seen those errors a bunch of times...
Oh, you don't get what I mean. I mean I made a new map, then copied all of my old files over to the new one, and that fixed it. Nothing changed in the map. I just copied everything over.