[QUESTION] LOD and Effects distance

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

Mr.Freud
Posts: 140
Joined: Sat, 16. Nov 13, 21:20
x4

[QUESTION] LOD and Effects distance

Post by Mr.Freud » Sun, 19. Jan 20, 13:07

Is it possible to increase LOD and Effects distances past in-game options max? I've tried messing with the config file but any setting above 1.0 seem to actually decrease the distances.

Shuulo
Posts: 777
Joined: Mon, 14. Apr 08, 17:03
x4

Re: [QUESTION] LOD and Effects distance

Post by Shuulo » Sun, 19. Jan 20, 16:47

Mr.Freud wrote:
Sun, 19. Jan 20, 13:07
Is it possible to increase LOD and Effects distances past in-game options max? I've tried messing with the config file but any setting above 1.0 seem to actually decrease the distances.
I beleive there is a draw distanse in some game parameters file, you can try look through file sin libraries, if you unpacked the game.
Also, most effects have set draw distance in effects file, like smalleffect, largeeffect etc, and this distances are defined in defaults or paramaters library, can't remember precisely atm

Mr.Freud
Posts: 140
Joined: Sat, 16. Nov 13, 21:20
x4

Re: [QUESTION] LOD and Effects distance

Post by Mr.Freud » Mon, 20. Jan 20, 11:08

Shuulo wrote:
Sun, 19. Jan 20, 16:47
Mr.Freud wrote:
Sun, 19. Jan 20, 13:07
Is it possible to increase LOD and Effects distances past in-game options max? I've tried messing with the config file but any setting above 1.0 seem to actually decrease the distances.
I beleive there is a draw distanse in some game parameters file, you can try look through file sin libraries, if you unpacked the game.
Also, most effects have set draw distance in effects file, like smalleffect, largeeffect etc, and this distances are defined in defaults or paramaters library, can't remember precisely atm
Thank you!
So I've found 3 files:
particle_effects
region_lodvalues
renderparam_library


I'm complete noob in modding, so first thing I tried was just changing parameters. Dropped tweaked files in your mod folder for testing purpose, to see if they're working, but there was no difference.
Then I checked your files in your mod's
libraries
folder and noticed lines like
replace
and
add
and now found out about XML patching thing. I have two questions:
1) Is it necessary to use XML patching method? Or can I just replace default parameters?
2) If It's necessary - How do I do it? Do I need special software for XML patching? If yes, where can I get it? I looked in tutorial section but there's no links to the software needed. Or do I write those lines manually?
p.s. Sorry for taking your time. I probably sound like a complete noob.

Shuulo
Posts: 777
Joined: Mon, 14. Apr 08, 17:03
x4

Re: [QUESTION] LOD and Effects distance

Post by Shuulo » Mon, 20. Jan 20, 11:24

Mr.Freud wrote:
Mon, 20. Jan 20, 11:08

Thank you!
So I've found 3 files:
particle_effects
region_lodvalues
renderparam_library


I'm complete noob in modding, so first thing I tried was just changing parameters. Dropped tweaked files in your mod folder for testing purpose, to see if they're working, but there was no difference.
Then I checked your files in your mod's
libraries
folder and noticed lines like
replace
and
add
and now found out about XML patching thing. I have two questions:
1) Is it necessary to use XML patching method? Or can I just replace default parameters?
2) If It's necessary - How do I do it? Do I need special software for XML patching? If yes, where can I get it? I looked in tutorial section but there's no links to the software needed. Or do I write those lines manually?
p.s. Sorry for taking your time. I probably sound like a complete noob.
XML is just a text file really, there is certainly some software to automate it but i find it redundant for X4 modding.
You can use just Notepad to change XML, i suggest Notepad++ for a start, but i use VSCode.
Those lines are just added manually, find the node in xml file you want to replace or add to and do "diff" thing, refer to my mod files as it seems you are already looking at that :)

Mr.Freud
Posts: 140
Joined: Sat, 16. Nov 13, 21:20
x4

Re: [QUESTION] LOD and Effects distance

Post by Mr.Freud » Mon, 20. Jan 20, 13:55

Shuulo wrote:
Mon, 20. Jan 20, 11:24
XML is just a text file really, there is certainly some software to automate it but i find it redundant for X4 modding.
You can use just Notepad to change XML, i suggest Notepad++ for a start, but i use VSCode.
Those lines are just added manually, find the node in xml file you want to replace or add to and do "diff" thing, refer to my mod files as it seems you are already looking at that :)
So I edited
renderparam_library
I looked at your files as an example and to me it looks like I did it right way, but Im not sure. Could you please take a look if you have time?
https://drive.google.com/open?id=1kku22 ... MCtXo34m_u
One file is original another one is edited for comparison

Shuulo
Posts: 777
Joined: Mon, 14. Apr 08, 17:03
x4

Re: [QUESTION] LOD and Effects distance

Post by Shuulo » Tue, 21. Jan 20, 02:05

Mr.Freud wrote:
Mon, 20. Jan 20, 13:55
Shuulo wrote:
Mon, 20. Jan 20, 11:24
XML is just a text file really, there is certainly some software to automate it but i find it redundant for X4 modding.
You can use just Notepad to change XML, i suggest Notepad++ for a start, but i use VSCode.
Those lines are just added manually, find the node in xml file you want to replace or add to and do "diff" thing, refer to my mod files as it seems you are already looking at that :)
So I edited
renderparam_library
I looked at your files as an example and to me it looks like I did it right way, but Im not sure. Could you please take a look if you have time?
https://drive.google.com/open?id=1kku22 ... MCtXo34m_u
One file is original another one is edited for comparison
Diff seems to be correct. Though i have no idea what impact those changes have.

Mr.Freud
Posts: 140
Joined: Sat, 16. Nov 13, 21:20
x4

Re: [QUESTION] LOD and Effects distance

Post by Mr.Freud » Tue, 21. Jan 20, 12:15

Shuulo wrote:
Tue, 21. Jan 20, 02:05

Diff seems to be correct. Though i have no idea what impact those changes have.
no impact at all. It's probably hardcoded or Im missing something. Thank you for help :)

Max Bain
Posts: 515
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: [QUESTION] LOD and Effects distance

Post by Max Bain » Tue, 21. Jan 20, 12:50

Mr.Freud wrote:
Tue, 21. Jan 20, 12:15
Shuulo wrote:
Tue, 21. Jan 20, 02:05

Diff seems to be correct. Though i have no idea what impact those changes have.
no impact at all. It's probably hardcoded or Im missing something. Thank you for help :)
Hi, no its not hardcoded (except for asteroids, they seem to be hardcoded). I have a private mod that increases LOD disctances for all ships and details. It works pretty well. I guess for effects its the same.
When I am back home I will post what you have to do. The Renderparam_library is the right file to look into.
X4 Editor (view stats of objects and make your own mod within a few clicks) viewtopic.php?f=181&t=421306
XR Ship Pack (adds several ships from XR) viewtopic.php?f=181&t=419641
Weapon Pack (adds several new weapons) viewtopic.php?f=181&t=421266

Mr.Freud
Posts: 140
Joined: Sat, 16. Nov 13, 21:20
x4

Re: [QUESTION] LOD and Effects distance

Post by Mr.Freud » Tue, 21. Jan 20, 18:00

Max Bain wrote:
Tue, 21. Jan 20, 12:50
Mr.Freud wrote:
Tue, 21. Jan 20, 12:15
Shuulo wrote:
Tue, 21. Jan 20, 02:05

Diff seems to be correct. Though i have no idea what impact those changes have.
no impact at all. It's probably hardcoded or Im missing something. Thank you for help :)
Hi, no its not hardcoded (except for asteroids, they seem to be hardcoded). I have a private mod that increases LOD disctances for all ships and details. It works pretty well. I guess for effects its the same.
When I am back home I will post what you have to do. The Renderparam_library is the right file to look into.
Thank you!

Max Bain
Posts: 515
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: [QUESTION] LOD and Effects distance

Post by Max Bain » Tue, 21. Jan 20, 22:58

The first example will increase the distance you see the more detailed LODs for S sized ships and the second one does the same for the engines. Hope that helps.

Code: Select all

<diff> 	
	<replace sel="//renderparameters/lodrules/rule[@name='dbglodrule_ship_s']">
		<rule name="dbglodrule_ship_s" range="30000.0" sizecontrib="50" speed="2.0" priority="1" lodradius0="200" lodradius1="100" lodradius2="10" lodradius3="3">
		  <connections>
			<tag name="ship_s" />
		  </connections>
		</rule>  
	</replace>	
	<replace sel="//renderparameters/lodrules/rule[@name='dbglodrule_engine']">
			<rule name="dbglodrule_engine" range="20000.0" sizecontrib="50" speed="1.0" lodradius0="50" lodradius1="25" lodradius2="10" lodradius3="5">
			  <connections>
				<tag name="engine" />
				<tag name="enginejet" />
			  </connections>
			</rule>
	</replace>	
</diff>
X4 Editor (view stats of objects and make your own mod within a few clicks) viewtopic.php?f=181&t=421306
XR Ship Pack (adds several ships from XR) viewtopic.php?f=181&t=419641
Weapon Pack (adds several new weapons) viewtopic.php?f=181&t=421266

Mr.Freud
Posts: 140
Joined: Sat, 16. Nov 13, 21:20
x4

Re: [QUESTION] LOD and Effects distance

Post by Mr.Freud » Wed, 22. Jan 20, 01:08

Max Bain wrote:
Tue, 21. Jan 20, 22:58
The first example will increase the distance you see the more detailed LODs for S sized ships and the second one does the same for the engines. Hope that helps.

Code: Select all

<diff> 	
	<replace sel="//renderparameters/lodrules/rule[@name='dbglodrule_ship_s']">
		<rule name="dbglodrule_ship_s" range="30000.0" sizecontrib="50" speed="2.0" priority="1" lodradius0="200" lodradius1="100" lodradius2="10" lodradius3="3">
		  <connections>
			<tag name="ship_s" />
		  </connections>
		</rule>  
	</replace>	
	<replace sel="//renderparameters/lodrules/rule[@name='dbglodrule_engine']">
			<rule name="dbglodrule_engine" range="20000.0" sizecontrib="50" speed="1.0" lodradius0="50" lodradius1="25" lodradius2="10" lodradius3="5">
			  <connections>
				<tag name="engine" />
				<tag name="enginejet" />
			  </connections>
			</rule>
	</replace>	
</diff>
Thanks! Would've never figured that out myself.
p.s. MASSTRAFFIC EVERYWHERE! lol

Mr.Freud
Posts: 140
Joined: Sat, 16. Nov 13, 21:20
x4

Re: [QUESTION] LOD and Effects distance

Post by Mr.Freud » Fri, 24. Jan 20, 23:00

I'm trying to figure out how to increase draw distance of stations docking area light. Anyone has any idea? Increasing overall stations draw distance doesn't have the effect on a docking area light.
I mean this light
https://imgur.com/rN66IFz

Mr.Freud
Posts: 140
Joined: Sat, 16. Nov 13, 21:20
x4

Re: [QUESTION] LOD and Effects distance

Post by Mr.Freud » Sat, 25. Jan 20, 02:00

I have found how to increase asteroids draw ranges. Tweak "region_lodvalues".
Here's Argon Prime. I tweaked it to extreme values(but not max) so FPS drop A LOT. Also they eat a lot of RAM. Afraid to check other sectors :D
https://steamuserimages-a.akamaihd.net/ ... 13BDE6DC5/
https://steamuserimages-a.akamaihd.net/ ... 9302921F5/

Max Bain
Posts: 515
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: [QUESTION] LOD and Effects distance

Post by Max Bain » Sun, 26. Jan 20, 21:49

Mr.Freud wrote:
Sat, 25. Jan 20, 02:00
I have found how to increase asteroids draw ranges. Tweak "region_lodvalues".
Here's Argon Prime. I tweaked it to extreme values(but not max) so FPS drop A LOT. Also they eat a lot of RAM. Afraid to check other sectors :D
https://steamuserimages-a.akamaihd.net/ ... 13BDE6DC5/
https://steamuserimages-a.akamaihd.net/ ... 9302921F5/
Thats cool! Thanks for sharing the solution :)

Edit: There is no "region_lodvalue" Can you tell me what exact value you have edited?
X4 Editor (view stats of objects and make your own mod within a few clicks) viewtopic.php?f=181&t=421306
XR Ship Pack (adds several ships from XR) viewtopic.php?f=181&t=419641
Weapon Pack (adds several new weapons) viewtopic.php?f=181&t=421266

Mr.Freud
Posts: 140
Joined: Sat, 16. Nov 13, 21:20
x4

Re: [QUESTION] LOD and Effects distance

Post by Mr.Freud » Mon, 27. Jan 20, 15:07

Max Bain wrote:
Sun, 26. Jan 20, 21:49
Mr.Freud wrote:
Sat, 25. Jan 20, 02:00
I have found how to increase asteroids draw ranges. Tweak "region_lodvalues".
Here's Argon Prime. I tweaked it to extreme values(but not max) so FPS drop A LOT. Also they eat a lot of RAM. Afraid to check other sectors :D
https://steamuserimages-a.akamaihd.net/ ... 13BDE6DC5/
https://steamuserimages-a.akamaihd.net/ ... 9302921F5/
Thats cool! Thanks for sharing the solution :)

Edit: There is no "region_lodvalue" Can you tell me what exact value you have edited?
region_lodvalues is xml file in libraries. Its in 08 catalogue

Post Reply

Return to “X4: Foundations - Scripts and Modding”