[MOD] Foundation of Conquest and War V. 7.2

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

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

SMoOoVEeR
Posts: 49
Joined: Thu, 28. Dec 17, 19:41
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by SMoOoVEeR » Sat, 2. Feb 19, 15:35

i was wondering why Teladi got so swamped by single Xenon Destroyers in nearly every sector without defnding any in my game i looked up in my log and found this:

Code: Select all

[=ERROR=] 173768.45 Error in default context: No suitable ShipGenerator found with tags=[tag.military,tag.destroyer], size=class.ship_xl, factions=faction.teladi
* Expression: [military, destroyer]
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 [JobEngine] No ship generated for JobID: 'teladi_destroyer_company_patrol'. Probably invalid ship macro/group/ref definition.
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 Error in default context: No suitable ShipGenerator found with tags=[tag.military,tag.destroyer], size=class.ship_xl, factions=faction.teladi
* Expression: [military, destroyer]
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 [JobEngine] No ship generated for JobID: 'teladi_destroyer_company_patrol'. Probably invalid ship macro/group/ref definition.
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 Error in default context: No suitable ShipGenerator found with tags=[tag.military,tag.destroyer], size=class.ship_xl, factions=faction.teladi
* Expression: [military, destroyer]
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 [JobEngine] No ship generated for JobID: 'teladi_destroyer_company_patrol'. Probably invalid ship macro/group/ref definition.
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 Error in default context: No suitable ShipGenerator found with tags=[tag.military,tag.destroyer], size=class.ship_xl, factions=faction.teladi
* Expression: [military, destroyer]
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 [JobEngine] No ship generated for JobID: 'teladi_destroyer_company_patrol'. Probably invalid ship macro/group/ref definition.
Meanwhile i found this one aswell in my log

Code: Select all

ERROR: ARG Privateer Escort Nova Vanguard 0x94e21 is a jobship that does not have a jobmainzone. Attempting to recover.
	Line 2991: [=ERROR=] 173777.84 aicontext<order.fight.patrol,0x94e13>: ERROR: ARG Privateer Escort Quasar 0x94e0e is a jobship that does not have a jobmainzone. Attempting to recover.
	Line 2995: [=ERROR=] 173781.02 aicontext<order.fight.patrol,0x94e44>: ERROR: ARG Privateer Escort Elite Vanguard 0x94e40 is a jobship that does not have a jobmainzone. Attempting to recover.
	Line 2998: [=ERROR=] 173782.75 aicontext<order.fight.patrol,0x94e36>: ERROR: ARG Privateer Escort Elite Vanguard 0x94e32 is a jobship that does not have a jobmainzone. Attempting to recover.
	Line 3245: [=ERROR=] 175595.30 aicontext<order.fight.patrol,0x2116f>: ERROR: ARG Privateer Squadron Eclipse Vanguard 0x2116a is a jobship that does not have a jobmainzone. Attempting to recover.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by BlackRain » Sat, 2. Feb 19, 22:59

SMoOoVEeR wrote:
Sat, 2. Feb 19, 15:35
i was wondering why Teladi got so swamped by single Xenon Destroyers in nearly every sector without defnding any in my game i looked up in my log and found this:

Code: Select all

[=ERROR=] 173768.45 Error in default context: No suitable ShipGenerator found with tags=[tag.military,tag.destroyer], size=class.ship_xl, factions=faction.teladi
* Expression: [military, destroyer]
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 [JobEngine] No ship generated for JobID: 'teladi_destroyer_company_patrol'. Probably invalid ship macro/group/ref definition.
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 Error in default context: No suitable ShipGenerator found with tags=[tag.military,tag.destroyer], size=class.ship_xl, factions=faction.teladi
* Expression: [military, destroyer]
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 [JobEngine] No ship generated for JobID: 'teladi_destroyer_company_patrol'. Probably invalid ship macro/group/ref definition.
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 Error in default context: No suitable ShipGenerator found with tags=[tag.military,tag.destroyer], size=class.ship_xl, factions=faction.teladi
* Expression: [military, destroyer]
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 [JobEngine] No ship generated for JobID: 'teladi_destroyer_company_patrol'. Probably invalid ship macro/group/ref definition.
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 Error in default context: No suitable ShipGenerator found with tags=[tag.military,tag.destroyer], size=class.ship_xl, factions=faction.teladi
* Expression: [military, destroyer]
[General] 173768.45 ======================================
[General] 173768.45 ======================================
[=ERROR=] 173768.45 [JobEngine] No ship generated for JobID: 'teladi_destroyer_company_patrol'. Probably invalid ship macro/group/ref definition.
Meanwhile i found this one aswell in my log

Code: Select all

ERROR: ARG Privateer Escort Nova Vanguard 0x94e21 is a jobship that does not have a jobmainzone. Attempting to recover.
	Line 2991: [=ERROR=] 173777.84 aicontext<order.fight.patrol,0x94e13>: ERROR: ARG Privateer Escort Quasar 0x94e0e is a jobship that does not have a jobmainzone. Attempting to recover.
	Line 2995: [=ERROR=] 173781.02 aicontext<order.fight.patrol,0x94e44>: ERROR: ARG Privateer Escort Elite Vanguard 0x94e40 is a jobship that does not have a jobmainzone. Attempting to recover.
	Line 2998: [=ERROR=] 173782.75 aicontext<order.fight.patrol,0x94e36>: ERROR: ARG Privateer Escort Elite Vanguard 0x94e32 is a jobship that does not have a jobmainzone. Attempting to recover.
	Line 3245: [=ERROR=] 175595.30 aicontext<order.fight.patrol,0x2116f>: ERROR: ARG Privateer Squadron Eclipse Vanguard 0x2116a is a jobship that does not have a jobmainzone. Attempting to recover.
I am already aware of the first issue, it is just one of the new jobs I added (it is only one so it doesn't affect much). I fixed it already but didn't upload yet. As for the second thing, not sure about that. Those are escorts and should follow the main ship.

Warnoise
Posts: 674
Joined: Mon, 7. Mar 16, 23:47

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by Warnoise » Wed, 6. Feb 19, 17:15

I think there needs to be a little tweak for Pulse L turrets.

Currently pulse L turret is not only anti fighter but also anti capitals. Considering its dmg, range and projectile speed, not only it is extremely accurate (huge projectile speed making it almost impossible to dodge) but also deadly against anything (can 1 shot anything below L class ships)

While I am ok with Xenon ships being stronger than the average ship, when you get 5 xenon K's invading together, they 1 shot anything in sight. Dropping Destroyers like S fighters with the sheer amount of pulse projectiles.

I think L pulse turrets need either a damage nerf or projectile speed nerf. Long range nuke turrets should be Plasma turrets

That's just my opinion of course.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by BlackRain » Thu, 7. Feb 19, 01:08

Warnoise wrote:
Wed, 6. Feb 19, 17:15
I think there needs to be a little tweak for Pulse L turrets.

Currently pulse L turret is not only anti fighter but also anti capitals. Considering its dmg, range and projectile speed, not only it is extremely accurate (huge projectile speed making it almost impossible to dodge) but also deadly against anything (can 1 shot anything below L class ships)

While I am ok with Xenon ships being stronger than the average ship, when you get 5 xenon K's invading together, they 1 shot anything in sight. Dropping Destroyers like S fighters with the sheer amount of pulse projectiles.

I think L pulse turrets need either a damage nerf or projectile speed nerf. Long range nuke turrets should be Plasma turrets

That's just my opinion of course.
Are you talking about the Xenon L laser turrets? I am a little confused because you talk about L pulse turrets but then talk about Xenon ships and then talk about plasma turrets? Your comments don't make sense because Xenon don't even use plasma turrets. Anyway, the Xenon L laser turrets are supposed to be extremely powerful and Xenon are meant to be powerhouses. I can lower the range on them but I don't see the need to decrease their damage. Maybe a slight decrease.

Warnoise
Posts: 674
Joined: Mon, 7. Mar 16, 23:47

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by Warnoise » Thu, 7. Feb 19, 02:25

BlackRain wrote:
Thu, 7. Feb 19, 01:08
Warnoise wrote:
Wed, 6. Feb 19, 17:15
I think there needs to be a little tweak for Pulse L turrets.

Currently pulse L turret is not only anti fighter but also anti capitals. Considering its dmg, range and projectile speed, not only it is extremely accurate (huge projectile speed making it almost impossible to dodge) but also deadly against anything (can 1 shot anything below L class ships)

While I am ok with Xenon ships being stronger than the average ship, when you get 5 xenon K's invading together, they 1 shot anything in sight. Dropping Destroyers like S fighters with the sheer amount of pulse projectiles.

I think L pulse turrets need either a damage nerf or projectile speed nerf. Long range nuke turrets should be Plasma turrets

That's just my opinion of course.
Are you talking about the Xenon L laser turrets? I am a little confused because you talk about L pulse turrets but then talk about Xenon ships and then talk about plasma turrets? Your comments don't make sense because Xenon don't even use plasma turrets. Anyway, the Xenon L laser turrets are supposed to be extremely powerful and Xenon are meant to be powerhouses. I can lower the range on them but I don't see the need to decrease their damage. Maybe a slight decrease.
Ah sorry I am talking about Xenon L pulse turrets.

I mentioned the Xenon K's because in my game all xenon K's come equipped with L pulse turrets and M pulse turrets. When a bunch of Xenon K are grouped up, literally nothing can stop them. I agree they should powerhouses, but currently in my game, 1 xenon K can solo 3 destroyers in some cases (well we can partially blame the destroyers AI for not using the main batteries too though)

I mentioned the plasma turrets as a comparison to pulse turrets, because plasma turrets are supposed to be the long range+ high damage type of turrets, yet currently pulse turrets do that job but better.
Currently, i feel like L pulse turrets are the go-to as anti capital ship turret because they have long range and do absurd damage without suffering from lack of projectile speed (which makes them equally deadly against fighters.). Therefore, to balance them out, i suggest either a slight decrease in damage and projectile speed, or range.
Last edited by Warnoise on Fri, 8. Feb 19, 09:27, edited 1 time in total.

Cg089
Posts: 80
Joined: Fri, 18. Jan 19, 19:25
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by Cg089 » Thu, 7. Feb 19, 05:20

Hi BlackRain,
First, thanks for the great mod.
Secondly, I see the same problem that Warnoise does - While I get that a capital ship should be able to destroy fighters fairly easily, given how expensive a half-decent fighter is to equip, it makes them basically worthless in my opinion. Not saying I know how to fix it, but it kinda ruins carriers for me. There's just no way to use a carrier effectively if you are blowing several million on replacing your fighters every time.

On a related note, I've been trying to push back Ks using 3 destroyers, and while I can often take them out, it's hard to do reliably. My biggest complaint is that it feels so weird and frustrating to easily target and take out the big turrets and then find the medium turrets basically impossible to destroy (their hull). I've looked through these macros:
assets\props\WeaponSystems\standard\macros\:
turret_xen_l_laser_01_mk1_macro:
turret_xen_m_beam_02_mk1_macro:
<replace sel="//macros/macro/properties/hull/@max">20000</replace>
turret_xen_m_laser_01_mk1_macro:
No hull value?
turret_xen_m_laser_02_mk1_macro:
<replace sel="//macros/macro/properties/hull/@max">150000</replace>
7.5 times more than the larger turret? It just feels weird to me. Was this supposed to be 15k instead of 150k? That feels like it would make more sense, 20k for large and 15k for medium. I'm going to try it out and see how it goes.

Again, thanks for the great mod!

NoelSt
Posts: 61
Joined: Tue, 4. Dec 18, 12:42
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by NoelSt » Thu, 7. Feb 19, 23:04

Anybody hss tested this mod with 2.0 ego patch?

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by BlackRain » Fri, 8. Feb 19, 03:09

I will look into the turret hp, maybe I forgot to change it.

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by BlackRain » Fri, 8. Feb 19, 03:14

NoelSt wrote:
Thu, 7. Feb 19, 23:04
Anybody hss tested this mod with 2.0 ego patch?

Most likely will be some issues because of all the new stuff. I will have to look through it all.

Slater124
Posts: 6
Joined: Sun, 3. Feb 08, 03:08
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by Slater124 » Sat, 9. Feb 19, 17:36

Running 1.6

Stock game. Only mod running.

My FPS goes from steady 60 to a stutter 40.

At times my FPS will lock up entirely to less than 10.

Possibly too many AI/code loops?

Running Less Xenon version. Latest version. 2.4A.

Hornet108
Posts: 343
Joined: Thu, 15. Nov 12, 13:46
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by Hornet108 » Sat, 9. Feb 19, 22:36

+1 to wondering how this works with the 2.0 beta?

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7411
Joined: Mon, 15. Dec 03, 18:53
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by BlackRain » Sun, 10. Feb 19, 00:28

Slater124 wrote:
Sat, 9. Feb 19, 17:36
Running 1.6

Stock game. Only mod running.

My FPS goes from steady 60 to a stutter 40.

At times my FPS will lock up entirely to less than 10.

Possibly too many AI/code loops?

Running Less Xenon version. Latest version. 2.4A.
If you are running the less xenon version and still getting fps issues, most likely your pc just can't handle more ships. There isn't that much of an increase in that version of the mod.

Slater124
Posts: 6
Joined: Sun, 3. Feb 08, 03:08
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by Slater124 » Sun, 10. Feb 19, 21:02

BlackRain wrote:
Sun, 10. Feb 19, 00:28
Slater124 wrote:
Sat, 9. Feb 19, 17:36
Running 1.6

Stock game. Only mod running.

My FPS goes from steady 60 to a stutter 40.

At times my FPS will lock up entirely to less than 10.

Possibly too many AI/code loops?

Running Less Xenon version. Latest version. 2.4A.
If you are running the less xenon version and still getting fps issues, most likely your pc just can't handle more ships. There isn't that much of an increase in that version of the mod.
The funny thing is, my PC is a i7 4820k with 32 GB of ram and R9 290 graphics card.

When i start a brand new game, the fps is horrible(with mod on), especially on stations(Wharfs moreso). When i leave the station, after the docking animation is complete, my FPS goes up to 30 or so. But as soon as i start docking. FPS tanks.

With mod off, FPS is solid 60.

When i load it mid vanilla game. The FPS is fine, but quickly bogs down to unplayable FPS. Mid 20s to even single digit FPS.

Stock game, i am running 60-90 fps without issues at 1080. No V-synch.

I dont think its a CPU bottleneck issue however. But I am sure I am not the only one with this issue.

Hopefully, my input can be of help to someone or i speak for someone else.

User avatar
StoneLegionYT
Posts: 1428
Joined: Fri, 4. Nov 05, 01:18
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by StoneLegionYT » Mon, 11. Feb 19, 06:25

Slater124 wrote:
Sun, 10. Feb 19, 21:02
BlackRain wrote:
Sun, 10. Feb 19, 00:28
Slater124 wrote:
Sat, 9. Feb 19, 17:36
Running 1.6

Stock game. Only mod running.

My FPS goes from steady 60 to a stutter 40.

At times my FPS will lock up entirely to less than 10.

Possibly too many AI/code loops?

Running Less Xenon version. Latest version. 2.4A.
If you are running the less xenon version and still getting fps issues, most likely your pc just can't handle more ships. There isn't that much of an increase in that version of the mod.
The funny thing is, my PC is a i7 4820k with 32 GB of ram and R9 290 graphics card.

When i start a brand new game, the fps is horrible(with mod on), especially on stations(Wharfs moreso). When i leave the station, after the docking animation is complete, my FPS goes up to 30 or so. But as soon as i start docking. FPS tanks.

With mod off, FPS is solid 60.

When i load it mid vanilla game. The FPS is fine, but quickly bogs down to unplayable FPS. Mid 20s to even single digit FPS.

Stock game, i am running 60-90 fps without issues at 1080. No V-synch.

I dont think its a CPU bottleneck issue however. But I am sure I am not the only one with this issue.

Hopefully, my input can be of help to someone or i speak for someone else.
fyi you have bare minimal spec video card for the game.

Slater124
Posts: 6
Joined: Sun, 3. Feb 08, 03:08
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by Slater124 » Tue, 12. Feb 19, 00:59

Kane Hart wrote:
Mon, 11. Feb 19, 06:25
Slater124 wrote:
Sun, 10. Feb 19, 21:02
BlackRain wrote:
Sun, 10. Feb 19, 00:28


If you are running the less xenon version and still getting fps issues, most likely your pc just can't handle more ships. There isn't that much of an increase in that version of the mod.
The funny thing is, my PC is a i7 4820k with 32 GB of ram and R9 290 graphics card.

When i start a brand new game, the fps is horrible(with mod on), especially on stations(Wharfs moreso). When i leave the station, after the docking animation is complete, my FPS goes up to 30 or so. But as soon as i start docking. FPS tanks.

With mod off, FPS is solid 60.

When i load it mid vanilla game. The FPS is fine, but quickly bogs down to unplayable FPS. Mid 20s to even single digit FPS.

Stock game, i am running 60-90 fps without issues at 1080. No V-synch.

I dont think its a CPU bottleneck issue however. But I am sure I am not the only one with this issue.

Hopefully, my input can be of help to someone or i speak for someone else.
fyi you have bare minimal spec video card for the game.
fyi - When the game is paused, my fps sits in high 90s easy. When the game is playing the fps drops down a fair bit and cpu usage spikes. In sectors with a lot of ships sitting stagnant, fps is good. When there is a lot of activity my fps tanks.

Im pretty sure it isnt the GPU.

But, enough nitpicking. I will just have to wait until optimizations are in place and mod updates are done.

Slater124
Posts: 6
Joined: Sun, 3. Feb 08, 03:08
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by Slater124 » Tue, 12. Feb 19, 04:00

M-D-Hansen wrote:
Tue, 12. Feb 19, 01:14
Yes, this game needs a massive optimization round, though certain mods are digging deep in to my precioussss frames

Some short and juicy run of numbers:
With FoCW (low xenon) and faction fix pack running, fxaa high, all sliders to the full - landing deck ~20fps -space near station/asteroids/traffic ~40fps - empty space/no traffic ~50-60fps
Faction Fix Pack, MSAA 4x, all sliders to the full - landing deck ~55fps -space near station/asteroids/traffic ~90-100fps - empty space/no traffic 160+fps
No mods at all adds 10 frames to each scenario

I had everything else disabled for the sake of testing this, usually runs 12 other mods, but together they eat 5-10frames in busy areas

my specs:
(4k 3840x2160 @60hz)
i9-9900X @4.55ghz
RTX2080Ti
HyperX Fury DDR4 64GB @3000mhz
Samsung 970 EVO 2GB (Steam)
Samsung 970 PRO 1GB (Win10)

CPU utilization running game ~10-15%
GPU Clock utilization running game ~30-40%
GPU memory utilization running game ~5-6GB
DDR Memory utilization running game ~22GB
-These numbers are more or less the same no matter ingame settings. From absolute low, to absolute max settings CPU/GPU load is +/-5%

All tested with MSI Afterburner Beta 12, latest nVidia drivers and Rivia Tuner Statistics
THANK YOU. My point exactly.

My GPU isn't even being fully taxed. Like..at all. Despite it being "min spec". It takes the cake at 60 fps with V-synch at 1080 without issues. It is the cpu cycles that are bogging my FPS down. Most likely a script not optimized, or ran excessively fast/too many times per second.

otto_deluxe
Posts: 95
Joined: Sat, 14. May 05, 10:29
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by otto_deluxe » Tue, 12. Feb 19, 18:14

It looks indeed like you are CPU bottlenecked. The most likely explanation is simply the increase in ships, together with the increase in action arounde the universe. Together, these factors (can) make perfomance worse exponentially.

A few fictional numbers to illustrate the CPU problem:

For most of the game's logic, the game can only use one CPU core. When you have 8 cores and one is maxed, that is around the 15% you have seen. Let's say that one core manages 600.000 operations per second, or 10.000 per frame @ 60 FPS.
Let's assume a ship needs 30 operations per frame. With nothing else going on, you can have ~333 ships without slowdown. This is not a lot for the whole universe.

Now, when there is combat, ships do not only have to exist, they also have to go through extra calculations on what to target, how to manouver, no matter if they are in or out of sector. Out of all nearby ships, it has to choose a target and do its thing.
Let's say, for combat a ship needs 50 operations per frame, plus another 5 for every target close by. That is a minimum of 55 operations, limiting the number of ships that can fight at the same time to below 180 without dropping frames. Since there are more ships and fights are bigger than vanilla, this gets worse:
Vanilla: 4 battles of 5 ships each: 4(battles) x 5 (ships) x 70 (operations per ship when fighing 4 oother targets) = 1400 operations. No problem!
FoCW: 10 battles of 15 ships each (and it can be WAY more): 10 x 15 x 120 = 18.000 operation. Ooops! We have 10.000 available, but we need 18.000 (plus all the ships not fighting!) so we roughly lose every second frame, since ships are not done calculating.

The graphics card cannot render a new frame when it does not know the position and orientation of the objects, and they simply are not yet processed. Thus frames get dropped and the next frame is pushed as soon as the CPU finished its cycle.

Now to part two, the graphics side:

Most games reduce the amount of detail of distant objects. This Level of Detail (LOD) has to be calculated every frame for every object in order to determine the correct amount of detail to display. When you are out and about in nowheresville, pretty much no detail is required. 3D models load with a low resolution, textures load in low resolution and shaders get replaced with simple versions. As soon as you get close to one ship, that ship is laoded with more detail. This uses more GPU processing power and more video RAM. The more detailed an object, there stronger the effect.

Now, stations - especially docks, wharfs and shipyards - are large, with many modules. But even worse,they attract ships like moths to the light. Instead of having to load one high detail object, it has to load a bunch at the same time. Some might be visible, other not (if they are behind a station). Here is the problem with lower end graphics cards: Less memory on the cards usually also means slower memory, due to the bus width. Less memory also means more loading and unloading of (temporarily) unneeded textures, when a ship flies behind a station and another comes into vision for example. This means your GPU around min spec is constantly loading and unloading high and low detail versions of the same thing. Basically, it goes in a circle. This cicle gets simmilarly exponentially worse the more objects are nearby. Since there are more ships in general, there is bound to be more nearby. However, due to more losses on all sides, the economy is a lot more active and around all stations that build and service ships there is going to be A LOT more fluctuation than vanilla.

I have not written the game, so this is not going to be 100% accurate, but the theory still applies, unless the engine works completely different from any other engine ever.
M-D-Hansen wrote:
Tue, 12. Feb 19, 01:14
Some short and juicy run of numbers:
With FoCW (low xenon) and faction fix pack running, fxaa high, all sliders to the full - landing deck ~20fps -space near station/asteroids/traffic ~40fps - empty space/no traffic ~50-60fps
Faction Fix Pack, MSAA 4x, all sliders to the full - landing deck ~55fps -space near station/asteroids/traffic ~90-100fps - empty space/no traffic 160+fps
Is there any reason why you used fxaa for one test and msaa for the other? It should not be a noticable difference with a 2080 Ti, but I'm curious. I agree with the game needing a bit of a performance pass, but without any mega mods (which I consider FoCW to be) it still runs with acceptable frame rates. (i7 2600k and gtx 960 4GB)

Slater124
Posts: 6
Joined: Sun, 3. Feb 08, 03:08
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by Slater124 » Wed, 13. Feb 19, 22:59

otto_deluxe wrote:
Tue, 12. Feb 19, 18:14
It looks indeed like you are CPU bottlenecked. The most likely explanation is simply the increase in ships, together with the increase in action arounde the universe. Together, these factors (can) make perfomance worse exponentially.

A few fictional numbers to illustrate the CPU problem:

For most of the game's logic, the game can only use one CPU core. When you have 8 cores and one is maxed, that is around the 15% you have seen. Let's say that one core manages 600.000 operations per second, or 10.000 per frame @ 60 FPS.
Let's assume a ship needs 30 operations per frame. With nothing else going on, you can have ~333 ships without slowdown. This is not a lot for the whole universe.

Now, when there is combat, ships do not only have to exist, they also have to go through extra calculations on what to target, how to manouver, no matter if they are in or out of sector. Out of all nearby ships, it has to choose a target and do its thing.
Let's say, for combat a ship needs 50 operations per frame, plus another 5 for every target close by. That is a minimum of 55 operations, limiting the number of ships that can fight at the same time to below 180 without dropping frames. Since there are more ships and fights are bigger than vanilla, this gets worse:
Vanilla: 4 battles of 5 ships each: 4(battles) x 5 (ships) x 70 (operations per ship when fighing 4 oother targets) = 1400 operations. No problem!
FoCW: 10 battles of 15 ships each (and it can be WAY more): 10 x 15 x 120 = 18.000 operation. Ooops! We have 10.000 available, but we need 18.000 (plus all the ships not fighting!) so we roughly lose every second frame, since ships are not done calculating.

The graphics card cannot render a new frame when it does not know the position and orientation of the objects, and they simply are not yet processed. Thus frames get dropped and the next frame is pushed as soon as the CPU finished its cycle.

Now to part two, the graphics side:

Most games reduce the amount of detail of distant objects. This Level of Detail (LOD) has to be calculated every frame for every object in order to determine the correct amount of detail to display. When you are out and about in nowheresville, pretty much no detail is required. 3D models load with a low resolution, textures load in low resolution and shaders get replaced with simple versions. As soon as you get close to one ship, that ship is laoded with more detail. This uses more GPU processing power and more video RAM. The more detailed an object, there stronger the effect.

Now, stations - especially docks, wharfs and shipyards - are large, with many modules. But even worse,they attract ships like moths to the light. Instead of having to load one high detail object, it has to load a bunch at the same time. Some might be visible, other not (if they are behind a station). Here is the problem with lower end graphics cards: Less memory on the cards usually also means slower memory, due to the bus width. Less memory also means more loading and unloading of (temporarily) unneeded textures, when a ship flies behind a station and another comes into vision for example. This means your GPU around min spec is constantly loading and unloading high and low detail versions of the same thing. Basically, it goes in a circle. This cicle gets simmilarly exponentially worse the more objects are nearby. Since there are more ships in general, there is bound to be more nearby. However, due to more losses on all sides, the economy is a lot more active and around all stations that build and service ships there is going to be A LOT more fluctuation than vanilla.

I have not written the game, so this is not going to be 100% accurate, but the theory still applies, unless the engine works completely different from any other engine ever.
M-D-Hansen wrote:
Tue, 12. Feb 19, 01:14
Some short and juicy run of numbers:
With FoCW (low xenon) and faction fix pack running, fxaa high, all sliders to the full - landing deck ~20fps -space near station/asteroids/traffic ~40fps - empty space/no traffic ~50-60fps
Faction Fix Pack, MSAA 4x, all sliders to the full - landing deck ~55fps -space near station/asteroids/traffic ~90-100fps - empty space/no traffic 160+fps
Is there any reason why you used fxaa for one test and msaa for the other? It should not be a noticable difference with a 2080 Ti, but I'm curious. I agree with the game needing a bit of a performance pass, but without any mega mods (which I consider FoCW to be) it still runs with acceptable frame rates. (i7 2600k and gtx 960 4GB)
I am indeed seemingly to be CPU bottlenecked. I have 4 GB of graphics memory, and not all of it is used. As well as my FPS sits high when paused, or even vanilla game. When FCOW is loaded, my FPS tanks even from the start of any start.

It works fine when i load the mod half way through, but otherwise my FPS goes south real fast, and when it runs for a long time my FPS goes down as well. Most likely ships, and or their scripts getting stuck or looping.

Another thing i noticed is if i leave the game running for a while, my FPS will bog down and be unplayable, but il save, and reload it after quitting the game entirely. And load back in. Ding, fps is good again.

So probably a few memory leaks here and there as well.

otto_deluxe
Posts: 95
Joined: Sat, 14. May 05, 10:29
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by otto_deluxe » Thu, 14. Feb 19, 12:21

Yep, you are not alone with these problems.

The game start problem might be related to fights: When the mod is active at game start, there is (supposedly) a lot of action instantly. If you add it mid-way, a lot of ships have to get built first before the raging war can commence. The memleak and/or stuck scripts are also a common problem. When I run X4 and have a browser open, watching YT or Twitch to pass time during less action packed segments of empire building, after a while my RAM fills up completely and Windows decides to kill not only X4, but also my browser and unloads my graphics driver for some reason. Pagefile doesn't help either. So I made it a habit to save and load after every video, or at least once every two hours. I hope ES find the problem and fix it by 2.0 release.

Slater124
Posts: 6
Joined: Sun, 3. Feb 08, 03:08
x4

Re: [WIP - MOD] Foundation of Conquest and War V. 2.4Alpha

Post by Slater124 » Thu, 14. Feb 19, 22:48

otto_deluxe wrote:
Thu, 14. Feb 19, 12:21
Yep, you are not alone with these problems.

The game start problem might be related to fights: When the mod is active at game start, there is (supposedly) a lot of action instantly. If you add it mid-way, a lot of ships have to get built first before the raging war can commence. The memleak and/or stuck scripts are also a common problem. When I run X4 and have a browser open, watching YT or Twitch to pass time during less action packed segments of empire building, after a while my RAM fills up completely and Windows decides to kill not only X4, but also my browser and unloads my graphics driver for some reason. Pagefile doesn't help either. So I made it a habit to save and load after every video, or at least once every two hours. I hope ES find the problem and fix it by 2.0 release.
This is in line with my issues. FPS is great, but after a while my game gets bogged down..
Yes, i figured the ships spawned and fighting on start. Possibly due to too many AI ships being spawned/used.

Thank you for your info, good sir.

Post Reply

Return to “X4: Foundations - Scripts and Modding”