[MOD] Disable Encounters

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

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

Post Reply
User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

[MOD] Disable Encounters

Post by MegaJohnny » Sun, 9. Dec 18, 13:41

Overview
As people have been discovering, the player can find ships appearing in front of them even if they fly thousands of kilometres away from the centre of the sector. I found the file that controls this, and it does in fact warp (not spawn) ships. Which ships are warped in for an encounter is controlled by an encounter ID attached to the ship's job (with some random chance, of course).

I'm a bit of a purist about the player's actions not being special, and particularly about the action happening being real and not just because they were plopped there. I can play Elite if I want that kind of thing!

So this mod makes two simple edits to the MD script that controls encounters, preventing any more encounters from being generated.

Download
Nexusmods

Kadatherion
Posts: 1021
Joined: Fri, 25. Nov 05, 16:05
x4

Re: [MOD] Disable Encounters

Post by Kadatherion » Sun, 9. Dec 18, 14:15

Agreed, although I wouldn't mind a version that keeps the chance (maybe reducing its frequency, which was way too high) of alien enemy encounters (khaaks mainly... were they actually even among the warps/spawns? I believe to have only seen the Xenons being dragged into this mechanic, but it might have been the RNG gods playing tricks at me). Khaaks appearing from nothing in remote regions of space would fit the lore and wouldn't feel so out of place like the other warps do. It just should be a *rare* occurrence, so that there is some reason to still keep an eye out and not just go for a coffee leaving the game play itself when you are mapping the outskirts of space, but not so frequent as to become too "fakey" as it is now.

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Re: [MOD] Disable Encounters

Post by MegaJohnny » Sun, 9. Dec 18, 15:02

Kadatherion wrote:
Sun, 9. Dec 18, 14:15
Agreed, although I wouldn't mind a version that keeps the chance (maybe reducing its frequency, which was way too high) of alien enemy encounters (khaaks mainly... were they actually even among the warps/spawns? I believe to have only seen the Xenons being dragged into this mechanic, but it might have been the RNG gods playing tricks at me). Khaaks appearing from nothing in remote regions of space would fit the lore and wouldn't feel so out of place like the other warps do. It just should be a *rare* occurrence, so that there is some reason to still keep an eye out and not just go for a coffee leaving the game play itself when you are mapping the outskirts of space, but not so frequent as to become too "fakey" as it is now.
You make a very good point about the Kha'ak, and I totally agree. I'll look into making an alternate version that works pretty much like you describe.

Also, from the encounter script, here's the (fairly self-explanatory) encounter IDs that can be warped in:
  • lone_plunderer
  • resource_scout
  • lone_miner
  • mining_group_small
  • mining_group_large
  • xenon_s_lone
  • xenon_s_group
  • khaak_s_lone
  • khaak_s_group
So I think the RNG has been mean to you after all :roll:

Zano
Posts: 9
Joined: Sun, 18. Jan 04, 09:47
x4

Re: [MOD] Disable Encounters

Post by Zano » Sun, 9. Dec 18, 19:43

Nice :)

User avatar
DeadZone
Posts: 98
Joined: Fri, 26. Sep 03, 09:44
x4

Re: [MOD] Disable Encounters

Post by DeadZone » Mon, 10. Dec 18, 00:32

Awesome, will always dislike forced encounters.

Space is big, so unless I've pissed someone off enough for them to hunt me, or I'm going somewhere popular/useful, I expect to not see anyone when well off the main routes

Edit: Is the constant pirate scanning you from a stupid distance away, and telling you to drop loot apart of this same encounter list? As that's another thing I've been finding extremely annoying

aerojet029
Posts: 78
Joined: Tue, 20. Aug 13, 14:36
x4

Re: [MOD] Disable Encounters

Post by aerojet029 » Mon, 10. Dec 18, 09:30

I'll be keeping tabs on this mod, thanks for the good work

Socratatus
Posts: 1467
Joined: Tue, 11. May 04, 15:34
x4

Re: [MOD] Disable Encounters

Post by Socratatus » Wed, 12. Dec 18, 12:18

Very nice work. Nexus, also my favourite goto for Mods.
"If you`re looking for that one person who can change your life, take a look in the mirror."
"No problem can withstand the assault of sustained thinking."
"Don`t raise your voice. improve your argument."
"Some men are morally opposed to violence. They are protected by men who are not."

Anurion
Posts: 22
Joined: Tue, 3. Apr 12, 19:09

Re: [MOD] Disable Encounters

Post by Anurion » Wed, 12. Dec 18, 13:59

MegaJohnny wrote:
Sun, 9. Dec 18, 13:41
Overview
As people have been discovering, the player can find ships appearing in front of them even if they fly thousands of kilometres away from the centre of the sector. I found the file that controls this, and it does in fact warp (not spawn) ships. Which ships are warped in for an encounter is controlled by an encounter ID attached to the ship's job (with some random chance, of course).
Thanks a lot.
Besides the obvious reason of immersion, i was wondering if this "warp" has an unintentional impact on the local economy, when the freighters are randomly picked out of their actual task.

For examaple: A freigther delivers desperately needed goods to an shipyard. And all of a sudden, this ship gets - for known reasons - "warpt" to the player-ship.
Are they "rewarpt" to their original position when i am out of range again? Or do they have to fly all the way back to civilication, while the Shipyard is waiting for the delivery?

That would be a reason for me to install this mod tbh.

User avatar
MegaJohnny
Posts: 2195
Joined: Wed, 4. Jun 08, 22:30
x4

Re: [MOD] Disable Encounters

Post by MegaJohnny » Wed, 12. Dec 18, 15:41

Anurion wrote:
Wed, 12. Dec 18, 13:59
Thanks a lot.
Besides the obvious reason of immersion, i was wondering if this "warp" has an unintentional impact on the local economy, when the freighters are randomly picked out of their actual task.

For examaple: A freigther delivers desperately needed goods to an shipyard. And all of a sudden, this ship gets - for known reasons - "warpt" to the player-ship.
Are they "rewarpt" to their original position when i am out of range again? Or do they have to fly all the way back to civilication, while the Shipyard is waiting for the delivery?

That would be a reason for me to install this mod tbh.
I'll have a closer look at the code for it tonight (md/Encounters.xml if you feel like extracting it), but yeah, I don't think it ever warps them back.

That's funny actually, I never thought about it - poor ships having to limp back to the map because the player put travel drive on and fell asleep :lol:

Kadatherion
Posts: 1021
Joined: Fri, 25. Nov 05, 16:05
x4

Re: [MOD] Disable Encounters

Post by Kadatherion » Wed, 12. Dec 18, 19:46

MegaJohnny wrote:
Wed, 12. Dec 18, 15:41
That's funny actually, I never thought about it - poor ships having to limp back to the map because the player put travel drive on and fell asleep :lol:
I believe they might be warped back: just after launch when we noticed this obviously fake behaviour that seemingly conflicted with the "no ship is spawn" statement by the devs, I mentioned in my case when going back to where a few ships were spawn/warped, they weren't there anymore. Might have been a coincidence and they were able to get away from there very quickly (once a ship hits its travel drive it's mighty fast), but looked like it.

Unless, plot twist! All the npc traders carrying engine parts have been warped all over the universe and are MIA! :lol:

Post Reply

Return to “X4: Foundations - Scripts and Modding”