[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

Realspace
Posts: 1642
Joined: Wed, 15. Nov 06, 10:21
x4

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

Post by Realspace »

ziplock815 wrote: Thu, 20. Mar 25, 01:51 Hyperion ship doesn't have a jumpdrive slot. Is it a bug or you just haven't added jumpdrive to this ship yet?
I haven't. Does jumpdrive work in your game for npc? It stopped working here :evil:
I've redone jumpdrive for player, it works only if you point guidance to a portal, so to have better control on when jumping. But npc stopped using it.. they are different files.Spent hours rewriting with no success :rant:
ziplock815
Posts: 406
Joined: Wed, 8. Oct 14, 20:30

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

Post by ziplock815 »

Well, I haven't seen any hypergates in my game, so I couldn't check. But I did find some abandoned ships with jumpdrives installed and sold them for a lot of credits :D
Realspace
Posts: 1642
Joined: Wed, 15. Nov 06, 10:21
x4

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

Post by Realspace »

ziplock815 wrote: Thu, 20. Mar 25, 12:40 Well, I haven't seen any hypergates in my game, so I couldn't check. But I did find some abandoned ships with jumpdrives installed and sold them for a lot of credits :D
ah..good to know, will rewrite the loadout of abandoned ships :D find and grab as many as you can before the next update :mrgreen:

BTW I've rewritten the JUMP for player (only).

:arrow: https://www.nexusmods.com/x4foundations ... ?tab=files

I made it much more immersive and less cheaty, also allows better control over the procedure. To jump you the player have to:
- have the jumpdrive mounted
- be within 5 km of a portal that acts as starting jump point
- target another portal (not anywhere, you have to exactly target the portal and activate guidance to the destination portal)
- activate autopilot (as before)
So to jump you have to plot your course.
A serie of notifications should appear lower in the hud (not on screen) in case: a) you point a portal but are not close to a starting portal; b) your are close to a starting portal; c) the destination portal is too close (less than 2 sectors) or too far (more than 6-9 sectors, depending on the tier of the jumpdrive)
Realspace
Posts: 1642
Joined: Wed, 15. Nov 06, 10:21
x4

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

Post by Realspace »

ziplock815 wrote: Thu, 20. Mar 25, 01:51 Hyperion ship doesn't have a jumpdrive slot. Is it a bug or you just haven't added jumpdrive to this ship yet?
I've updated the patch, it has the jumpdrive mounted by Hyperion
ziplock815
Posts: 406
Joined: Wed, 8. Oct 14, 20:30

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

Post by ziplock815 »

Thanks for the quick update :)
Found an issue - sector overlapping: Third Redemption and Belt of Aguilar 2 Planet Paragon
Also a question - how do I find hypergates? Sectors are too big :roll:
Realspace
Posts: 1642
Joined: Wed, 15. Nov 06, 10:21
x4

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

Post by Realspace »

ziplock815 wrote: Fri, 21. Mar 25, 02:09 Thanks for the quick update :)
Found an issue - sector overlapping: Third Redemption and Belt of Aguilar 2 Planet Paragon
Also a question - how do I find hypergates? Sectors are too big :roll:r
Third Redemption is the one added by Hyperion dlc, right? Bc I also made one. That's why I asked about the Hyperion before, I was sure it'd overlap. The mod is stll not fully compatible with the dlc.
Hypergates...they are one in Argom Prime, one in black hole sun, and others I must check, strange you did not meet one
MarStrMind
Posts: 95
Joined: Wed, 12. Mar 25, 12:48
x4

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

Post by MarStrMind »

I would have liked it if the Jump Drive is not selected by default when buying ships. I am playing a new save, working toward a miner, which is about 300,000 CR. Suddenly with the update, the same ship is about 4,400,000 CR.

I checked the component list, and found the Jump Drive to be added, which I actually do not want.

Now I have to unselect this for every ship and save a custom loadout.

It could be an idea to consider to offer the mod in two variants. One with the Hypergates, and one without. I would prefer the option without the Hypergates.

PS: At least make the Jump Drive not selected by default.
X4 in VR - My guide, reloaded for 2025
Realspace
Posts: 1642
Joined: Wed, 15. Nov 06, 10:21
x4

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

Post by Realspace »

The large jumpdrive is defaulted for XL ships only, the other ships have it optional. I wll remove the default version because it makes no sense if npc can not jump.
Doing two versions is not easy, sorry can not do it, I can indeed make the jumpdrive always optional for xl ships too.
I've been struggling for days writing a code that works for npc but the X4 files for moving are convoluted and bloated, any additional jump exception adds lags (Rebirth 's scripts were much leaner).

By the time, thanks to Euclid who let me modify his player's jump scripts, I integrated the autopilot jump to portal with another function: local (some sectors) jump to anywhere through user interface menu that activates when close to a portal. Also added many visual and sound effects.
The use of jumpdrive has meaning in a universe where all ships jump, but will remain for now bc I don't give up the look for a solution to make npc jump. Maybe a workaround that ignores vanilla move scripts.

What I look for is a not cheaty and more immersive way to accelerate economy and movement of ships without overdoing. Since the player is not everyehere, npc could indeed make small jumps (few sectors) while out of attention. Just few gates (btw the engine sees internal superhighways as jump steps...so a big sector where you cross through superhighways is two jump steps).
I wish to do a simple generic script routine that, say, every some time checks the npc ships and teleports them closer to their destination if it is a far destination.
MarStrMind
Posts: 95
Joined: Wed, 12. Mar 25, 12:48
x4

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

Post by MarStrMind »

For me the Jump Drive is selected by default even on S ships. Like I explained, the miner I was trying to buy is an S class.
X4 in VR - My guide, reloaded for 2025
Realspace
Posts: 1642
Joined: Wed, 15. Nov 06, 10:21
x4

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

Post by Realspace »

MarStrMind wrote: Sat, 22. Mar 25, 09:29 For me the Jump Drive is selected by default even on S ships. Like I explained, the miner I was trying to buy is an S class.
Default means it can not be removed, as the Large Jumpdrive for XL ships.
What you say is the loadout, which is optional...anyway I've reduced the jumpdrive cost to respect. 1.000.000, 2.000.000 and 3.000.000 so no more costly.
I don't want to remove it for now because there is no way to make it an option for player only and I don't want to add it as a research item.
Will check to change the loadout too..
MarStrMind
Posts: 95
Joined: Wed, 12. Mar 25, 12:48
x4

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

Post by MarStrMind »

Just for the fun of it... I went to create a custom start and went to the starting ship selection. There, indeed, the Jump Drive is not selected, only for the XL ships. I guess I will have to manually unselect it then from the loadout when buying ships from a wharf.
X4 in VR - My guide, reloaded for 2025
Realspace
Posts: 1642
Joined: Wed, 15. Nov 06, 10:21
x4

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

Post by Realspace »

Because I start to get annoyed by the complaints about travel limitations (not here, but in the nexus)...I made a small mod to remove them; for a piece of cake experience in The Expanse.
Travel as no tomorrow mini-mod (install as another mod)
Download available in the optional files :arrow: https://www.nexusmods.com/x4foundations ... ?tab=files
:D

------------------

I've uploaded a new version of The Expanse.
8.1.0
NEW functions in jump drive from portals (you can choose to jump to a sector close-by or to another portal (as usual), lot of effects and messages to help.
increased jump range when going to another portal (about 12 jumps for normal jumpdrive) and no limitation for enhanced jumpdrive
changed the names of jumpdrives into: basic, standard, enhanced (as in REM's engines)
added the hud interface when close to portal to chose the jump procedure
reduced jump drive cost (a lot)
removed default jumpdrive for XL ships
REMOVED npc jump
added Euclid's Subordinates jump;

For now, subordinates jump even if not having the jump drive (as in the original file) because every time I try to add the condition to have the jumpdrive, as I did in other script files, I get errors :evil:
Will change it when a working code is available.

Thanks to Euclid who let me change and build on his player's jump scripts
ziplock815
Posts: 406
Joined: Wed, 8. Oct 14, 20:30

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

Post by ziplock815 »

Realspace, could you please make a small fix to the map so that Third Redemption wouldn't overlap with Belt of Aguilar 2, bc except of this Hyperion dlc works without any issues.
MarStrMind
Posts: 95
Joined: Wed, 12. Mar 25, 12:48
x4

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

Post by MarStrMind »

Apart from the images on Nexus, is there some kind of complete map for this mod? Much like there are complete maps of the vanilla X4? I'm talking about high-res images or something.

Or would it be required to extract the map from the mod and then render it in some kind of tool?
X4 in VR - My guide, reloaded for 2025
Realspace
Posts: 1642
Joined: Wed, 15. Nov 06, 10:21
x4

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

Post by Realspace »

MarStrMind wrote: Sun, 23. Mar 25, 17:56 Apart from the images on Nexus, is there some kind of complete map for this mod? Much like there are complete maps of the vanilla X4? I'm talking about high-res images or something.

Or would it be required to extract the map from the mod and then render it in some kind of tool?
There are some new tools in the nexus, like sector creators etc. With these you can load the game + xrsge and I suppose have a visual representation of the galaxy, then a screenshot and it is ready. If you do please share it here :)

-----------------------------------

Please Yvona come inside, I did not mean to offend you.....at least, wear your helmet, it is not safe at -273° Celsius :lol:
Image Image
ziplock815
Posts: 406
Joined: Wed, 8. Oct 14, 20:30

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

Post by ziplock815 »

Poor Yvona
She got her ship's engines disrupted by the nebulae so she thought it would be quicker to go on foot rather then fly 2000 m/s to the jumpgate 50000 km's away :lol:
MarStrMind
Posts: 95
Joined: Wed, 12. Mar 25, 12:48
x4

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

Post by MarStrMind »

Without spoilers, is it worth to go and explore these points where it either says "Far Out" or "Out of Sector"? Just a yes or no answer please :)

Image
X4 in VR - My guide, reloaded for 2025
Realspace
Posts: 1642
Joined: Wed, 15. Nov 06, 10:21
x4

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

Post by Realspace »

Nope, they are needed to signal the limit of where stuff is in the sector (regions can be beyond it) and to keep the border where it has to be. So, no.

__________________________________

I am further working on the jump scripts. It requires a lot ...a lot of work, but I start to master how the various scripts and orders interact, so to implement the NPC jump feature, already have made the subordinates use portals. It required 3 different new files. While now they just jump to player when he uses the portal or adds subordinates, with these new files they use the portal in both situations, firstly go to the closest portal they found, then initiate a jump to the player.

Next is ai script for all ai ships (subordinates included) to let them jump when a portal is available (and jumpdrive is installed of course).
ziplock815
Posts: 406
Joined: Wed, 8. Oct 14, 20:30

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

Post by ziplock815 »

Found a small issue
Holy Vision 1 Cathedral of Xaar and Holy Vision 3 jumpgate connects with accelerator
btw gas cloud on the north east of the Holy Vision 3 eats fps, it drops even with volumetric fog off
Same issue was in some sector of Ianamus Zura in some asteroid field, don't remember which one exactly :gruebel:
Realspace
Posts: 1642
Joined: Wed, 15. Nov 06, 10:21
x4

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

Post by Realspace »

Will fix it...

Good news folk, I've been working hard on testing various codes on various order/move/ai files involved in the complex ai pathfinding of several situations.
In so-doing (and a lot of failures) I learnt much more on the ai scripts, which regulate how all ships behave (ai or subordinates).
This to say...I managed to have a working JUMPDRIVE for ALL ships, used by AI, no errors no lag, perfect...but as always I made things more complex than they need to be (but better :roll: ). Making ships jump is easy, what I am doing is having different ranges for the different jumpdrive's class (done) but also involving jumpgates and anomalies as intermediate destinations to the end destination, according to the above jump-range (done).

I am struggling to make the ship use the portals as starting point. Firstly I thought my move scripts were wrong, but they were not. To make the engine recognize my portals I had to add a special invisible component otherwise the engine sees any station as portal. Sofar so good, problem is the engine can not find the right zone to teleport but chooses a random zone of any portal (despite me commanding a specific zone close to target) and teleports the ship in distant sectors....well I am tempted to leave this "feature" as a possible error of the jumpdrive :mrgreen:

The number of files involved in doing this work are a lot. All jumpdrive mods out there either limit the experience to player only or max to subordinates. Those old ones trying to change the basic move script, they fail and cause errors/lag. I had tried adapting them, as you know, with bad results. Now that I quite mastered the scripts and rewrote them all from scratch (with several different files I made and various failures of course), the AI pathfinding and jump is very coherent and would say even lessening the burden of calculation for path, by teleporting ships (so by-passing a lot of blacklist checks and interrupts). As always I added a lot of effects, hud messages and pilot's communications to make the whole experience immersive.

My method is the right one, addressing all the order.move files and trade/mine commands/routines so to have a jumping feature that is activated according to the condition: jump drive level, pilot experience, the type of action the ai is performing, etc. For instance I will add the use of jumpdrive to the Expert Trader (a new default command already present in XRSGE), that will use the jumpdrive if mounted, while other lower-level traders won't (I've fixed the big ? appearing instead of a trade icon).

BTW, about player experience, I've already ampliated the player's interface and custom commands not only for activating jump procedures when close to a portal, but also as special commands (jump suit) for subordinates you can activate by calling a subordinate, here some pic:

Image Image

Next week I will probably release this big update :wink:

Return to “X4: Foundations - Scripts and Modding”