How to edit a shipped map! SUPER EASY! (FAQ)

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

mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by mswf »

Oh, but you can do that in a much more efficient (memory-wise) way.
Instead of copying over the entire world folder, you can also simply load the stock map in your .lua and save tonnes of memory. Look at the stock script that you're wanting to edit and copy the lines that specify which world files it's loading and copy those over to your own .lua.

Since it seems you're more going for a side mod, you should read the FAQ topic:
http://www.gametoast.com/forums/viewtop ... 96#p287596
instead of this one. Good luck :)
Coley
Sergeant Major
Sergeant Major
Posts: 249
Joined: Sun Aug 09, 2009 11:27 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: Germany

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by Coley »

Couldn´t you use just one topic then two about the same problem..? :?
User avatar
skelltor
Sith
Sith
Posts: 1431
Joined: Fri Dec 11, 2009 6:24 pm
Projects :: BFSM
Games I'm Playing :: SWBFII
xbox live or psn: skelltor95
Location: minisnowta
Contact:

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by skelltor »

i tried what he said but when i opened up bfII i got a ctd b4 it got to the profile page help please
User avatar
Fiodis
Master of the Force
Master of the Force
Posts: 4145
Joined: Wed Nov 12, 2008 9:27 pm
Projects :: Rannoch + Tientia + Tools Programming

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by Fiodis »

As there are a number of things that could be wrong, it's best to open up a new topic, IMO. And post the error log. And say exactly who you mean by "he".
Fishman92
Private Recruit
Posts: 18
Joined: Wed Nov 17, 2010 6:45 pm
Projects :: Mygeeto Platforms
Location: Oxfordshire, UK
Contact:

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by Fishman92 »

i followed this just fine. I loaded up the map in ze, edited it ALOT, but made sure i left the command posts alone etc. I then munged my level (no errors AFAIK). I open bf2, select my map, which gets to the spawn/unit select screen. However, there are literally 0 command posts on the map to spawn from!
Any ideas on how to fix this?
Jaspo
Command Sergeant Major
Command Sergeant Major
Posts: 282
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set
Contact:

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by Jaspo »

i want to edit wich hero are used and unit line up unit ammount what units are used stuff like that
In that case, my fellow Minnesotan, you failed to read Teancum's post:
Hidden/Spoiler:
[quote]You can actually streamline it yet again if you are only doing side changes (no changes to the physical map) by loading the default map asset:

ReadDataFile("kam\\kam1.lvl", "kamino1_conquest")

No reason to load a map from the addon folder if you're not using it. It also makes the download size much smaller. [/quote]
In other words, your mission scripts with all your side and hero changes need only load the stock map from it's original location, so you can delete all the "map" stuff from your addon folder (you won't need the default munged map or any of its assets if you're loading a stock map in your mission scripts)
User avatar
sim-al2
2nd Lieutenant
2nd Lieutenant
Posts: 412
Joined: Mon Jul 06, 2009 10:26 pm
Projects :: Mapping on occasion
Games I'm Playing :: SWBFII + MW4 + SC4
Location: In the cockpit of some vehicle...

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by sim-al2 »

errr... you quoted a message from Feburary Jaspo...

@Fishman: Could you post your game debug log? If you don't know what that is its in the Everything You Need To Know FAQ Thread.
christien62
Private Recruit
Posts: 18
Joined: Tue Mar 19, 2013 5:31 pm
Projects :: No Mod project currently.
Games I'm Playing :: Swtor SWBF2
xbox live or psn: No gamertag set

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by christien62 »

every time i start my game it crashes as soon as i spawn or at the end of loading
AGuyWhoWantsToMod
Recruit Womprat Killer
Posts: 7
Joined: Mon Feb 08, 2016 6:25 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBF2 and KOTOR
xbox live or psn: No gamertag set

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by AGuyWhoWantsToMod »

Frisbeetarian wrote:The way posted above is a little round-about, and keeps unnecessary files, here's an easier way:

1. Make a new map. For example purposes, this map will be called ABC and the shipped map used will be Kamino (KAM).

2. Go to …\BF2_ModTools\data_ABC\Worlds\ABC and delete the world1 folder.

3. Go to …\BF2_ModTools\assets\worlds\KAM and copy all the contained folders; they should be: effects, msh, MUNGED, odf, and world1.

4. Paste those folders to: …\BF2_ModTools\data_ABC\Worlds\ABC.

5. Go to …\BF2_ModTools\assets\scripts\kam and copy the contents of the scripts that correspond to the game modes of the newly created map. Paste the copied contents into the corresponding files (in …\BF2_ModTools\data_ABC\Common\scripts\ABC), deleting the old contents (ex. KAM1c_con.lua -> ABCc_con.lua). (Alternatively, copy the scripts from KAM, paste them alongside the scripts for ABC, delete the corresponding scripts and rename the KAM scripts to match the old names.)

6. In each of the new .lua scripts go to the line where it loads the world:

Code: Select all

ReadDataFile("kam\\kam1.lvl", "kamino1_conquest")
and change it to:

Code: Select all

ReadDataFile("dc:ABC\\kam1.lvl", "kamino1_conquest")
7. The process is now complete. When editing the world with Zeroeditor, open kamino.wld from …\BF2_ModTools\data_ABC\Worlds\ABC\world1.

I followed your instructions but after that I munged the files, when i try loading my map it just CTD's with no error. Any suggestions?
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by AnthonyBF2 »

AGuyWhoWantsToMod wrote: I followed your instructions but after that I munged the files, when i try loading my map it just CTD's with no error. Any suggestions?
The OP is 5 years old, it's recommended you make a new topic for your issue in swbf2 modding section rather and reviving ancient ones. :wink:
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by MileHighGuy »

Huge bump, but I just figured this out.

You can load another layer on top of a stock map to add new objects and vehicle spawns, but what if you want to change the existing ones?

You can change this

Code: Select all

ReadDataFile("GEO\\geo1.lvl", "geo1_conquest")
to this

Code: Select all

ReadDataFile("GEO\\geo1.lvl")
ReadDataFile("dc:TS1\\TS1.lvl")
Where TS1.lvl is just a level that is equal to the old geo1_conquest.lvl

I copied geo1_conquest.mrq and renamed it to TS1.req (my maps name) so it would be munged (there might be a better way to do that)...

I added all the items (layer files, path files, etc..) specified by the geo1_conquest.mrq and put it in my world1 folder. I changed a vehicle spawn in the .lyr file and the change was reflected in the new map.
Last edited by MileHighGuy on Tue Dec 24, 2019 12:39 pm, edited 1 time in total.
User avatar
AnthonyBF2
Sith
Sith
Posts: 1255
Joined: Wed Aug 21, 2013 3:55 pm
Projects :: PS2+PSP Overhaul

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by AnthonyBF2 »

You can manipulate existing vehicle spawns using SetProperty()
MileHighGuy
Jedi
Jedi
Posts: 1194
Joined: Fri Dec 19, 2008 7:58 pm

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by MileHighGuy »

That doesn't seem to work for vehicle spawns. And anyway, you can do more with a layer than just that.
Vader2021
Posts: 2
Joined: Wed Jun 02, 2021 9:49 am
Projects :: No Mod project currently.
Games I'm Playing :: SWBF 2
xbox live or psn: No gamertag set

Re: How to edit a shipped map! SUPER EASY! (FAQ)

Post by Vader2021 »

i did this and the game loaded but zero editor crashes after a few seconds
Post Reply