Page 2 of 2

Re: Problem with the asj.lvl's Asajj Ventress.

Posted: Tue Jun 17, 2014 4:35 am
by Maveritchell
Indytotof wrote:Yes. I just drop asj.lvl into the stock side folder. No script change execpt "ReadDataFile("SIDE\\asj.lvl","cis_hero_ventress") and (SetHeroClass(CIS ,"cis_hero_ventress").

Hopt it's helped.
Oh, so no changes except for the changes. How could I miss that?

One more time:

How are you loading in your munged scripts? Are you compiling them into a replacement mission.lvl (the stock one)? Are you making an addon mod? If you're making an addon mod, why did the addme.lua you posted only have two scripts loaded into it (and neither were the default missions)? I can't help you if you're going to be frustratingly nonspecific.

Re: Problem with the asj.lvl's Asajj Ventress.

Posted: Tue Jun 17, 2014 6:49 am
by Indytotof
First one. Replacing the pre-existing mission.lvl.

Re: Problem with the asj.lvl's Asajj Ventress.

Posted: Tue Jun 17, 2014 1:27 pm
by Maveritchell
Then your issue is pretty clear - your loaded scripts don't call in your addon localization files from the right location. Unless you're totally rewriting core.lvl (which I have to assume you're not), you need to call in the core.lvl from your addon mod. Add the following line to the very top of each of your replacement mission scripts (e.g. fel1c_1flag, etc.). This assumes that your addon folder with the new localizations is called "BF2":

Code: Select all

ReadDataFile("..\\..\\addon\\BF2\\data\\_LVL_PC\\core.lvl")
The top will look like this (excerpted, so this isn't the whole thing, and this is obviously from a 1flag map, so don't copy-paste this into a conquest map):

Code: Select all

--
-- Copyright (c) 2005 Pandemic Studios, LLC. All rights reserved.
--

ScriptCB_DoFile("setup_teams")
ScriptCB_DoFile("ObjectiveOneFlagCTF")

ReadDataFile("..\\..\\addon\\BF2\\data\\_LVL_PC\\core.lvl")

--  These variables do not change
ATT = 1
DEF = 2
That'll fix your original problem. Obviously, you've tried a few things since then and we can sort that out too if you want, but you seemed to prefer the simplicity of the first solution. The bottom line is that if you make changes and you expect for them to be apparent, they have to be loaded into a script somewhere, which is why I kept asking about what and where your script changes were.

Re: Problem with the asj.lvl's Asajj Ventress.

Posted: Tue Jun 17, 2014 2:50 pm
by Indytotof
The thing is I don't use an addon mod. But I'm thinking I must do it.

No, I didn't touch the core.lvl (since I don't know what to do for that purpose).

OK, why change is on my data_***/common/scripts and I just replace cis_hero_jangofett (and darthmaul, on Yavin 4) by cis_hero_ventress using this following codes:

Code: Select all

ReadDataFile("SIDE\\asj.lvl","cis_hero_ventress")


and

Code: Select all

SetHeroClass(CIS, "cis_hero_ventress")
I've next successfully munging it, deleted my addon mod (who are by now useless), copy/paste the munged mission.lvl into the pre-existing lvl_pc folder and add the asj.lvl file into the side folder located in the same folder as mission.lvl. That's all.

Hope it helped you.

Thanks for your submission though, I will try it when I can (i'm a little busy for the instance).

Re: Problem with the asj.lvl's Asajj Ventress.

Posted: Tue Jun 17, 2014 2:54 pm
by DrDrSheldonLeeCooper
Doesn´t it has to be ReadDataFile("dc:SIDE\\asj.lvl","cis_hero_ventress") ?

Re: Problem with the asj.lvl's Asajj Ventress.

Posted: Tue Jun 17, 2014 2:55 pm
by Indytotof
DrDrSheldonLeeCooper wrote:Doesn´t it has to be ReadDataFile("dc:SIDE\\asj.lvl","cis_hero_ventress") ?
If it was using as a custom side. I don't use it as a custom side, because I add the asj.lvl in the pre-existing "side" folder. So no, there is no "dc:" to add.

Re: Problem with the asj.lvl's Asajj Ventress.

Posted: Tue Jun 17, 2014 3:00 pm
by DrDrSheldonLeeCooper
oh, I do that every time sorry ^_^

Re: Problem with the asj.lvl's Asajj Ventress.

Posted: Tue Jun 17, 2014 3:01 pm
by Indytotof
No problem. Everyone make mistakes.

Re: Problem with the asj.lvl's Asajj Ventress.

Posted: Tue Jun 17, 2014 3:08 pm
by Maveritchell
Indytotof wrote:The thing is I don't use an addon mod. But I'm thinking I must do it.
You can do whatever you want. You can make just the folder location I'm talking about. My point is this:

The game has to draw its localizations from somewhere. You can't just edit them in the localize tool and hope really hard that the game knows you made the changes. Just like everything else, you have to munge your changes and then call for it in a script somewhere. When you munge localizations, it creates a core.lvl (by default, but you can call this file whatever you want). It can go anywhere you want it to. You have to call for it in the script, though.

1) Munge your localization changes
2) Put them somewhere
3) Call for them in your scripts

You can do exactly what you want to do with minimal changes if, instead of deleting your addon folder (after copy-pasting your mission.lvl to the main _LVL_PC directory), you just leave it there and do what I said above. You're overthinking this.

You can make an addon mod, you can make a stock mission.lvl mod, you can do whatever. Both of those can accomplish what you want to do. The only thing you can't do is make changes and then never call for them in a script.

Re: Problem with the asj.lvl's Asajj Ventress.

Posted: Thu Jun 19, 2014 1:35 pm
by Indytotof
Indytotof wrote:Ah OK.

All I've to do is to add the code you post in my mapslua files ? And add the core.lvl on an addon mod ?

For the addon mod, did I can deleting the addme.script (since I don't even need to add anything on the game except the pre-existing maps' modification) ?

Thanks so much guy.

That's worked ! Thanks !

This topic can be locked.