X4 - End Game

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

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

skullwarrior
Posts: 32
Joined: Fri, 2. Jun 17, 17:22

X4 - End Game

Post by skullwarrior » Mon, 9. Jan 23, 02:07

I have made a mod focusing on the end-game part(that's why it will only be activated after 96h of gameplay), which usually is boring and besides a full all-in war against everything, there isn't much to do, more if you hate the time-wasting non-reward feature that is terraforming. Mod link: https://www.nexusmods.com/x4foundations/mods/978

So what the mod does? it will reinforce some xenon home sectors with "Protector fleets", initially a Xenon I that will call for the rest of the fleet eventually. Will also refill any Xenon Shipyard/Wharf's storage, a lot of ships will be produced, so prepare your gate's defenses.
Additionally will spawn an Invasion Fleet that will target players' stations, every time the fleet leader change sectors it will decrease the player's reputation against the sector owner, if applicable. So the player is compelled to engage the fleet ASAP. A mission will be created(non-abortable) so the player can have guidance towards the Invasion Fleet, when destroyed it will reward the player with an exceptional mod part and some money. When the player and the Fleet leader is in the same sector, an allied fleet will spawn to help the player, "All factions will unite to fight the Xenon menace"

Also if that is not enough and the player wants more challenges, a new deployable was added to the game (Xenon Psi Emitter, like StarCraft psi emitter) this will "lure"(spawn) a huge xenon fleet (called Strike Force) near the emitter deployment ~100km, this fleet will also have a mission to destroy it but will give no reward. This is a stronger on-demand version of the Xenon Invasion Fleet.
The emitter can only be deployed in ownerless or player-owned sectors.

This mod is still in development, I'm working on "calculating" the player strength so somehow scale the Xenon Invasion and Strike Force fleets to make them a challenge for the player. This is difficult because this fleet will spawn a lot of ships so the game will struggle on some PC.

Please any bug reports,/suggestions/idea is most appreciated.

roy35150
Posts: 75
Joined: Fri, 25. Sep 15, 13:22
x4

Re: X4 - End Game

Post by roy35150 » Wed, 1. Feb 23, 17:06

Thx for this...

Works great and really adds an end goal to the game.

Buzz2005
Posts: 2184
Joined: Sat, 26. Feb 05, 01:47
x4

Re: X4 - End Game

Post by Buzz2005 » Wed, 1. Feb 23, 17:58

can the time be edited? or maybe some kind of trigger to start other the 96 hours?
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.

skullwarrior
Posts: 32
Joined: Fri, 2. Jun 17, 17:22

Re: X4 - End Game

Post by skullwarrior » Tue, 7. Feb 23, 01:30

Actually, it triggers automatically after 96h of gameplay but what are you suggesting? Even using the Xenon Emitter won't do anything if used before the 96h, so do you want something like to "enable" the invasions loop? if that so, any particular ideas? bear in mind that it should be easy or user-friendly so people can know when this is available and when is not enabled.

Buzz2005
Posts: 2184
Joined: Sat, 26. Feb 05, 01:47
x4

Re: X4 - End Game

Post by Buzz2005 » Fri, 10. Feb 23, 11:58

yes i would like if possible a trigger to start the end game rather then fixed 96 hours, or maybe to have sperate mod that starts immediately when installed so that way i can choose the time

btw love the idea of having xenons go wild in end game

thnx for the mod
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.

skullwarrior
Posts: 32
Joined: Fri, 2. Jun 17, 17:22

Re: X4 - End Game

Post by skullwarrior » Fri, 10. Feb 23, 14:15

Let me think how I can achieve that, will let you know as soon as I implement something

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: X4 - End Game

Post by Reisser » Tue, 14. Feb 23, 17:21

So first of all a great idea! Except for a lot of micromanagement (or worse: "terraforming") there will be nothing left to do at some point :)

Personally, I don't think it's good to start "only" over the playing time, everyone plays a little differently and doesn't want to be put under pressure (or wants exactly that :D)

What I would like for something like this would be an options menu (works quite well, I've even done that before) in which you can set different conditions, corresponding to your own playing style, when and how the mod reacts. The recurrence time of raids should also be adjustable and randomized to some extent.

- Start time via time yes/no and slider how many hours
- Start time via total assets yes/no - Slider X-Y
- Start time via fleet size yes/no - Slider X-Y
- Start time over ... whatever else comes to mind
- Repeat time - Slider X-Y minutes

It doesn't always have to be the same fleet - it's funnier when you don't know what's coming (and you always have to expect the worst ... and then there's only one destroyer loitering around the corner).

So there would be the size of the opposing fleet. Again, options would be very nice:
- adapted to wealth yes/no
- adapted to fleet size yes/no
- adapted to playing time yes/no
- maximum fleet size - slider small/medium/large/huge/horror (would also be good to adjust the size to your own PC)

It also doesn't have to be that the xenon only attack you, you could also bring in variants here. You always have to reckon with the unknown.

And then the behavior of the xenon by option:
- Slider with the probability of only attacking the player (at 0 xenon react randomly as usual - at 100 they only attack the player)

Personally, I would never use "summoning xenon" via an emitter. It's as if I just put 20 xenon destroyers next to me in the room via a cheat script and then watch my fleets tear each other apart. You do that for fun, but then you wouldn't save the game and continue.

And I have another idea:
The xenon don't have to come from their "areas" in terms of logic. They could easily have been gotten from deep space, too, about Death & Destruction again... and so on :D - that would also go with the novels :P

In any event, they could appear EVERYWHERE - at least in selected random fringe sectors. In any case, that would be great fun, because what else happens? The gate fortresses that have already been built for the xenon sectors shred everything that comes within 20km of them and the rest is then swept up with your fleet - business as usual as usual.

In general, small "raid commands" over the entire map or just the random edge sectors would also be interesting. You should then be able to get them under control with on-site patrols (i.e. only one squadron N, M and P) and not have to call the fleet on standby right away. This makes you keep the sector defense at a certain level.

Just not TOO often - it shouldn't annoy you like "oh my god, xenon again"

So, I hope that gave you a few ideas and I'll follow up on this one. I'm still a long way from the endgame, but I'd be happy if this develops accordingly :D

Oh yes: and if you already have a (beta) mod - I would name the thread here accordingly - after all, it's a mod presentation and not just any random request :)
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

skullwarrior
Posts: 32
Joined: Fri, 2. Jun 17, 17:22

Re: X4 - End Game

Post by skullwarrior » Wed, 15. Feb 23, 14:57

Fascinating ideas, I was already considering using another faction's ships, but the problem then will be the name of the mod, it won't be a xenon buff anymore, and the idea behind it would be like your rival trade competitors hire a fleet of mercenaries to target your civilian assets to slow down your trade operation. This will give you some logic to that.
Regarding the Xenon Invasion Fleet, is true(happens in my current game) that as I have GateKeepers defence platforms already in place, usually only the fleet leader will pass.
Maybe instead of spawning the Invasion fleet on the xenon home sectors and using any sector with a reasonable delay would be ok, warning the player that the invasion fleet is being detected and a few minutes later spawn the fleet in that sector but with several hundreds of km away so giving the sense that they are coming from deep space.
I haven't done anything with a configuration as you mentioned, do you have any examples?

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: X4 - End Game

Post by Reisser » Thu, 16. Feb 23, 11:45

In any case, the attackers shouldn't spawn in the middle of the sector, but even a few 100 km are quickly bridged with the travel drive. In this respect, an "announcement" either by message (you can name it in an atmospheric way) would be nice - and / or you would send out "waves" of smaller xenon associations in advance, as a sort of scout. They could then have a fixed scheme (1 small wave - 10 min break - 1 slightly stronger wave - 10 min break - attack of the main wave). That gives you some planning security.

Regarding the menus: they are really very easy to implement - you need "Mod Support APIs" that make it possible. You sure know them...

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

In the mod description you will also find GitHub links with examples. Even I managed to do that well (in contrast to the rest of the script, which drove me crazy.. but had nothing to do with the menus - they were really very easy to use. I strongly recommend you take a look! It's easy, it works Fun, and you can also use switches for debugging etc which make scripting a lot more enjoyable.

You can then also very easily make your mod customizable by the player without having to fiddle around with any ini or xml files. That was yesterday :D

If you have any questions - I can also be reached via PM / Discord etc - I could still help with the menu, otherwise I'm not particularly good at modding and have been out of the topic for a while. However, it would be fun for me to come back :)
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

ISSProxima
Posts: 3
Joined: Mon, 6. Feb 23, 18:15

Re: X4 - End Game

Post by ISSProxima » Thu, 16. Feb 23, 16:52

Can it be added to a save ?

skullwarrior
Posts: 32
Joined: Fri, 2. Jun 17, 17:22

Re: X4 - End Game

Post by skullwarrior » Wed, 22. Feb 23, 03:03

It doesn't require a new save so you can add it in your current game

skullwarrior
Posts: 32
Joined: Fri, 2. Jun 17, 17:22

Re: X4 - End Game

Post by skullwarrior » Wed, 22. Feb 23, 03:06

Reisser wrote:
Thu, 16. Feb 23, 11:45
In any case, the attackers shouldn't spawn in the middle of the sector, but even a few 100 km are quickly bridged with the travel drive. In this respect, an "announcement" either by message (you can name it in an atmospheric way) would be nice - and / or you would send out "waves" of smaller xenon associations in advance, as a sort of scout. They could then have a fixed scheme (1 small wave - 10 min break - 1 slightly stronger wave - 10 min break - attack of the main wave). That gives you some planning security.

Regarding the menus: they are really very easy to implement - you need "Mod Support APIs" that make it possible. You sure know them...

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

In the mod description you will also find GitHub links with examples. Even I managed to do that well (in contrast to the rest of the script, which drove me crazy.. but had nothing to do with the menus - they were really very easy to use. I strongly recommend you take a look! It's easy, it works Fun, and you can also use switches for debugging etc which make scripting a lot more enjoyable.

You can then also very easily make your mod customizable by the player without having to fiddle around with any ini or xml files. That was yesterday :D

If you have any questions - I can also be reached via PM / Discord etc - I could still help with the menu, otherwise I'm not particularly good at modding and have been out of the topic for a while. However, it would be fun for me to come back :)
I will be doing that after I finish the current changes which involve adding some changes as there is no longer a fixed number of ships nor are always xenon, so now you might face a fleet of regular ships instead.

XOSPECTRE

Re: X4 - End Game

Post by XOSPECTRE » Wed, 22. Feb 23, 05:11

Ooo randomization for ship enemies would be fantastic

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Re: X4 - End Game

Post by Reisser » Wed, 22. Feb 23, 08:08

skullwarrior wrote:
Wed, 22. Feb 23, 03:06
I will be doing that after I finish the current changes which involve adding some changes as there is no longer a fixed number of ships nor are always xenon, so now you might face a fleet of regular ships instead.
Ok, the fleets should vary, but random faction (or not always Xenon)? Then a horde of Teladi like the bargain hunters fall on my stations or how can you understand that? :D
Meine Mods bei NexusMods: RS Loss Report RS Bribe for Scandata RS Colors RS Marine Special Training
Meine Mod-Collection bei NexusMods: X4 VRO Reloaded

XOSPECTRE

Re: X4 - End Game

Post by XOSPECTRE » Wed, 22. Feb 23, 23:15

Im trying to modify xenon buff mod to make faction wars like 2 differt faction spawns their fleet and send them against each other you can join fight for one or other side .

skullwarrior
Posts: 32
Joined: Fri, 2. Jun 17, 17:22

Re: X4 - End Game

Post by skullwarrior » Fri, 3. Mar 23, 03:21

Version 1.13 is up, mode code reworked
The invasion fleet will now be either a Xenon Fleet or a Mercenary fleet using regular faction's ships. Fleet strength and origin randomized.
The invasion event has 2 parts:
- Notification: will inform the user where (sector) the fleet should be spawned, allowing the player to relocate forces.
- Fleet spawned: after a random amount of minutes, the fleet will spawn in the selected sector, will target a random shipyard/wharf and everything in between

User avatar
scrab21
Posts: 26
Joined: Fri, 28. Aug 15, 23:40
x4

Re: X4 - End Game

Post by scrab21 » Fri, 3. Mar 23, 15:22

skullwarrior wrote:
Fri, 3. Mar 23, 03:21
Version 1.13 is up, mode code reworked
The invasion fleet will now be either a Xenon Fleet or a Mercenary fleet using regular faction's ships. Fleet strength and origin randomized.
The invasion event has 2 parts:
- Notification: will inform the user where (sector) the fleet should be spawned, allowing the player to relocate forces.
- Fleet spawned: after a random amount of minutes, the fleet will spawn in the selected sector, will target a random shipyard/wharf and everything in between
thank you so much for your work sir

skullwarrior
Posts: 32
Joined: Fri, 2. Jun 17, 17:22

Re: X4 - End Game

Post by skullwarrior » Mon, 6. Mar 23, 00:57

The new version is up 1.14.

Paint Jobs were added for fleets of Mercenaries and Defenders, increasing the number of frigates and fighters for the Mercenary fleet.

skullwarrior
Posts: 32
Joined: Fri, 2. Jun 17, 17:22

Re: X4 - End Game

Post by skullwarrior » Sat, 18. Mar 23, 03:19

Version 1.16 is up

* Added new Invasion Fleet type: Khaak swarm (this is a low-chance and easy event as Khaak ships are all S/M and rather weak)
* Added the warping/jumping effect to Defenders Fleet (when spawning) and Invasion Fleet (when the fleet leader moves to a new sector)

XOSPECTRE

Re: X4 - End Game

Post by XOSPECTRE » Sat, 18. Mar 23, 15:34

I have extracted khaak cruiser queen as standalone from xr shippack if u want i can upload to it to nexus for that new khaak invasion

Post Reply

Return to “X4: Foundations - Scripts and Modding”