Modding ENV and CSV files tutorial :)

+
1- create file GetEnvs.ws and put this in new mod folder in script folder
copy this :

exec function qwe()
{
var envs : array<string>;
var message : string;
var i : int;

GetActiveAreaEnvironmentDefinitions(envs);
for (i = 0; i < envs.Size(); i += 1)
message = message + " " + envs;

theGame.GetGuiManager().ShowUserDialogAdv(0, "envs", message, 0, UDB_Ok);

In game use console type qwe , you can see Env fils in fonction
 
Now Edit your env file with Environment Parameter UI
turn off sky bloom end fog
set Sun size end color
Now turn on sky
edit sky/sun parameter

next edit fog and bloom
 

Guest 3841499

Guest
jack91;n9893341 said:
1- create file GetEnvs.ws and put this in new mod folder in script folder
copy this :

exec function qwe()
{
var envs : array<string>;
var message : string;
var i : int;

GetActiveAreaEnvironmentDefinitions(envs);
for (i = 0; i < envs.Size(); i += 1)
message = message + " " + envs;

theGame.GetGuiManager().ShowUserDialogAdv(0, "envs", message, 0, UDB_Ok);

In game use console type qwe , you can see Env fils in fonction


Error [modenvui]getenvs.ws(11): Unexpected end of file found after '{' at line 2
 

Guest 3841499

Guest
Nothing changes no matter what values and scalar I select and its way too tedious to use that utility. I think changing values with W3Edit, packing, and checking is easier, but doing that has the same result - nothing changes, unless I remove all parameters, in which case lighting does change. No idea exactly what to change and how and what values to try... Where do I turn off sky bloom and fog? Which values do I adjust for size? There are so many sun and moon and fog and what-not settings...

Here's my current setup - https://drive.google.com/file/d/1T4N...ew?usp=sharing

P.S. - Yes, I know I need to rename SkyORG to Sky, but that does not produce a difference either... I am OK with color and night-time darkness is not as big of a deal with Darker Nights mod. Main priority - sun SIZE and sun BRIGHTNESS, assuming sun brightness affects overall environment brightness...

sunColorSkyBrightness - set from 3 to 1
sunAreaSkySize - set from 3 to 1
globalSkyBrightness - set from 3 to 1

NO difference in lighting...
 
Last edited by a moderator:

Guest 3841499

Guest
Maybe its not brightness that is the issue, but the bloom part? Its also possible that reducing brightness will also reduce the accuracy of lighting.

I am perplexed.as to why there is cut scene lighting ENV and Novigrad 2013 ENV that is the default ENV for cut scene lighting..?
 
MonarchX;n9893821 said:
Nothing changes no matter what values and scalar I select and its way too tedious to use that utility. I think changing values with W3Edit, packing, and checking is easier, but doing that has the same result - nothing changes, unless I remove all parameters, in which case lighting does change. No idea exactly what to change and how and what values to try... Where do I turn off sky bloom and fog? Which values do I adjust for size? There are so many sun and moon and fog and what-not settings...

Here's my current setup - https://drive.google.com/file/d/1T4N...ew?usp=sharing

P.S. - Yes, I know I need to rename SkyORG to Sky, but that does not produce a difference either... I am OK with color and night-time darkness is not as big of a deal with Darker Nights mod. Main priority - sun SIZE and sun BRIGHTNESS, assuming sun brightness affects overall environment brightness...

sunColorSkyBrightness - set from 3 to 1
sunAreaSkySize - set from 3 to 1
globalSkyBrightness - set from 3 to 1

NO difference in lighting...

Ok Get my modlink end you can use it.

Then, for explain this:



You still can change values but those settings are not reflected visually until all of the blended envs are deactivated (and then it's the default env again). The mod provides a console command for this:

envui_disable_envs()

This command remove All Over Defaut env(s) parameters

after remove it

then type in console qwe

Now you ave just one env file loaded

Now you can use EnvironementUI for change parameters

Edit env All Env files in order 1-All Over Defaut env(s) parameters,2- in last Defaut env
 
verdwhisper;n9894741 said:
Has anyone figured out how to edit blended envs in realtime, please?

Same

1-Edit by Defaut env
2-Then copy parameters in env IN Over ,But , Cutsene_definition is active just in Cutscene over Defaut env


envui_disable_envs()

This command remove All Over Defaut env(s) parameters



 
jack91;n9895171 said:
1-Edit by Defaut env 2-Then copy parameters in env IN Over ,But , Cutsene_definition is active just in Cutscene over Defaut env
Thanks. I tired this method, but what I see in editing is not the final result because of envs blending, maybe I should disable blending? Are blending parameters stored in w2l?
 
verdwhisper;n9895571 said:
Thanks. I tired this method, but what I see in editing is not the final result because of envs blending, maybe I should disable blending? Are blending parameters stored in w2l?

You can remove all parameters Over Defaut env(s)

exemple in cutscene env remove Global light and the game load Global light from Defaut env in cutscene game.
 

Guest 3841499

Guest
The overly bright sun and its overly big size definitely comes from the novigrad dash dot 2013 part, so blended or not, that's the one that needs editing because removing all parameters from that file does make the sun smaller and nowhere nearly as bright, but at the cost of very sucky inaccurate lighting. Therefore, changes in lighting should be visible when editing that file, but they are not. If you looked at my CSV file, then you'd see everything is fully blended (value of 1)...
 
you have to do several tests.
I use the green color to identify the lighting.

In this video , W2 modkit you can see change parameters for light.
 
Last edited:
Option 1- with DLC
Option 2- without DLC

For Option 1- Just uncoock this mod https://rd.nexusmods.com/witcher3/mods/1402/?
Remove all jest keep DLC And content folder remove script in this folder
Next uncook DLC now you ave in this folder env files , you can change it with W3Edit.
Next change Wether in mod folder, uncook it, then open csv in Cooked\engine\environments
edit files with Excel or notepad++


Option 2- edit csv in Cooked\engine\environments and env files in Cooked\environment.

Delete files you do not want and repack.
 
Last edited:
I was thinking about option1 since I need to add more weather types, but I am kinda worried if it is considered unethical to edit other people's dlc, because I may upload it eventually. Thanks Jack, you are very helpful.
 
You need author permission if u use his file.

If its just folder structure, its OK.
 
Last edited:
verdwhisper;n9938041 said:
I was thinking about option1 since I need to add more weather types, but I am kinda worried if it is considered unethical to edit other people's dlc, because I may upload it eventually. Thanks Jack, you are very helpful.
If you want create new, just change env files in dlc folder
example: copy env_prolog_colors_v1_b_sunset.env in your DLC mod and rename by Wether_fog.env
next change line in envPath for csv files for dlc\.....\data\environment\definitions\mymod\Wether_fog.env
 

Guest 3841499

Guest
This tool is finally helping! Not so much with editing real-time, but with identifying loaded ENV. I have already gone through ALL w2scene files and disabled all fake light sources. It worked, BUT there are these dialogue scenes, NOT parts of w2scene files, where lighting still changes, even though ALL dialogue light and camera light parameters were disabled entirely in
- dashdot_env_nvg_global_23_07_2013_copy
- cutscen_definition_global
- cutscen_definition_kaer_morhen

I also set ALL weathers to use dashdot_env_nvg_global_23_07_2013_copy and set Blend to 1 everywhere. It may seem stupid, but when used with TookaFace's Custom Clouds mod (w2p FX only, not ENV files), it actually works rather well. In fact, I think transitions and realism are superior to vanilla lighting, where a weather ENV file would overwhelm and overhaul the whole environment. Dark clouds, fake shadow, and FX are enough to create realistic weather FX.

I am SO SO SO close to making sure that in-game lighting = cut-scene lighting 90% of the time and 90% of the way. I don't think 100% possible because I think light SOURCES are scripted to increase in brightness during certain scenes and dialogues, For example, opening scene with Geralt in tub no longer have fake light sources and in-game lighting is ALMOST like cut-scene lighting with my mod mix, but you can still see the difference when you walk up to Yenn for a dialogue. I hope I can use the Env RealTime UI tool to identify the exact ENV files that get activated when cut scenes start.


BTW, I also achieved success in using those XBM Look Up Table shader files (balance maps). They surely make a difference, especially the neutral test shader one. I may be new to W3 modding, but I know about look up tables and how they create "filters". Anyone who wants to create their own custom ENV files should definitely use the neutral test shader balance map and set amount to 1. Did anyone notice that there are at least 2 ENV files in Nomansland that are linked to engine\debug.xbm? Its not a real balance maps... Also, for Toussaint there is "big eyes" XBM balance map and its the only file name that "space" in it... Are those game bugs or intentional?

Anyway, off to do more testing! Such a shame - if I succeed, nobody except for me will enjoy my lighting mod mix because nobody cares for in-game lighting being identical to cut-scene lighting...
 
Top Bottom