X4: Foundations

File information

Last updated

Original upload

Created by

Moonrat

Uploaded by

moonrat2

Virus scan

Safe to use

About this mod

Reworks the vanilla encounter mechanism to be less annoying whilst offering a more varied and rewarding experience.

Permissions and credits
Changelogs
Compatibility

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

* * * * * * *
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 main gripes of "encounters" 'fans' have often been some of those things solved below. 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.2

  • Fix : Removed AdSigns objects (temporarily) to help investigate 'xu_particle' game crash

v1.4.1

  • New : Race & faction specific names for outposts and some other objects
  • Mod : Scaled ranges replace absolute values for object encounter calculations (for better variance & large core sector sizes)
  • Mod : Better handling for increased ship radar ranges
  • Mod : Better handling for very large assets to reduce visual "popping" 
  • Fix : Vessel encounters for existing games function as before (a problem introduced in v1.4)
  • Fix : Fixed error related to warped subordinate vessels
  • Fix : A few minor errors observed on occassion in the error log

v1.4

  • New : New sector defence jobs - local allied forces now interdict (more as players 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 size & local sector economy
  • New : Paranid object & ship encounters now accurately reflect 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 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 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 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 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 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

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 issues.
  • 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 the missing top-level folder

v0.1 Initial Release

  • Less encounters                                                           Now much more infrequent 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 per encounter now based on fight rank
  • Pirates always ignoring you                                        Successful traders beware, pirates always 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 appear
  • Pirates not a threat                                                       More variety and now they've brought some friends along to play with you
  • Too many criminals loitering at space stations        Fewer criminals with more/fewer Police (for each race)

Installation


Drop the "encounters" folder into your "Documents" X4 extension folder, this being...

                                      D:\Users\<Username>\Documents\Egosoft\X4\<number>\extensions\encounters

Feedback

I have been developing & play testing this mod for a period of time 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, so if folks can give feedback and suggestions about what I've got right (if anything) and what's still to do (including any bugs) then please do let me hear. This is my very first proper MD coding so please be nice, it is a great voyage of exploration... and I've had many nasty encounters !! Constructive feedback is welcome but please be aware due to the nature of competing gameplay styles accommodating everyone's wishes may not be possible... but I'll try.

Thanks

     EGOSOFT for giving me such a great playground for years
    MacBain81for allowing me to try and reverse engineer his explosion effects, not quite there yet but maybe more in the future...