LevelName.postfxpreset.cs is not loaded automatically

Scripting questions, discussions, etc
5 posts Page 1 of 1
noemen
Posts: 106
Joined: Tue May 29, 2018 3:46 pm
 
by noemen » Sat Sep 05, 2020 6:10 pm
How is LevelName.postfxpreset.cs loaded?

Because I made some changes in my game ... The levels are no longer in the "levels /" folder, but in "models / levels".

After the change everything worked fine, but now when entering the level the postfxpreset is not loaded automatically.

Any light?
Jason Campbell
Posts: 364
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Sun Sep 06, 2020 7:03 am
Use a text editor that can search the whole project. I use one called Atom. Search for the filename. In the console, it seems to load with the PostFX manager?
noemen
Posts: 106
Joined: Tue May 29, 2018 3:46 pm
 
by noemen » Sun Sep 06, 2020 8:04 am
Use a text editor that can search the whole project. I use one called Atom. Search for the filename. In the console, it seems to load with the PostFX manager?
Yes yes ... The PostFX manager configuration works (I save the preset). The problem is that when I left the level and try to enter again, the preset that was saved is not loaded (since I applied it previously). Even if the preset is renamed correctly ... when entering the level, the preset is not loaded.
fLUnKnhaXYU
Posts: 182
Joined: Wed Nov 15, 2017 8:19 am
by fLUnKnhaXYU » Sun Sep 06, 2020 9:37 am
I was a bit hesitant to post this because if some standard exists to activate the
postfxpreset file , I do not know what it is . ok

in the .mis file I add a property to "TheLevelInfo" which I call pfx , the value is the
path to the postFXpreset file
like this

just examples-
pfx = "./levels/postFXpresets/somefile.postFXpreset"
-or-
pfx = "./levels/konserian/konserian.postfxpreset.cs"

then in the file
./scripts/client/missiondownload.cs
function onMissionDownloadComplete()

i add these
--------------------------------------
exec(thelevelInfo.pfx);
postfxmanager.settingsapplyfrompreset();

volFogControl(); //-- see following for explanation
--------------------------------------

Also , in in one of my levels I use volumetric fog which was being disabled after
applying the postFx so i added a function named volfogControl which I call after
applying the postFX .For this I add another variable to the "theLevelInfo which I
call volfog and give it the string value of the volumetric fog

volfog = "lakeFun01Volfog01";

I added this function to the same file
-------------------------------------

function volfogcontrol()
{
%volfog = theLevelInfo.volfog;
//echo("++++VOLFOG = " @ %volfog);

if(thelevelinfo.volfog !$= "")
{
echo("--------TURN ON VOLUMETRIC FOG----volFogControl-" @ %volfog);
%volfog.hidden = true;
%volfog.hidden = false;
}
}

---------------------------------

Like I said , I just try to make things work so , just disregard any comments ,
I use them to help me solve little problems . And if you find any of it to be
ridiculous , I'd only benefit to now what it is .
Duion
Posts: 1648
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Sun Sep 06, 2020 11:48 am
Btw putting levels into models/levels is a stupid idea, it makes no sense, but it should not make any difference where the levels are, I think the function searches for the levelname with the suffix postfxpreset.cs and if not then change the function to do that.
5 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests