Forum Mod Bakery Docs

How to swap levels

Posted in Support
Please login to contribute to the conversation.
Ever wondered how mods such as Late Night at the Kwik-E-Mart, Mischievous Night (in development) and TOS EP3 (in development) have levels switched around, Well i'm going to show you how you can do this. Firstly, let's just say i assume you know how to set up a mod for Lucas' Mod Launcher, if you don't here's a link how to. (Click Me!)

Switching Levels is where you take for example Level 6, and swap it in place for Level 1, thus making Level 6 the first level. In this example i will be showing you how to swap Level 2 for Level 1, this can be applied to any level conversion you want to do. For example: Level 3 turned into the Level 5 map.

[b]Getting the necessary files and the conversion process[/b]

These files you MUST have:
-art\L2_Terra.p3d
-art\missions\level02\L2_doors.p3d
-scripts\missions\level02\

(^^^Copy the whole level02 folder, this is because without the mission and level scripts the game will crash upon loading the level etc)


Step One:

Alright, so you have located these files and hopefully have now pasted them into the corresponding folders in your mods folder, now we can begin the real work. Firstly, start off by opening up your l2_doors.p3d from the art\missions\level02\ folder in your mod.

You will see a multicontroller and a composite drawable.

Rename the 'l2' to 'l1' in both the Multicontroller and Composite Drawable titles. Now, close the .p3d and rename the l2_doors.p3d into l1_doors, Once that is done you should now rename the art\missions\level02 folder to level01. Alright, now onto the next step.

Step Two:

Okay, go back to your art folder, you should have your L2_TERRA.p3d. You don't need to open this up just rename the file to 'L1_TERRA.p3d'. Go into scripts\missions\level02 and open up your Level.mfk. Search for this line of code

LoadP3DFile("art\missions\level02\l2_doors.p3d");

Previously, we had renamed both the folder it's contained in and the l2_doors.p3d itself so we need to edit this line of code to match up. Rename the line of code to read

LoadP3DFile("art\missions\level01\l1_doors.p3d");

Everything is a-okay, now for those final touches in order to get this fully operational. Go back into the scripts\missions\ folder. You should see level02 still there, rename that into level01, now you have a operational swapped level.

Issues and Bugs related to this

This can cause alot of glitches but is a pretty good thing to utilize in your mods, here are some of the issues it causes. However, most of them are easy to rectify.

- Cards not displaying upon collecting them. (fixable)
- Radar map is still the previous levels (Easily fixable, just copy l2hudmap.p3d from it's respective folder and paste it into the respective folder in your mod and rename it to l1hudmap.p3d, or whatever level you're doing the switch with)
- Music is wrong (Fixable with doing a path redirection on the rms files)

WARNING:
If you do a level swap, using an NPC as a playable character using Jake's Character Generator may cause interior bugs, if you have a mission that contains a stage within an interior, once you finish that stage and want to get out
you CANT so be aware that it is advised to stick to vanilla game characters!

You'll also need to edit the rewards file to fix Car/Clothes shop crashes
[deleted user]
8 yrs ago (Statistics)
@Munky99

This is an awesome tutorial! I can see you put a lot of effort into it and it's something that a lot of people (myself included) didn't know how to do before. Thanks for posting!
No problem, glad to help.
Thanks for the help!
Might be pointless to post in a 2m old thread, i swapped my Modded Level 4 with Level 1, so Street Races... all fine, but Bonus Missions can't be done? i changed cbg to cletus and still can't talk to him... any Help?
Other thing i need, is to know the Name of L4 Music (i don't know) to make a path redirection in level 1.
please :)
dose it works with lua files? i was trying to swap level4 to level 5 from donut mod