How do I use a common.lvl?

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
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

How do I use a common.lvl?

Post by Anakin »

Hi,

i just changed some things in the data_XXX/common/common.req file, but nothing changed ingame. So i was wondering what file opens the common.lvl file?? i haven't found something like
ReadDataFile("common.lvl") in the addme or the luas. So what file opens the common??

EDIT
Doesn anyone know how i correct use the common.lvl??

I just tryed to remove the stock one with my one and now at starting BF2 it prompt me a screen from playstation(?) press start to begin -.-


==EDIT==

maybe someone know how it works with an custom user script.

All i need to do is overwrite some common scripts to take an other font.
User avatar
Locutus
1st Lieutenant
1st Lieutenant
Posts: 420
Joined: Fri Jun 04, 2010 10:08 am
Projects :: Stargate Battlefront Pegasus
Location: Germany
Contact:

Re: how to use a common.lvl??

Post by Locutus »

I might be wrong but shouldn't this be it:
Make Custom User Scripts.txt from Zerteds 1.3 patch (\addon\AAA-v1.3patch\docs\howtos):
Hidden/Spoiler:
Overview
* This tutorial will guide you through munging a custom lvl file

Requirements
* SWBF2 mod tools
* Basic understanding of modding
* Basic understanding of the munge process

How To Do It
1) This guide will assume the mod map is XXX
2) Create the folder: "data_XXX\Shell"
3) Create the text file: "data_XXX\Shell\shell.req"
4) Create the folder "data_XXX\Shell\scripts"
5) Create the script file: "data_XXX\Shell\scripts\test.lua"
6) In shell.req, add the following code. The 'test' should match the name of the script created in step 5, but without its file extension:

ucft
{
REQN
{
"script"
"test"
}
}

7) Open VisualMunge, click "Unselect All", check "Shell", click "Munge"
8) When VisualMunge finishes, it will have created the lvl file: "data_XXX\_LVL_PC\shell.lvl"
9) Rename shell.lvl to whatever name you need, then move it to where you need the file.

Notes
* The test.lua script is just an example script file. You should change the req file to reflect whatever it is you are trying to munging.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: common.lvl

Post by Marth8880 »

You load common.lvl the same way you load ingame.lvl. ;)
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: how to use a common.lvl??

Post by Anakin »

Yes but it does nothing for me.

Can someone point me out how this works??

I can also use an global common file, after it wouldn't hurt someone. But after i tried munging the common it seams there is something not correct.

EDIT
I tryed it, but it changed nothing.

So i think my common interface scripts need to be loaded before the stock ones.


==EDIT2==

I now tryed to load the common.lvl in the lua directly after the gamemode was setup.

Code: Select all

Conquest = ScriptCB_DoFile("ObjectiveConquest")
ScriptCB_DoFile("setup_teams") 


ReadDataFile("dc:common.lvl")
That works. now i have the pause menu with text again. But i miss the fake console. Has someone the pausemenu script from 1.3??

The problem is, now when you won there are no stats anymore.
I tryed to load the stock common first, but than my custom things are not overwriten. When i tryed to load my one with only the pausemenu inside and than the stock one i still have no stat screen after winning.

So has someone an idea why this happens?? or even better Has someone an idea if i could make a function in the lua that is loaded at the end of the game, so after you won, to set everything on the stock again (common.lvl and core.lvl)?? that would work, too. But all functions in the lua are loaded before the game started -.-

==EDIT==
ok i now found out that my custom stats are loaded. But than BF goes back to the stock one. So i need to know what lua loades the stats, so i can add there the ReadDataFile("core.lvl").
Post Reply