Problems with the Mission.lvl [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
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Problems with the Mission.lvl [Solved]

Post 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?
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: Problems with the Mission.lvl

Post by mswf »

You're probably missing some files...
Xavious
Sith Master
Sith Master
Posts: 2783
Joined: Mon Jun 12, 2006 3:46 pm

Re: Problems with the Mission.lvl

Post by Xavious »

Explain how you tried to set this up.
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: Problems with the Mission.lvl

Post 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.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: Problems with the Mission.lvl

Post 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.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Problems with the Mission.lvl

Post 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.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: Problems with the Mission.lvl

Post by Fierfek »

Don't worry - I fixed this by making a new map. Barely any work.
Thanks everyone!
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Problems with the Mission.lvl

Post 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...
User avatar
Par3210
Jedi
Jedi
Posts: 1033
Joined: Sun Jun 14, 2009 10:31 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Owning people in SWBF2
Contact:

Re: Problems with the Mission.lvl

Post 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.
User avatar
Fierfek
High General
High General
Posts: 805
Joined: Wed Jul 01, 2009 4:38 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Somewhere in the Galaxy (Most Likely Scrapping Tinnies)

Re: Problems with the Mission.lvl

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