How to modify .lua files from BFII Mod Tools directory

Started by Fluffy, August 26, 2016, 10:01:52 AM

Previous topic - Next topic
Hey !
I have downloaded  BFII Mod Tools, and i have installed it near my BFII game folder, but now i've got a problem about the modification of the popup_vote.lua.
In brief, I shall wish to be able to modify certain files of SWBFII, thus I began with a quite small change which would allow me to see if I take myself there in a right way or at all. And this change, it is the length of the popup vote (displayable in multiplayer, on a server...). Thus by opening this file in Notepad ++ (he is in data/Common/scripts), and the variable in the line 9. I put a random number, as 900, but once the changed number, I do not know how to see the modification in game.
Thank you in advance =)

I watched this tutorial :
But when i need to restart the Modtools VisualMunge (2 min's in the video), this following error happened :



I believe popup_vote is munged into common.lvl

To make a common.lvl you first need to get the scripts from assets\scripts\pc and copy them to data_mod\common\scripts.

Next make the edits you want, which I guess is popup_vote. Right click on munge.bat in the build folder and make sure common is checked or on 1 then run munge.bat.

Munge.bat is a manual way to munge and does more than visual munge actually, I personally almost never use vm anymore.
Never let a person named AnthonyBF2 touch your BF2.

This is a .rar of my data_mod (or data_PLA). When i run the munge.bat, from BUILD folder, a window appears, but one half second after, it diseaspears. So i don't know if it has worked, it my .lua has been correctly munged or not. And furthermore, there's is another thing that i'm not sure, it's your sentence :
Quote from: Anthony_band make sure common is checked or on 1 then run munge.bat.
What it means ? I don't understand how can i "check" a folder while running munge.bat ?
I have also seen, there's another munge.bat in build/common folder. I have run it, but same problem of window....
Thanks in advance

EDIT = I tried at the moment to modify dea level by allowing the main door to be opened in ctf1 flag in galactic civil war mod. But there's again another problem, the window of all munge.bat i have opened, stills disappears after 1 sec...
For more informations about the lua edit, i have read the dea1g_1flag.lua into Notepad++ (data_mod/common/scripts folder), and i have replaced the 0 (line 30) with a 1 to "tru" value, i think ? Thus that looks like that :
SetProperty("Dr-LeftMain", "IsLocked", 0).

Thanks in advance for my munge.bat problem =)

I reinstalled BF2 modtools and the Visual C++ error has disappeared. But when i try to munge, logs here :

Munging addme.lua...done.
Copying files to Battlefront II directory:
"C:\Users\pc\Desktop\Jeux Installés\Star Wars Battlefront II\GameData"
Addon dir exists, continuing...
Mod dir "PLA"exists, continuing...
Copying addme.script to mod dir...done
Copying "mission.lvl" to modDir\data\_LVL_PC\...done
Copying "core.lvl" to modDir\data\_LVL_PC\...done
Copying "PLA" to modDir\data\_LVL_PC\...done
Copying "SIDE" to modDir\data\_LVL_PC\...done
Munge process finished
\Skype\Phone\ ,tait inattendu.

All seem to work if we trust the console. But when i'm in the addons folder of my BF2 directory (in gamedata), nothing in PLA/data/_LVL_PC/....No lvl munged files...

Quote from: Plaigon on August 30, 2016, 06:59:34 AM
I reinstalled BF2 modtools and the Visual C++ error has disappeared. But when i try to munge, logs here :

Munging addme.lua...done.
Copying files to Battlefront II directory:
"C:\Users\pc\Desktop\Jeux Installés\Star Wars Battlefront II\GameData"
Addon dir exists, continuing...
Mod dir "PLA"exists, continuing...
Copying addme.script to mod dir...done
Copying "mission.lvl" to modDir\data\_LVL_PC\...done
Copying "core.lvl" to modDir\data\_LVL_PC\...done
Copying "PLA" to modDir\data\_LVL_PC\...done
Copying "SIDE" to modDir\data\_LVL_PC\...done
Munge process finished
\Skype\Phone\ ,tait inattendu.

All seem to work if we trust the console. But when i'm in the addons folder of my BF2 directory (in gamedata), nothing in PLA/data/_LVL_PC/....No lvl munged files...

Tu as essayé mes tutos? Le 7 devrait peut être fonctionner ;)  http://www.battlefront.fr/forums/mods.49/
De plus il est hautement recommandé de mettre le Modtool directement derrière C/
J'espère que le 7 vas marcher ;)
"When will you fools learn? No one escapes Commander Fox"
—Fox, after apprehending another criminal

https://media.giphy.com/media/2GjgvS5vA6y08/giphy.gif

Ah ! Qu'est-ce que c'est cool de pouvoir parler à un Français ici ^^
En fait j'ai bien compris qu'il pouvait y avoir des erreurs (problèmes d'accents...), si le dossier n'était pas situé à la racine de C/
Du coup j'ai désinstallé le Mod Tools et l'ai réinstallé juste dans C/
Au final après maintes tentatives de munge, rien ne marchait, donc j'ai décidé d'installer un fix dont j'avais entendu l'existence. Mais je n'avais pas pris ton lien, d'ailleurs je ne connaissais même pas tes tutos.
Du coup, là je viens de download, puis d'installer ton patch. J'ai lancé le .bat, et tout semble fonctionner, alors qu'avant la fenêtre n'apparaissait qu'une demie-seconde. J'édite mon message, une fois en jeu pour tester mes modif's...
Encore une fois merci à toi ;)

EDIT = L'opération s'est bien terminée, suivi de l'ouverture du fichier .txt PC_MungeLog, mais j'ai vite fait d'avoir jetté un coup d'oeil à son contenu que je m'aperçois qu'il y a une erreur :/
Tiens voici tous les logs : http://pastebin.com/3qscaCNs
Je vais tester en jeu...

EDIT 2 = Le dossier data_mod/_LVL_PC/ s'est bien crée et m'a extrait plein de choses. Mais dès que j'essaie de remplacer les .lvl de base de mon jeu (ceux du patch v1.3 non-officiel), par ceux munged. En gros il y a common.lvl, core.lvl, ingame.lvl, inshell.lvl et mission.lvl, eh bien le jeu crash au démarrage. A la base je voulais juste faire ouvrir une porte du level Death Star en flag mode civil galactif war. j'avais bien modifié le bon endroit dans le fichier .lua, mais dès que j'ai mung et que je me suis rendu dans le dossier data_mod/_LVL_PC/DEA/ le contenu était vide. Une idée du coup ??