Help with custom campaign

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

Posts: 4
Joined: Mon Feb 26, 2018 4:51 am
Projects :: No Mod project currently.
Games I'm Playing :: BF2
xbox live or psn: No gamertag set

Help with custom campaign

Postby Lako3000 » Mon Feb 26, 2018 4:54 am

Hey guys, im sort of new to modding Bf2 and just want to make a small and simple adjustment (at least i hope its simple). All i want to do is completely copy the Campaign for bf2 and make adjustments, then have it accessible via a separate title in game. so when you go into the campaign section theres a second one that has my changes in it, the original is still there and playable.

im just sort of asking, how do i copy and paste all the levels into 1 munge file? or do i have to do multiples? and if anyone knows, where are the campaign level files?

any help would be greatly appreciated, thanks

Private First Class
User avatar
Posts: 77
Joined: Sun Jan 18, 2015 5:23 pm
Projects :: SWBF2 XBOX Mod Environment
Games I'm Playing :: SW Battlefront 2
xbox live or psn: No gamertag set

Re: Help with custom campaign

Postby cbadal » Mon Feb 26, 2018 10:20 pm

I'm kinda new here and haven't modded much, but I have done some poking around at the Lua files.
I think you can do this by adding your own 'Shell.lvl', although I've never done it myself.

If you wanted to mod that list where you can select the 'Rise of the Empire' option, it's in 'BF2_ModTools\assets\Shell\scripts\ifs_sp.lua'.

The file 'missionlist.lua' defines the campaign missionlist and you might want to add your new one in there.

This is a mod you could do on the Xbox by controlling what goes into all the base Shell.lvl file, I'm unsure if you can do it on the PC version as an 'addon'; but I think you can.
In your addme.script, I think you just redefine 'ifs_sp' with a 'ScriptCB_DoFile' call.

Looking through those 2 files I mentioned should give you a good start at figuring out how the campaign works.

Posts: 4
Joined: Mon Feb 26, 2018 4:51 am
Projects :: No Mod project currently.
Games I'm Playing :: BF2
xbox live or psn: No gamertag set

Re: Help with custom campaign

Postby Lako3000 » Tue Feb 27, 2018 3:46 am

thanks for your help mate, so if i was to copy the mission list and some of the other campaign stuff to my new world would it allow me to setup a seperate custom campaign when i munge? or do i just copy it to the addon folder and change the names of the maps?

Command Sergeant Major
User avatar
Posts: 260
Joined: Mon Apr 18, 2011 2:53 pm
Location: The Milky Way/The Solar System/Earth/Hungary
Projects :: Underground City The Complex [WIP]
Games I'm Playing :: SWBF2

Re: Help with custom campaign

Postby hunpeter12 » Tue Feb 27, 2018 7:31 pm

I think this is what you are looking for: viewtopic.php?f=35&t=31002

EDIT: just realized you already commented there as well

Anyway, you might have to do the same as if you were creating a completely new campaign, although don't listen to me, I'm really out of my depth here :| I gues it might depend on what kind of changes you want to make.

Lieutenant General
User avatar
Posts: 672
Joined: Sat Sep 22, 2012 3:41 pm

Re: Help with custom campaign

Postby Nedarb7 » Fri Mar 02, 2018 5:45 pm

Hey Lako, what have you done so far and what sort of adjustment are you thinking of? I'm a little unsure as to what you'll need help with. To answer some of your questions, you can package your mod into one folder or multiple, it all depends on how you want to set it up. Are you currently trying one project folder? If you are could you post your addme script here? And lastly, by campaign level files do you mean the munged lvl files, mission scripts, or the world files?

I don't mean to overwhelm you with questions. I just want to make sure I understand your vision and where you're at so that I (and the community) can appropriately work throughthe issues you are facing.

Posts: 4
Joined: Mon Feb 26, 2018 4:51 am
Projects :: No Mod project currently.
Games I'm Playing :: BF2
xbox live or psn: No gamertag set

Re: Help with custom campaign

Postby Lako3000 » Fri Mar 02, 2018 6:50 pm

so what ive currently done does achieve my goal to an extent. i have modified the campaign levels but i have to override them inside the gamedata of the actual game, it wont work with addon files.\
i modified the level scripts, for example mygc_c.lua and so on. then i just got all the level contents from assets and munged the lvl. then i copied the myg.lvl from the addon folder into the actual game lvl_pc files to get it to work.

all i really wanted to do was have 2 campaign options, the original campaign, and my edited version.
My edited version is nothing special, it just changes all the timed objectives to 1 second long, (just a fun little thing for me and a few other speedrunners of the game)

Lieutenant General
User avatar
Posts: 672
Joined: Sat Sep 22, 2012 3:41 pm

Re: Help with custom campaign

Postby Nedarb7 » Tue Mar 13, 2018 11:43 pm

Okay, so here's a list of things you'll need to do:
  1. At the end of the custom campaign tutorial you'll notice this line: "Now all you need to do is load the scripts through the mission REQ file like an era or game mode mod." This is an important step. Since you are modifying the stock mission scripts you'll want to give them a new name in your mission REQ file, say something like "corMc_c" in place of "cor1c_c" for example
  2. Change the names as prescribed above for each of the names of your corresponding REQ files (in data_ABC/Common/mission)
  3. Change the names as prescribed above for the names found within each of the corresponding REQ files (the same ones as in the previous step)
  4. Change the names as prescribed above for the mission LUA files themselves
  5. Use the same naming system when you do your custom campaign setup in the addme LUA. Where <ABC> = corM, <era> = c, <mode> = c using our example. Your campaign setup will include all the campaign missions. Any mission that you haven't changed should be left with the stock naming (so say you don't modify Hoth, the lua for Hoth would be the stock "hot1g_c")
  6. Any mission that you haven't changed does not require an AddDownloadableContent call, and should be excluded from steps 1-4

There should be no need to copy over the actual world LVL files into the stock game based off what you say your modifications to the campaign are. Implementation should follow the pattern outlined above.

I apologize for the delay.

Return to SWBF2 Modding

Who is online

Users browsing this forum: No registered users and 1 guest