[Realspace MODS] "STARS" - "XRSGE" - "REM" - various

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

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

ziplock815
Posts: 479
Joined: Wed, 8. Oct 14, 20:30

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by ziplock815 »

Yes, I have the latest version
Btw in some superhighways I have a big fps drop (in the first 1\3 of the flight inside)

Edit: I always wanted to ask, what does "war memorial" mean? It's some kind of foggy thing you can see near jumpgates in some systems (for example Matrix 17)

Edit 2: could you please tell how to remove fog in the central "subsector' of Dark Horizon sector? Wanna move my HQ there :D
Btw I found inactive jumpgate there - don't connect this sector to another xenon sector please :D

Edit 3: fps is slightly lower in "radiant haven" subsector
cool thing that you can feel the planet's gravity here
oh, and lightnings in the atmosphere, so cool
love this sector :)
Realspace
Posts: 1808
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Realspace »

1 just that, a battle was fought there
2. I've redone that region, no foggy fog, only blue around :D
Inactive gate is for memory of old times, in Rebirth. No intention to open it.

Uploading a patch, I fixed many "invisible" things. Made moving through superhighways leaner...I hope. I do see almost zero stutter and errors in a new game, but some few ships seem to be stuck at deep space or at entering a superhighway, so I force warp them to destination..problem solved :twisted:

I also checked your xenon I...yes they were spawn out of thin air, changed that in the jobs.

_______________________________________________________

IMPORTANT: Guys, I've tried removing ALL intra-sector superhighways...and the stuttering has GONE! zero!
I have 100fps in the map and everything is very smooth :doh:
I did this by maintaining sectors exactly as they are now.... huge!. Engine does not suffer a bit for the distances, it was the superhighways somehow :rant:
_______________________________________________________

I must think about an alternative, probably in-sector jumping for L/XL or testing Hyperdrive at very high speeds or both.

The good thing is that superhighways can be removed and added easily, even in the same gameplay.
I must only finish to put invisible enlargers for some sectors to avoid stations not be contained in the sector (holomap) otherwise you can already play the game now without superhighways, continuing an old save.

I've tested a lot of different script changes for instructing the AI to use the superhighways without errors, but after nailing almost everything the stutter remained. I don't exclude that my changes are the cause...the too many conditions I set to make recognize them as internal link :roll:

If implementing the in-sector jump, I can use the zone icons (blue hexagons) as target for the big ships. This can also be optional btw. Or in addition. Anyway jumping causes no lag as I injected it in orders instead of move scripts

For now, please delete both move.gate and move.generic in aiscripts folder and see if ships fly normally through shw or have pathfinding problems and fps is better.

I have indeed better fps.
Realspace
Posts: 1808
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Realspace »

The Expanse Reborn - PATCH
:arrow: https://www.nexusmods.com/x4foundations/mods/1140
Version 9.1.9b (PATCH)
(save-compatible, may miss some new stations and zone's names)

- removed most of the move scripts for performance, added a small code for avoiding hardcore errors in the final move if sectors are too big (needed also for a no superhighway play)
- improved gate recognition in Terran plot (Terran accelerators use a different model from vanilla)
- changed supercruise for shorter range too (but less speed)
- added condition not to spawn encounters ships after supercruise if enemy ships of same class already exist
- remade sector: Farnham's Legends VI
- various changes to regions (less foggy fog)
- added many (should be finished) enlargers to keep sectors big in the holomap (futureprof for NO or LESS superhighway option)

You should see a significant increase in fps and reduced stuttering
ziplock815
Posts: 479
Joined: Wed, 8. Oct 14, 20:30

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by ziplock815 »

Small question - About Rhy's Defiance sector - is it normal that xenon stations spawn out of nowhere? Teladi fleet destroyed almost all stations (except of 2 asteroid stations in the outskirts of the sector), but stations keep spawning out of nowhere in random places like they are being built by invisible S ships and teladi keep destroying these stations. At the moment I can count 15 destroyed stations on the sector map. How do I stop this mess? :evil: Should I destroy asteroid stations too? Seems like they can't be completely destroyed since after some time they fix themselves.

Btw Envoy dlc still doesn't want to activate in my game for some reason. Realspace, does it work in your game? Maybe there're some conditions to get it activated?

Edit: something weird with the jumpgate in Ianamus Zura to Trinity sanctum - lots of ships are gathering around the jumpgate. Also player ships don't want to fly through the superhighway that leads from the trinity's sanctum jumpgate to the center of Ianamus Zura - they choose to make a large circle instead.
Realspace
Posts: 1808
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Realspace »

1. You mean the asteroid stations only?
These are spawn as objects at start but should be possible to destroy them..unlsess..ok will check. I use vanilla model that maybe is meant for plot reasons not to be destroyed. I can make a copy of it as destructible and use that one. Thanks for report.

Envoy mission starts after Dal Busta has settled in, doesn't it?

Ianamus..ok, it is the old issue of ships choosing the longer route because kms are less. Will fix it.
I've also reworked move.generic to make ships understand that if they are in the same sectors and superhighways exist, they have to sue them! Checking now if they understood the message :rant:
ziplock815
Posts: 479
Joined: Wed, 8. Oct 14, 20:30

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by ziplock815 »

Dal is already at my HQ, but the Envoy dlc doesn't activate

In Rhy's defiance xenon stations that are being built aren't asteroid stations, the type is unknown bc teladi obliterate them the moment they start to spawn :lol:
My theory was that it happens bc asteroid stations can't be completely destroyed so sector ownership stays for xenons and stations keep spawning. However, that thing doesn't happen for the neighboring Matrix 17, where there's still one asteroid station left.

Seems like all my L traders have problems with pathfinding (jumpdrive equipped) - one is pointlessly flying in Trinity sanctum trying to fiqure out what to do with the highway and the other one is in Ianamus zura
Realspace
Posts: 1808
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Realspace »

Yes that gate has been moved, the other causing path issues was in Family Zhin. Thank to a debugging code I added I could see the few remaining gates causing the loop.
I am working on various scripts now, added jump function to leader if the subs have jumpdrive (before only player could command a leader to jump, now AI does it too). And a simplified Jump procedure for escort ships (if they have the jumpdrive). Added jump to default command 'protect ship' too.
For your happines, Dark Horizon is linked to Ianamus Zura in next update, no more to Rhy's (save compat.).
ziplock815
Posts: 479
Joined: Wed, 8. Oct 14, 20:30

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by ziplock815 »

I would be even happier if you added other rebirth sectors (de vries, cold star, toride and fields of opportunity) :D
But thanks a lot anyway, now I can have some rest from patroling Rhy's Defiance

btw I still have a problem with supersupercruise and keep missing the target - my ship doesn't stop and flies by with hundreds of kms\sec and even if I change the course it flies backwards (inertia). In terms of Newtonian flight model - it's great really, so I assume maybe I'm doing something wrong? :gruebel:
Realspace
Posts: 1808
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Realspace »

The Expanse Reborn

:arrow: https://www.nexusmods.com/x4foundations/mods/1140

Version 9.1.9c (Full pack)
(save-compatible, may miss some new stations and zone's names)

- changed supercruise activation, two ways: 1.starting autopilot (while travelling) or 2.pressing F4 key (while travelling)
- deeply reworked move scripts for performance and better usage of intra-superhighways and error-free behavior
- added conditions in the "move to (Jump)", that is injected in many orders, to consider if the subordinates have jumpdrive and let leader jump (subs will jump too)
- added a simplified jumping function for subordinates that can jump to the leader if they have the jumpdrive
- added jumping feature to default command "protect ship"
- moved gates in family Nhuut, Pontifex's Claim, Omicron Lyrae VI and Ianamus Zura to avoid pathfinding issue (last remaining)
- added a lot of debug messages to check possible ships stuck (it results that no other pathfinding issue remains)
- moved position of Dark Horizon and changed gate to Ianamus Zura instead of Rhy's Defiance (so to be a safer haven). Xenon still occupy the gate area and the gate in Ianamus Zura (new game for the latter)

_____________________________________________________________________________

I've added many DEBUGLOGS that are activated in the scenarios that could cause stuttering.
Of course I've already tested in-game with zero errors sofar...anyway if you activate the debuglog you can look for these errors:

XRSGE-Check2 (ships wanting to cross big distances not using the superhighways), not really causing lag but tedious.
XRSGE-Check3 (ships wanting to use a gate, and the long route, instead of the internal superhighways), causing loop and lag.

XRSGE-Check3 in particular indicates the cause of those ships going on and back in a loop through a gate. This should be definitely resolved by latest version.

Stuttering was also caused by ships looping in other movesets involving superhighways (that the engine knows only as a link between TWO different sectors). I discovered that even a single ship looping is enough to cause some stuttering even if general fps are high. This should be no more.

Should you see any "XRSGE-Check" or "XRSGECheck" other than these, it can also be reported. I am quite confident that this will not be needed but who knows what happens at later game's stages.
ziplock815
Posts: 479
Joined: Wed, 8. Oct 14, 20:30

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by ziplock815 »

Latest version - some ships don't have any problems with pathfinding, the others still do - trying to reload orders , maybe they'll "unbug" eventually :D
Also fps dropped a lot after the update

Realspace "thanks a lot" for connecting dark Horizon to Ianamus zura, now teladi are building their defence platforms here too :lol:
Well, at least this sector won't be empty

Edit: nah, my ships still keep acting weird flying in circles around jumpgates and shws in Ianamus zura and trinity sanctum, both have jumpdrives. The one is set to "tarde for HQ", the other one is trading for station that's being built in Dark horizon, but is stuck near the jumpgate in Ianamus Zura to Dark horizon (the ship isn't even flying in circles - it's spinning :lol: ). What's strange, npc ships doesn't seem to have problems with pathfinding. There's however a large group of patrol ships near to the gate to Dark Horizon, but maybe they just mind their well "patrol" business...
Realspace
Posts: 1808
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Realspace »

Can you try starting a new game for test?

Many ships could still be stuck with the old order and they think the gate is somewhere else, so they behave strangely. They'' eventually pass to the new command.
I started a new game and let it go for some time, fps are very high and no stuttering. The only ships I see at Ianamus gate to Dark Horizon are the ministry battle ships attacking the xenon defence :D
I am uploading a patch with advanced jump commands for NPC AI that can use the jumpdrive for patrol etc. as a fleet.
Realspace
Posts: 1808
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Realspace »

The Expanse Reborn - PATCH

:arrow: https://www.nexusmods.com/x4foundations/mods/1140

Version 9.1.9e (PATCH)
(save-compatible, may miss some new stations and zone's names)
- fixed Argon Metal City lacking solid storage (new game required)
- changed lone (Xeon) asteroids, not asteroid stations, to be ownerless (new game required)
- injected Move To (Jump) to the default command: "protect station", "patrol", "protect position"
(these commands are important for the NPC AI, the player can already command "Move To" while the default command is operative)
(Patrol command in particular is very important, now NPC ships patrolling galaxy will use the hypergates if available)
- added option for NPC AI too: if subordinates have all jumpdrive, leader will jump, otherwise will fly normally
(as before, player can also activate the J U M P option in the "Move To" command for any leader, regardless if subordinates have jumpdrive or not, to force it to jump)

9.1.9d --> 9.1.9e == I've further cleaned the move scripts, no error or negligible..
__________________________________________________________

I've added the NO SUPERHIGHWAY MOD in the optional files. It removes ALL SHW except those in latest Rebirth sectors.
I can't give support if you play with this but expect no issue if not that ships will take forever to reach destination.
Of course HYPERDRIVE is almost mandatory.
This is also a test for performance (I strangely saw better fps without shw even if the distances are huge).
Also, superhighways can be re-activated thereafter (removing the mod), should..
ziplock815
Posts: 479
Joined: Wed, 8. Oct 14, 20:30

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by ziplock815 »

Ships still have problems with pathfinding when they need to cross several sectors. They only find their way if ordered step by step.
Fps was normal at first, then it started to drop significantly. Will test the new game and write back.
Realspace
Posts: 1808
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Realspace »

I finally found the holy grail of the issue. A piece of code, big one, that sets big ships and leaders to wait at gates. But because gates are many (Superhighway is considered a gate by the engine) the ships loop even if pathfinding is linear. We had observed that big ships had problems using the shw while small ships not. It was this code, actually also smaller but leader ships would stuck at gates.

I had also, unaware, put it again in my scripts in some of the latest patches. That's why previous version worked better but still some ships that were not "intercepted" by my previous scripts would end in vanilla code and stuck. Now I wrote a code that applies to all ships, also those that used to skip it.

I solved that one and rewrote...again...the move scripts. I removed entirely that piece of shi*...ehm..code :mrgreen: and added other checks to avoid the ships to get lost. Also added some hidden (low attention) forced warp of ships that stay behind. Now in sectors as The Reach (that is quite empty) I have zero stuttering.

Also took the time to rewrite the Supercruise. It activates as usual after travel starts, but there are 2 options to stop it (pressing F4) or choosing the STOP in the menu popup that starts after cruise activates.

Also made it simpler: Sector Cruise crosses 9000km and can be stopped, Normal cruise some hundreds and is faster to recharge. Also reworked the effects, less invasive visuals.
I had unintentionally made it continue (the sector cruise) indefinitely but could not reproduce what caused it to fix it as a feature. There is a function to set it never stop (unless you stop it manually) but it is bugged, the cruise remains active even when the ship returns to normal speed. So for now it makes multiple jumps of 9000km but auto-stops.

The always active one was really nice, I tested it in a galaxy without superhighways. Seemed I was playing Elite...but better :D

Apply patch 9.1.9f and tell me how it goes..

:arrow: https://www.nexusmods.com/x4foundations/mods/1140
ziplock815
Posts: 479
Joined: Wed, 8. Oct 14, 20:30

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by ziplock815 »

Well, my ships seem to have unbugged and fps is back to normal, everything's smooth as butter, stuttering is gone
Thanks for the quick fix :)

if you someday make planet landings possible it will definitely be better than Elite :D
Realspace
Posts: 1808
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Realspace »

Great!..I let the game going for some hours and could also see no lag and no errors ...thanks to the grace of the code! I almost gave up.
Of course the big number of superhighways has its impact. It is as every shw is another sector for the move calculations, as if we'd play in a 500 sectors game. Indeed removing them increases performance. But now it is ok.
My next step could be adding in-sector jumping at least for ships having the advanced jump drive. That could also ease the path calculations and be a nice plus for the XL ships.
Vectorial1024
Posts: 312
Joined: Mon, 30. Jul 18, 04:16
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Vectorial1024 »

Hi there! Right now Logistics Guidance is updated to be able to distinguish between sector and cluster range. A sector is any hexagon in the map, and a cluster is specifically the "large" hexagons.

The motivation is that, for multi-sector systems, since all connected sectors will have gate distance = 0, ships will still run around everywhere in the cluster even if we limit maxrange=0, which may not be what we want.

Not sure how exactly this will correspond to XRGSE terms, but I thought I should let you know.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!
Logistics Guidance: Manually adjust station logistics efficiency.
Realspace
Posts: 1808
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Realspace »

Hi! Thanks, Latest XRSGE has always 1 cluster = 1 sector except Avarice where I left the vanilla 3 (sub)sectors cluster. All others as Black Hole Sun or Grand Exchange etc. are one sector only
ziplock815
Posts: 479
Joined: Wed, 8. Oct 14, 20:30

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by ziplock815 »

Realspace, thanks a lot for the latest version. Fps is even better than it was before.
Couple of words about deep space supercruise - I think it's a little bugged. Small example: I'm playing the split plot at the moment, the objective is to find the slave ship. The mission waypoint leads to some distant point in empty space 25 000 kms away so I use a small range drive - it works for some seconds than just stops (maybe that's intended bc it needs energy or that's bc of asteroid fields covering most part of the Family tkr sector). Several times of turning on/off the short range drive and than it goes crazy :lol: it makes you fly by inertia 200km/s per second and you can't stop no matter what you're trying to do. Well, it stops eventually, but when you're already 1000 kms away. I tried the long range drive, but not only couldn't I stop, but I started to have a slideshow.
Btw the next waypoint led to 100 000 kms away so I don't have much if a choice so I'm going to use the long range supercruise once more, hope my PC won't fry :lol:
Realspace
Posts: 1808
Joined: Wed, 15. Nov 06, 10:21
x4

Re: [Realspace MODS] "STARS" - "XRSGE" - "REM" - various

Post by Realspace »

Do you play without superhighways?? :o you're my hero :mrgreen:

About supercruise, in latest version I added the F4 button to stop it for emergency, also a STOP button should appear after a few seconds using the SectorCruise :sceptic:
Be sure not to use one of the optional files, use the latest included in 9.1.9f which activates after travel drive starts. The optional one starting with autopilot can make strange things indeed.. :mrgreen:
I think it was the one causing the supercruise not to stop (which I was looking to reproduce but with a stop option as I later added).

Return to “X4: Foundations - Scripts and Modding”