[MOD] Encounters

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

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

User avatar
Moonrat
Posts: 1353
Joined: Sun, 20. Apr 08, 16:20
x4

[MOD] Encounters

Post by Moonrat » Sun, 28. Jul 19, 20:38

Compatibility

X4 5.1 HF3 (479084) - 2022-06-13
DLC - Split Vendetta
DLC - Terran Cradle of Humanity
DLC - Tides of Avarice


* * * V1.4 is available on NEXUS and the STEAM Workshop * * *

*** Encounters v1.3 onwards - Please note that within Inner Terran & Windfall/Avarice sectors, 'encounter' behaviour is more selective and sometimes removed altogether (this is to follow X4 lore) ***

Prologue

"Encounters" in deep space... love them or hate them? It was once said ...

"You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time..."

Sorry EGOSOFT it's mission impossible ... or maybe you can please everyone?

Where do we start...?

Description

Once you leave the busy part of a sector the game engine (via the MD Encounter script) starts to jump small groups of enemy ships (out of thin air) right alongside you every ~60s, one group after the other... endlessly!!

This mod changes this annoying behaviour and adds more variance to the game experience in "deep space". Deep space is anything >130km from the sector "centre". Egosoft designed the 'encounter' dynamic to transport (unseen) ships already built in another part of the universe to make the large empty spaces between far-flung stations beyond seem less empty. A nice idea... and it keeps the economy functioning as per design... but unfortunately it's not been very well implemented...

Browsing the various forums I have noticed the "encounters" 'fans' have asked for...

Code: Select all

Less of them                                            Now every 9-10 minutes instead of every 60 seconds
No more ships jumping right next to you                 Now radar-range aware, they appear just when they should... not before
No more ships always in your path                       Now more variation in positioning ahead
Always the same, regardless of play progression         Encounter instances vary per encounter now based on fight rank
Pirates always ignoring you                             Hotshot traders beware, pirates prefer rich businessmen with a high trade rank!!
Khaak should be rarer                                   They appear less often but now sometimes there are lethal swarms
Missing Xenon threat                                    Ooops... you folks should have kept quiet ... now sometimes destroyers & frigates 
Pirates not a threat                                    More variety and now they've brought their friends along to play with you
Too many criminals loitering at space stations          Fewer criminals with more/less Police (for each race)
With the first release of the mod I attempted to solve many of the more annoying features whilst providing a working codebase for further functionality.

Changelog
v1.4
  • New : New sector defence jobs - local allied forces now interdict (more as player's reputation drops)
    New : Advanced missile munitions added to some station and ship encounters (EMP, Smart, etc)
    New : New vanilla wares added to re-worked crate ware lists
    New : Tide of Averice specific wares added to crate ware lists
    New : Debris/Wrecks now have scrap yields based on the size & local sector economy
    New : Paranid object & ship encounters now accurately reflect the state of Trinity unification (or not)
    New : Increased Khaak ship encounters with deepspace distance
    Mod : Reworked balancing of crate wares between encounter categories (trader/military/criminal)
    Mod : Sector economy level now influences the type of defence base present
    Mod : AdSign spawns are now affected by sector economy level
    Mod : Increased AdSign chance near spawned station objects (x2)
    Mod : Encounters for high-speed player ships rebalanced
    Mod : Lockbox association added for minefield & probes (low probability)
    Mod : Better relationship between object sub-types & wares with fading sector Security/Economy levels
    Mod : Reduced distance of detection which blocks new object creation (-25%)
    Mod : Warped encounter ship distance filter increased to prevent repeat encounters (+100%)
    Mod : Existing crate object selection is now based on sector size, not radar
    Mod : Reduced large wreck probability (-25%)
    Mod : Non-Terran ships no longer spawn within Terran inner core sectors
    Mod : Increased encounter ship aggression to players with negative sector owner relationship
    Mod : Small performance improvements
    Fix : Full range of AdSigns is now available
    Fix : Mining ship encounters within sectors without resources no longer occur (excluding resource scouts)
    Fix : Object ownership in unclaimed & player sectors corrected to have neighbouring race alignment only
    Fix : AdSigns are no longer generated within Khaak, Xenon or ownerless sectors
    Fix : Ensure all minefields & defence grids contain at least one weapon object
    Fix : Corrected "minus" probability error for Outposts
    Fix : Game startup errors (lookup errors for non-existent variables)
    Fix : Fixed errors in the log associated with Lockbox spawns
v1.3
  • New : Tides of Avarice compatibility (adhering to X4 lore)
    New : AdSign objects
    Mod : Vessel encounter 33% uplift (due to 5.x game changes)
    Mod: Object encounter 20% uplift (due to 5.x game changes)
    Fix : Asteroid cluster populations reduced
v1.2
  • New : Various types of encounters are now enabled in some Terran/Pioneer sectors (adhering to X4 lore)
    New : Text is now file-based to permit internationalisation (and future extensions)
    New : New varieties of race-specific asteroid bases (work in progress)
    New : New drops by asteroid bases (work in progress)
    New : Terran/Pioneer defence bases (0-9) (new COH compatibility)
    New : New Argon defence bases (0-3)
    New : Greater variability of Khaak bases
    New : New Paranid defence bases (0-3)
    New : New Split defence bases (0-6)
    New : New Teladi defence bases (0-3)
    New : Job to generate Yaki encounters
    New : New race-specific crate contents for Terran/Splitsectors (DLC compatibility)
    New : Extra inventory items added to crate encounters (due to X4 additions)
    New : Setup file inclusion to permit DLCs to be more easily incorporated
    New : XR Ships Mod compatibility to ensure new jobs generate encounters
    New : Switch to disable defence bases if required
    Mod : Better window position within defence stations
    Mod : MD script & cues restructure to prevent other mods from disabling the 'encounter' mechanism as a secondary side-effect
    Mod : Altered Argon police/criminal race-specific job values
    Mod : Free Split race-specific police/criminal job values (new SV compatibility)
    Mod : Terran race-specific police/criminal job values (new COH compatibility)
    Mod : Change of primary encounter values to rebalance vessel encounter types
    Mod : Teladi defence bases - more cargo drones, fewer defence drones
    Mod : Split defence bases - more defence drones, fewer cargo drones
    Mod : Changed placement of crates around encounter objects
    Mod : Ministry of Finance defence stations predominate inTeladi sectors
    Mod : Terran Protectorate defence stations predominate Pioneer sectors
    Fix : Multiple causes of errors being observed within logfiles
v1.1
  • New : Defence bases for all major races can now form a part of any defence grid (balanced to player fight skill)
    New : Asteroid bases for all major races & minor factions (balanced to player fight skill) with new explosion effect (base variety is a work in progress)
    New : Drone defence force added to defence bases (balanced).
    New : Sector Security fades with distance into deep space to reflect decreased sector control (ie. increased hostile environment and encounters).
    Fix : Ship speed now affects the frequency of encounters so faster ships should now see more encounters.
    Fix : "xs" class ships are now ignored during encounter sense check so Escape Pods don't disable encounters when the player returns to sector core.
    Fix : Slightly higher debris probability associated with defence grids & minefields.
    Fix : Reduced probability of Xenon satellites & resource probes.
    Fix : Asteroid types now have a minimum weighting to avoid zero-case issue.
    Fix : Corrected divide by zero error when a low chance of asteroid generation creates none.
    Fix : Reduced chance of Khaak structures within Khaak Sectors
v1.0
  • Addition of sub-encounters which populates space with occasional extra content. This appears either alone or in conjunction with other sub-encounters and/or the basic ship encounter mechanism. This currently includes the following but will be expanded and improved as time (and feedback) directs. All extra content is balanced & generated against deep space distance, player trade/fight ranks, sector security and is player/sector faction aware.

    Asteroids (lone or clusters)
    Crates (including money loot)
    Lockboxes
    Defence(s) including mines and laser towers
    Navigation Beacons / Satellites / Resource Probes
    Salvageable Ships
    Wrecks
    Others items of interest...
v0.4
  • Jobs file amended for compatibility with X4 3.00
v0.3
  • Now compatible with Linux implementations
v0.2
  • Several minor bug fixes
    Download now contains missing top-level folder
v0.1
  • Initial Release

Installation

Drop the "encounters" folder into your "Documents" X4 extension folder, this being...
  • D:\Users\<Username>\Documents\Egosoft\X4\94170837\extensions\encounters
Feedback

I have been developing this mod and testing it during play and I feel the balance between encounter occurrence, difficulty and variety is about right for the coding I have done so far. I want to expand and tune this mod further in 2021, so if folks can give feedback and suggestions about what I got right (if anything) and what's still to do (including any bugs) then please do let me hear. This was my very first proper MD coding so please be nice, it was a great voyage of exploration... and I had many nasty encounters !!

Download Link

NEXUS - X4 Encounters

Thanks to Euclid for giving me a hand when I needed it :)
Last edited by Moonrat on Mon, 5. Dec 22, 14:34, edited 27 times in total.
[ external image ]
IEX Download Statistics - LUVi / XRMi ( 3115 / 5415 )
X4 Crexit 324 ; X4 Encounters 3193 (STEAM Unique/Current 6341/3412)

JasonStarcruiser
Posts: 11
Joined: Sun, 18. Jun 17, 22:24
x4

Re: [MOD] Encounters

Post by JasonStarcruiser » Mon, 29. Jul 19, 20:19

I am looking forward to playing with this mod. Thank you Moonrat!

steve_v
Posts: 159
Joined: Sun, 12. Jun 16, 08:39
x4

Re: [MOD] Encounters

Post by steve_v » Wed, 31. Jul 19, 15:36

This looks fantastic, I've been running with encounters disabled due to the irritating behaviour of Egos's implementation, yours sounds perfect.
Also, pretty please?

User avatar
RoverTX
Posts: 1426
Joined: Wed, 16. Nov 11, 18:37
x4

Re: [MOD] Encounters

Post by RoverTX » Sun, 20. Oct 19, 16:55

Any chance of uploading this to the steam workshop?

User avatar
Moonrat
Posts: 1353
Joined: Sun, 20. Apr 08, 16:20
x4

Re: [MOD] Encounters

Post by Moonrat » Mon, 18. Nov 19, 00:04

The mod 'Encounters' is now compatible with 3.00 Beta 1 (373142) - 2019-11-14

https://www.nexusmods.com/x4foundations/mods/333

NOTE : Download version 0.4 - all bug reports here please
Last edited by Moonrat on Mon, 18. Nov 19, 18:11, edited 1 time in total.
[ external image ]
IEX Download Statistics - LUVi / XRMi ( 3115 / 5415 )
X4 Crexit 324 ; X4 Encounters 3193 (STEAM Unique/Current 6341/3412)

Kyle Baxter
Posts: 10
Joined: Sat, 22. Dec 18, 00:36
x4

Re: [MOD] Encounters

Post by Kyle Baxter » Mon, 18. Nov 19, 10:41

Moonrat wrote:
Mon, 18. Nov 19, 00:04
The mod 'Encounters' is now compatible with 3.00 Beta 1 (373142) - 2019-11-14

https://www.nexusmods.com/x4foundations/mods/271

NOTE : Download version 0.4 - all bug reports here please
Your link points to the wrong mod. :) Btw, should i use version 0.4 for my 2.6 game or use 0.3?

User avatar
Moonrat
Posts: 1353
Joined: Sun, 20. Apr 08, 16:20
x4

Re: [MOD] Encounters

Post by Moonrat » Mon, 18. Nov 19, 18:13

Kyle Baxter wrote:
Mon, 18. Nov 19, 10:41
Your link points to the wrong mod. :) Btw, should i use version 0.4 for my 2.6 game or use 0.3?
Corrected, many thanks! :D

The updated version v0.4 will probably work for both X4-2.6 and X4-3.0 but if there's any issue use the v0.3 for X4-2.6
[ external image ]
IEX Download Statistics - LUVi / XRMi ( 3115 / 5415 )
X4 Crexit 324 ; X4 Encounters 3193 (STEAM Unique/Current 6341/3412)

User avatar
Moonrat
Posts: 1353
Joined: Sun, 20. Apr 08, 16:20
x4

Re: [MOD] Encounters

Post by Moonrat » Sat, 30. May 20, 22:15

*** New Release ***

Compatibility

X4 3.20 Beta 2 (399492) - 2020-05-26
Split Vendetta DLC


V1.0
  • Addition of sub-encounters which populates space with occasional extra content. This appears either alone or in conjunction with other sub-encounters and/or the basic ship encounter mechanism. This currently includes the following but will be expanded and improved as time (and feedback) directs. All extra content is balanced & generated against deep space distance, player trade/fight ranks, sector security and is player/sector faction aware.

    Asteroids (lone or clusters)
    Crates (including money loot)
    Lockboxes
    Defence(s) including mines and laser towers
    Navigation Beacons / Satellites / Resource Probes
    Salvagable Ships
    Wrecks
    Other items of interest...
Download Link

https://www.nexusmods.com/x4foundations/mods/333
Last edited by Moonrat on Sun, 20. Dec 20, 18:31, edited 2 times in total.
[ external image ]
IEX Download Statistics - LUVi / XRMi ( 3115 / 5415 )
X4 Crexit 324 ; X4 Encounters 3193 (STEAM Unique/Current 6341/3412)

User avatar
Moonrat
Posts: 1353
Joined: Sun, 20. Apr 08, 16:20
x4

Re: [MOD] Encounters

Post by Moonrat » Sun, 20. Dec 20, 18:29

*** New Release ***

Compatibility

X4 4.00 Beta 3 (422687) - 2020-12-17
Split Vendetta DLC


V1.1
  • New : Defence bases for all major races can now form a part of any defence grid (balanced to player fight skill)
    New : Asteroid bases for all major races & minor factions (balanced to player fight skill) with new explosion effect (base variety is a work in progress)
    New : Drone defence force added to defence bases (balanced)
    New : Sector Security fades with distance into deep space to reflect decreased sector control (ie. increased hostile environment and encounters)
    Fix : Ship speed now affects the frequency of encounters so faster ships should now see more encounters.
    Fix : "xs" class ships now ignored during encounter sense check so Escape Pods don't disable script when the player returns corewards
    Fix : Slightly higher debris probability associated with defence grids & minefields
    Fix : Reduced probability of Xenon satellites & resource probes
    Fix : Asteroid types now have a minimum weighting to avoid zero case issue
    Fix : Corrected divide by zero error when a low chance of asteroid generation creates none
    Fix : Reduced chance of Khaak structures within Khaak Sectors
[ external image ]
IEX Download Statistics - LUVi / XRMi ( 3115 / 5415 )
X4 Crexit 324 ; X4 Encounters 3193 (STEAM Unique/Current 6341/3412)

Mycu
Posts: 408
Joined: Fri, 28. Sep 12, 08:30
x4

Re: [MOD] Encounters

Post by Mycu » Mon, 21. Dec 20, 14:28

Thanks Moonrat for a new update.
I need to wander around the galaxy sometimes ;)
X3 AP 3.1 + XRM
X3 AP 3.1 + LU

User avatar
Moonrat
Posts: 1353
Joined: Sun, 20. Apr 08, 16:20
x4

Re: [MOD] Encounters

Post by Moonrat » Tue, 22. Dec 20, 11:03

Mycu wrote:
Mon, 21. Dec 20, 14:28
Thanks Moonrat for a new update.
I need to wander around the galaxy sometimes ;)
Nice, thanks... :)

* * * Now also available on STEAM Workshop * * *

Please let me know if it doesn't work, it's my first STEAM Workshop mod...
[ external image ]
IEX Download Statistics - LUVi / XRMi ( 3115 / 5415 )
X4 Crexit 324 ; X4 Encounters 3193 (STEAM Unique/Current 6341/3412)

User avatar
PromX
Posts: 122
Joined: Thu, 21. Feb 08, 23:39
x4

Re: [MOD] Encounters

Post by PromX » Sun, 28. Feb 21, 11:26

Will it work with current 4.00 beta 9?

User avatar
Moonrat
Posts: 1353
Joined: Sun, 20. Apr 08, 16:20
x4

Re: [MOD] Encounters

Post by Moonrat » Sun, 28. Feb 21, 18:23

Yes, it's mostly working Ok with the latest Beta but there have been all sorts of changes to the vanilla Khaak objects & behaviour in the last few releases of the 4.0 Betas including Khaak Hives, Nests, swarms & Defence Disks (which affect this mod in a minor way but which I am correcting for the next release). I believe that EGOSOFT are intent on making the Khaak a real active threat to mining particularly and away from the sector core. I'm not sure yet if they have now been buffed so much that I need to nerf them within this mod though... even more so as the Khaak's behaviour seems to be an EGOSOFT work in progress. Once I'm through making the changes I want for the next release I'll re-test and see if I need to alter anything Khaak related.

As you can understand, us modders are always in catch-up mode whenever game changes are made ... but we get there eventually! :roll:
[ external image ]
IEX Download Statistics - LUVi / XRMi ( 3115 / 5415 )
X4 Crexit 324 ; X4 Encounters 3193 (STEAM Unique/Current 6341/3412)

User avatar
Moonrat
Posts: 1353
Joined: Sun, 20. Apr 08, 16:20
x4

Re: [MOD] Encounters

Post by Moonrat » Wed, 26. May 21, 22:57

Please note that the Terran COH DLC specifically disables the encounter mechanism from generating ships (and objects) within any of the new Solar System Sectors. In the next release, I shall be modifying this behaviour to permit certain encounters at the edges of the Terran territory. I also have a feeling that since v4.00, (ship) jobs containing encounter ids have been reduced somewhat leading to a drop-off of all encounters. If this does appear to be the case then I shall adjust the frequencies upwards accordingly.
[ external image ]
IEX Download Statistics - LUVi / XRMi ( 3115 / 5415 )
X4 Crexit 324 ; X4 Encounters 3193 (STEAM Unique/Current 6341/3412)

User avatar
Moonrat
Posts: 1353
Joined: Sun, 20. Apr 08, 16:20
x4

Re: [MOD] Encounters

Post by Moonrat » Sat, 19. Feb 22, 21:52

*** New Release v1.2 ***

Compatibility

X4 5.00 Beta 5 (472127) - 2022-02-16
DLC - Split Vendetta
DLC - Terran Cradle of Humanity


* * * v 1.1 is available on STEAM Workshop * * *
* * * v 1.2 will be made available on STEAM Workshop after NEXUS 'testing' * * *

NEXUS - Encounters

V1.2
  • New : Various types of encounters are now enabled in some Terran/Pioneer sectors (adhering to X4 lore)
    New : Text now file-based to permit internationalisation (and future extensions)
    New : New varieties of race-specific asteroid bases (work in progress)
    New : New drops by asteroid bases (work in progress)
    New : Terran/Pioneer defence bases (0-9) (new COH compatibility)
    New : New Argon defence bases (0-3)
    New : Greater variability of Khaak bases
    New : New Paranid defence bases (0-3)
    New : New Split defence bases (0-6)
    New : New Teladi defence bases (0-3)
    New : Job to generate Yaki encounters
    New : New race-specific crate contents for Terran/Splitsectors (DLC compatibility)
    New : Extra inventory items added to crate encounters (due to X4 additions)
    New : Setup file inclusion to permit DLC's to be more easily incorporated
    New : XR Ships Mod compatibility to ensure new jobs generate encounters
    New : Switch to disable defence bases if required
    Mod : Better window position within defence stations
    Mod : MD script & cues restructure to prevent other mods disabling the 'encounter' mechanism as a secondary side-effect
    Mod : Altered Argon police/criminal race-specific job values
    Mod : Free Split race-specific police/criminal job values (new SV compatibility)
    Mod : Terran race-specific police/criminal job values (new COH compatibility)
    Mod : Change of primary encounter values to rebalance vessel encounter types
    Mod : Teladi defence bases - more cargo drones, fewer defence drones
    Mod : Split defence bases - more defence drones, fewer cargo drones
    Mod : Changed placement of crates around encounter objects
    Mod : Ministry of Finance defence stations predominate inTeladi sectors
    Mod : Terran Protectorate defence stations predominate Pioneer sectors
    Fix : Multiple causes of errors being observed within logfiles
[ external image ]
IEX Download Statistics - LUVi / XRMi ( 3115 / 5415 )
X4 Crexit 324 ; X4 Encounters 3193 (STEAM Unique/Current 6341/3412)

User avatar
Moonrat
Posts: 1353
Joined: Sun, 20. Apr 08, 16:20
x4

Re: [MOD] Encounters

Post by Moonrat » Sat, 2. Jul 22, 23:19

*** New Release v1.3 ***

Compatibility

X4 5.1 HF3 (479084) - 2022-06-13
DLC - Split Vendetta
DLC - Terran Cradle of Humanity
DLC - Tides of Avarice[/color]

* * * V1.3 is available on NEXUS and the STEAM Workshop * * *

*** Encounters v1.3 onwards - Please note that within Inner Terran & Windfall/Avarice sectors, 'encounter' behaviour is more selective and sometimes removed altogether (this is to follow X4 lore) ***

V1.3
  • New : Tides of Avarice compatibility (adhering to X4 lore)
    New : AdSign objects
    Mod : Vessel encounter 33% uplift (due to 5.x game changes)
    Mod: Object encounter 20% uplift (due to 5.x game changes)
    Fix : Asteroid cluster populations reduced
Last edited by Moonrat on Mon, 4. Jul 22, 23:59, edited 2 times in total.
[ external image ]
IEX Download Statistics - LUVi / XRMi ( 3115 / 5415 )
X4 Crexit 324 ; X4 Encounters 3193 (STEAM Unique/Current 6341/3412)

User avatar
alt3rn1ty
Posts: 2297
Joined: Thu, 26. Jan 06, 19:45
x4

Re: [MOD] Encounters

Post by alt3rn1ty » Sun, 3. Jul 22, 09:56

Moonrat, the asteroids cluster populations reduction, should that improve performance of the game in asteroid heavy sectors? (that is when compaired with a vanilla game which has not seen this mod installed before)

Anyway regardless of your answer I am (for the first time since X4 was released) going to be modding the game, first mod to install will be this one because the game so badly needs an overhaul of encounters.

Encounters have always jarred the immersion experience for me, plus you have some nicely considered changes in this mod.

I especially like that you introduced Xenon as encounters, for us late gamers who mistakenly made them extinct I will be able to get drops I need from them again :)

Thank you for the effort put into this, very much appreciated.
Laptop Dell G15 5510 : Win 11 x64
CPU - 10th Gen' Core I7 10870H 2.2-5.0ghz, GPU - NVidia Geforce RTX 3060, VRAM 6gb GDDR5,
RAM - 32gb (2x16gb, Dual Channel mode set in BIOS) DDR4 2933mhz Kingston Fury Impact,
SSD - Kioxia M.2 NVME 512gb (System), + Samsung M.2 NVME 970 Evo Plus 1tb (Games)

:boron: Long live Queen Polypheides and may her tentacles always be supple.
Seeker of Sohnen.

User avatar
Moonrat
Posts: 1353
Joined: Sun, 20. Apr 08, 16:20
x4

Re: [MOD] Encounters

Post by Moonrat » Sun, 3. Jul 22, 11:09

alt3rn1ty wrote:
Sun, 3. Jul 22, 09:56
Moonrat, the asteroids cluster populations reduction, should that improve performance of the game in asteroid heavy sectors? (that is when compaired with a vanilla game which has not seen this mod installed before)
Anyway regardless of your answer I am (for the first time since X4 was released) going to be modding the game, first mod to install will be this one because the game so badly needs an overhaul of encounters.
Encounters have always jarred the immersion experience for me, plus you have some nicely considered changes in this mod.
I especially like that you introduced Xenon as encounters, for us late gamers who mistakenly made them extinct I will be able to get drops I need from them again :)
Thank you for the effort put into this, very much appreciated.
Hi, thanks for the nice comments. The asteroid reduction was just a minor change as sometimes I thought "Encounters" was generating slightly too many asteroids within "encounter" clusters. "Encounters" will not help I fear with the performance problem related to asteroid-heavy sectors. My script scans the forward area of travel for any other in-game objects and (aside from ship encounters) will not generate any new objects (including asteroids) if it finds stuff already nearby, including vanilla generated asteroids. I coded this as it didn't seem to make sense that on the return journey via explored space you'd suddenly find objects you'd mysteriously missed on the way out. And by way of function, it also helps in alleviating the load on your CPU/graphics card by not stressing them out even more by generating additional content within asteroid heavy regions of space.

The density of the in-game asteroid fields is set by the config files and the game itself. I was very conscious of creating too much stuff which might slow down the player's experience and I believe that current levels are probably about OK. If anything some players want even more frequent encounters (which can be done by changing values in my scripts) but I have to aim to try and please as many people as I can... an always somewhat difficult ask. :D

EDIT : The encounter ships are, like the vanilla game encounters mechanism, warped in from remote sectors using any job with an "encounter_id" attribute set. If Xenon ships disappear from the universe entirely late game then my script won't have any to utilise ... but I suspect that somewhere in the Universe there'll be some Xenon someplace ??
[ external image ]
IEX Download Statistics - LUVi / XRMi ( 3115 / 5415 )
X4 Crexit 324 ; X4 Encounters 3193 (STEAM Unique/Current 6341/3412)

User avatar
alt3rn1ty
Posts: 2297
Joined: Thu, 26. Jan 06, 19:45
x4

Re: [MOD] Encounters

Post by alt3rn1ty » Sun, 3. Jul 22, 12:08

Moonrat wrote:
Sun, 3. Jul 22, 11:09
Hi, thanks for the nice comments. The asteroid reduction was just a minor change as sometimes I thought "Encounters" was generating slightly too many asteroids within "encounter" clusters. "Encounters" will not help I fear with the performance problem related to asteroid-heavy sectors. My script scans the forward area of travel for any other in-game objects and (aside from ship encounters) will not generate any new objects (including asteroids) if it finds stuff already nearby, including vanilla generated asteroids. I coded this as it didn't seem to make sense that on the return journey via explored space you'd suddenly find objects you'd mysteriously missed on the way out. And by way of function, it also helps in alleviating the load on your CPU/graphics card by not stressing them out even more by generating additional content within asteroid heavy regions of space.

The density of the in-game asteroid fields is set by the config files and the game itself. I was very conscious of creating too much stuff which might slow down the player's experience and I believe that current levels are probably about OK. If anything some players want even more frequent encounters (which can be done by changing values in my scripts) but I have to aim to try and please as many people as I can... an always somewhat difficult ask. :D
:) Understood
EDIT : The encounter ships are, like the vanilla game encounters mechanism, warped in from remote sectors using any job with an "encounter_id" attribute set. If Xenon ships disappear from the universe entirely late game then my script won't have any to utilise ... but I suspect that somewhere in the Universe there'll be some Xenon someplace ??
Ah I see, will see what happens. At one point I whittled the Xenon down to one sector which I intended to confine them to .. But then the Paranid went in there with big stompy boots and finished them off. So now I see Xenon plots repeatedly trying to reestablish in just that one sector, but the Paranid are so invested in that sector they destroy all attempts of the Xenon to recover .. trouble for me is if I try to eliminate the Paranid from the area its really not a wise move :)
I might just be done with it and start a whole new game.
Laptop Dell G15 5510 : Win 11 x64
CPU - 10th Gen' Core I7 10870H 2.2-5.0ghz, GPU - NVidia Geforce RTX 3060, VRAM 6gb GDDR5,
RAM - 32gb (2x16gb, Dual Channel mode set in BIOS) DDR4 2933mhz Kingston Fury Impact,
SSD - Kioxia M.2 NVME 512gb (System), + Samsung M.2 NVME 970 Evo Plus 1tb (Games)

:boron: Long live Queen Polypheides and may her tentacles always be supple.
Seeker of Sohnen.

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

Encounters for big sectors

Post by Realspace » Sat, 1. Oct 22, 17:50

Hi Moonrat, hope you're reading this. First of all thanks for this important mod, it adds a missing layer to the game. In my XRSGE mod, Encounters is of paramount importance because I enlarged the sectors up to even 50.000kms and put derelicts far in the low orbit. So I was wondering how to fine-tune your mod to work at best in this large universe. I see these aspects:

1) Sectors are very large, so stations can be at 3000km of distance, while deep space as told is up to 50.000. What should be modified to make the script calculate the deep space for encouters in this new range?
2) my mod adds a second sector to each vanilla cluster + it adds tens of new clusters. Will Encounters work as default or does it need to have these new sectors added to a list?
3) any other thing correlated to large space that I did not think?
4) I wrote a different engine mod for the galaxy, where ships travel at high speed and have inertia, anything that needs to be changed for encounter ships such as spawning closer or matching the speed?

Of course it'd be great if you could write a version for the new galaxy, hope i don't ask too much :)
Greetings!
RS

Post Reply

Return to “X4: Foundations - Scripts and Modding”