Difference between revisions of "How to apply (preview) enviroment definitions in Witcher 3"

From Nexus Mods Wiki
Jump to: navigation, search
m
m
Line 1: Line 1:
  
Witcher 3 game uses a lot of enviroment definitions on different locations to create suitable atmosphere or interesting visual effect (remember Iris painted&nbsp;world).<br/> These enviroment definitions are encoded in .env files in game bundles. You can extract them and open with [https://www.nexusmods.com/witcher3/mods/3161?tab=posts WolvenKit], save & change some of it's params.<br/> In general env definition contains many numbers, curves, which describes color, shadow, sunlight, fog params etc.<br/> Also you can use [https://www.nexusmods.com/witcher3/mods/2111/ Realtime in-game Enviroment UI]&nbsp;to change params and preview result in real-time, dump it as yml definition and encode with Radish modding tools in .env finally.<br/> <br/> However here I want to write how to preview and apply (what is the same) vanilla w3 env definitions. Probably it will be useful for scene/quest creation with radish tools.<br/> So, here is my script:&nbsp;[https://pastebin.com/JzBcvw6V [https://pastebin.com/JzBcvw6V]]<br/> <br/> '''If you don't know witcher script language''', just paste it into your ''mod/scripts/local''<br/> And in game (after script rebuilding and launching game) open console, enter command: <span style="color:#ccff00;">''execEnv(<some_number>)''</span><br/> Each&nbsp;.env depot path associated with some number (see&nbsp;testEnv function in script). You will see in-game notification and env will be changed.<br/> <br/> '''If you know witcher script language''', then you can check how to activate/deactivate env according to my script.<br/> Definition of enviroment activating function is:<br/> <span style="color:#f39c12;">''import function ActivateEnvironmentDefinition( environmentDefinition&nbsp;: CEnvironmentDefinition, priority&nbsp;: int, blendFactor&nbsp;: float, blendInTime&nbsp;: float )&nbsp;: int;''</span><br/> <br/> Note - save envID somewhere (I did it using fact) or you won't be able to deactivate your custom env.<br/> Definition for deactivating env:<br/> <span style="color:#f39c12;">''import function DeactivateEnvironment( environmentID&nbsp;: int , blendOutTime&nbsp;: float );''</span><br/> <br/> '''Another way to activate enviroment definitions''' (but more complex) is to use Entity component&nbsp;''CAreaEnvironmentComponent''<br/> - will create some static area with some env inside it, while outside usual env will be used<br/> But it leads to radish-trial 5 (creating custom entity with such component), my yml example: [https://pastebin.com/pYLwH0iD [https://pastebin.com/pYLwH0iD]]<br/> Or to editing .w2ent in WolvenKit, entity path example (which I dumped to create radish deifinition, huh):&nbsp;''dlc\bob\data\fx\cutscenes\cs704_sister_intro\cs704_vision_env.w2ent''<br/> <br/> <font face="Comic Sans MS, cursive"><span style="color:#00cc66;">But I guess you come here to see some pictures or videos, right? Then I will show you all 211 vanilla envs at once (on Toussaint location).<br/> If you have 14 minutes for it, have fun&nbsp;:)</span>&nbsp;[https://www.youtube.com/watch?v=A2sGUAfvgEg [https://www.youtube.com/watch?v=A2sGUAfvgEg]]</font>
+
Witcher 3 game uses a lot of enviroment definitions on different locations to create suitable atmosphere or interesting visual effect (remember Iris painted&nbsp;world).<br/> These enviroment definitions are encoded in .env files in game bundles. You can extract them and open with [https://www.nexusmods.com/witcher3/mods/3161?tab=posts WolvenKit], save & change some of it's params.<br/> In general env definition contains many numbers, curves, which describes color, shadow, sunlight, fog params etc.<br/> Also you can use [https://www.nexusmods.com/witcher3/mods/2111/ Realtime in-game Enviroment UI]&nbsp;to change params and preview result in real-time, dump it as yml definition and encode with Radish modding tools in .env finally.<br/> <br/> However here I want to write how to preview and apply (what is the same) vanilla w3 env definitions. Probably it will be useful for scene/quest creation with radish tools.<br/> So, here is my script:&nbsp;[https://pastebin.com/JzBcvw6V [https://pastebin.com/JzBcvw6V]]<br/> <br/> '''If you don't know witcher script language''', just paste it into your ''mod/scripts/local''<br/> And in game (after script rebuilding and launching game) open console, enter command: <span style="color:#ccff00;">''execEnv(<some_number>)''</span><br/> Each&nbsp;.env depot path associated with some number (see&nbsp;testEnv function in script). You will see in-game notification and env will be changed.<br/> <br/> '''If you know witcher script language''', then you can check how to activate/deactivate env according to my script.<br/> Definition of activating env function is:<br/> <span style="color:#f39c12;">''import function ActivateEnvironmentDefinition( environmentDefinition&nbsp;: CEnvironmentDefinition, priority&nbsp;: int, blendFactor&nbsp;: float, blendInTime&nbsp;: float )&nbsp;: int;''</span><br/> <br/> Note - save envID somewhere (I did it using fact) or you won't be able to deactivate your custom env.<br/> Definition of deactivating env function is:<br/> <span style="color:#f39c12;">''import function DeactivateEnvironment( environmentID&nbsp;: int , blendOutTime&nbsp;: float );''</span><br/> <br/> '''Another way to activate enviroment definitions''' (but more complex) is to use Entity component&nbsp;''CAreaEnvironmentComponent''<br/> - will create some static area with some env inside it, while outside usual env will be used<br/> But it leads to radish-trial 5 (creating custom entity with such component), my yml example: [https://pastebin.com/pYLwH0iD [https://pastebin.com/pYLwH0iD]]<br/> Or to editing .w2ent in WolvenKit, entity path example (which I dumped to create radish deifinition, huh):&nbsp;''dlc\bob\data\fx\cutscenes\cs704_sister_intro\cs704_vision_env.w2ent''<br/> <br/> <font face="Comic Sans MS, cursive"><span style="color:#00cc66;">But I guess you come here to see some pictures or videos, right? Then I will show you all 211 vanilla envs at once (on Toussaint location).<br/> If you have 14 minutes for it, have fun&nbsp;:)</span>&nbsp;[https://www.youtube.com/watch?v=A2sGUAfvgEg [https://www.youtube.com/watch?v=A2sGUAfvgEg]]</font>

Revision as of 13:11, 18 July 2020

Witcher 3 game uses a lot of enviroment definitions on different locations to create suitable atmosphere or interesting visual effect (remember Iris painted world).
These enviroment definitions are encoded in .env files in game bundles. You can extract them and open with WolvenKit, save & change some of it's params.
In general env definition contains many numbers, curves, which describes color, shadow, sunlight, fog params etc.
Also you can use Realtime in-game Enviroment UI to change params and preview result in real-time, dump it as yml definition and encode with Radish modding tools in .env finally.

However here I want to write how to preview and apply (what is the same) vanilla w3 env definitions. Probably it will be useful for scene/quest creation with radish tools.
So, here is my script: [https://pastebin.com/JzBcvw6V]

If you don't know witcher script language, just paste it into your mod/scripts/local
And in game (after script rebuilding and launching game) open console, enter command: execEnv(<some_number>)
Each .env depot path associated with some number (see testEnv function in script). You will see in-game notification and env will be changed.

If you know witcher script language, then you can check how to activate/deactivate env according to my script.
Definition of activating env function is:
import function ActivateEnvironmentDefinition( environmentDefinition : CEnvironmentDefinition, priority : int, blendFactor : float, blendInTime : float ) : int;

Note - save envID somewhere (I did it using fact) or you won't be able to deactivate your custom env.
Definition of deactivating env function is:
import function DeactivateEnvironment( environmentID : int , blendOutTime : float );

Another way to activate enviroment definitions (but more complex) is to use Entity component CAreaEnvironmentComponent
- will create some static area with some env inside it, while outside usual env will be used
But it leads to radish-trial 5 (creating custom entity with such component), my yml example: [https://pastebin.com/pYLwH0iD]
Or to editing .w2ent in WolvenKit, entity path example (which I dumped to create radish deifinition, huh): dlc\bob\data\fx\cutscenes\cs704_sister_intro\cs704_vision_env.w2ent

But I guess you come here to see some pictures or videos, right? Then I will show you all 211 vanilla envs at once (on Toussaint location).
If you have 14 minutes for it, have fun :)
 [https://www.youtube.com/watch?v=A2sGUAfvgEg]