[MOD] Reaction Force

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

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

ShiBDiB
Posts: 78
Joined: Mon, 7. May 07, 00:12
x4

[MOD] Reaction Force

Post by ShiBDiB » Tue, 21. Apr 20, 23:03

https://steamcommunity.com/sharedfiles/ ... 2463118472
I.C.E. has taken over this project. I don't play X4 enough to keep it maintained to a level I'm satisfied with.









Confirmed compatible with 3.x - 4.x
Savegame friendly (adding and removal)
https://www.nexusmods.com/x4foundations/mods/453/
https://steamcommunity.com/sharedfiles/ ... 2069655173

UNSTABLE NIGHTLY VERSIONS - https://github.com/shibdib/X4Mods/

Description

This mod adds a new default behavior "Reaction Force". This unit will patrol/protect an area and also respond to assist ships in need.

Features

Image

- Set a ship as "Reaction Force" and it will respond to your ships and stations within it's range that come under attack.

- When nothing is in need of help, the reaction force will either patrol the system set as its home/protect the station set as its home/or dock and wait.

Code: Select all

2.0.2
- T-Files Added
- German translation provided by LeLeon

2.0.1
- Fixes a range check issue causing ships to respond far away if set to patrol sectors
- Adds a check to cancel a response if a ship moves out of range

2.0
- Subordinates now correctly set their order as reaction force
- Response has been tweaked to more aggressively attack the offending ships
- Ships correctly dock
- Dock while idle now has a purpose even if you're not assigned to a station. Ships will now dock and wait on commander ships.
- Reaction forces assigned to stations now get set as station subordinates (Cleans up your asset list)
- Added a toggle to respond to in system distress beacons or not.
- Ships will always respond to combat in system regardless of if it breaks the damage threshold or if they're set to respond to that type of combat.
- Example usage, large slow reaction force you want to respond if your stations get attacked but not ships because gate travel takes forever. Disable ship response and they will only respond to stations in range AND ships in their sector.
- Ships no longer respond to drones taking damage.
- Responding may reward XP.
- Order will auto refresh if loaded as an outdated version.
Last edited by ShiBDiB on Tue, 20. Apr 21, 19:23, edited 11 times in total.
-----
My Mods
Go Home Drone, Reaction Force, Disable Story, Pay The Builder, Landlord, Training Exercise
Github with the latest (Unstable) Versions
Nexus Page
Steam Workshop Page

sco1981
Posts: 282
Joined: Fri, 14. Sep 18, 14:47
x4

Re: [MOD] Reaction Force

Post by sco1981 » Wed, 22. Apr 20, 19:08

ShiBDiB wrote:
Tue, 21. Apr 20, 23:03

This has very limited testing right now so please report bugs here!

Plans

Add carrier support as a home base
Hey,
i like the idea. Do you have a plan to increase the limits, so that ships with this behavoir can fly from 1-2 sectors away to eleminate the threat?

MiFoludek
Posts: 64
Joined: Wed, 18. May 11, 21:06
x3tc

Re: [MOD] Reaction Force

Post by MiFoludek » Thu, 23. Apr 20, 19:13

yes yes yes!!! :)

waiting for more advanced settings like setting responce force: you dont need 10 destoyers to kill one Xenon M

drhay53
Posts: 71
Joined: Fri, 7. Dec 18, 00:38
x4

Re: [MOD] Reaction Force

Post by drhay53 » Fri, 24. Apr 20, 16:51

What are the units of the radius, KM? I have a sector with a bunch of stations and I want this fleet to protect them all, but SCA ships keep blowing up modules on my stations while this fleet is off patrolling 300 km away.

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

Re: [MOD] Reaction Force

Post by scrab21 » Fri, 24. Apr 20, 23:26

thank you so much for this, we definitely needed this when you begin to have your base and everything, there was a mod like this in X3 and it was damn awesome, awesome work.

MutantDwarf
Posts: 711
Joined: Tue, 20. Jun 06, 02:29
x4

Re: [MOD] Reaction Force

Post by MutantDwarf » Fri, 24. Apr 20, 23:30

drhay53 wrote:
Fri, 24. Apr 20, 16:51
What are the units of the radius, KM? I have a sector with a bunch of stations and I want this fleet to protect them all, but SCA ships keep blowing up modules on my stations while this fleet is off patrolling 300 km away.
Pretty sure the units there are in sectors/gates, not kilometers. 9 kilometers wouldn't be a very large maximum response range.

drhay53
Posts: 71
Joined: Fri, 7. Dec 18, 00:38
x4

Re: [MOD] Reaction Force

Post by drhay53 » Sat, 25. Apr 20, 00:11

MutantDwarf wrote:
Fri, 24. Apr 20, 23:30
drhay53 wrote:
Fri, 24. Apr 20, 16:51
What are the units of the radius, KM? I have a sector with a bunch of stations and I want this fleet to protect them all, but SCA ships keep blowing up modules on my stations while this fleet is off patrolling 300 km away.
Pretty sure the units there are in sectors/gates, not kilometers. 9 kilometers wouldn't be a very large maximum response range.
Yeah I had a level 5 pilot when I was testing, so the number was 45. Just big enough to wonder if it was KM or not.

ShiBDiB
Posts: 78
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB » Sat, 25. Apr 20, 01:06

Yup it's gates (he caught me on discord already :P)

New version of this should be out today, allowing a bit more fine tuning when it comes to how much damage a ship or station has to take before it responds along with some bug fixes (no more undocking and docking over and over)
-----
My Mods
Go Home Drone, Reaction Force, Disable Story, Pay The Builder, Landlord, Training Exercise
Github with the latest (Unstable) Versions
Nexus Page
Steam Workshop Page

wanderer
Posts: 278
Joined: Wed, 6. Nov 02, 20:31
x3tc

Re: [MOD] Reaction Force

Post by wanderer » Sat, 25. Apr 20, 01:13

drhay53 wrote:
Fri, 24. Apr 20, 16:51
What are the units of the radius, KM? I have a sector with a bunch of stations and I want this fleet to protect them all, but SCA ships keep blowing up modules on my stations while this fleet is off patrolling 300 km away.
...and some more specs about the working if possible please:
1) how does it 'count' an enemy, menas does it compares to the global setting if a race is an enemy?
2) if 1. not yes but it looks for an enemy object, then, what happens when you have only a ship as enemy from normaly a friendly race?
In this case an engagement will lead to a relation drop if you kill it.
3) what will hapen if its a fleet?
4) where will it resume the patroulling? In the engagement sector, or will it fly back to the 'start' (where you setup the command) sector?
5) Multipe response ships/fleets - will they all come around if an enemy approches? Or will there a 'sharing' functions - means eg. ship 1 and 2 of 5 response ships will go engage the enemy, while the others will still patroulling/waiting.
6) Is there a thread class calculation, means if an enemy carrier comes around, and a M ship will try to engage it? Which will definitly lead to the M ship loose...

The idea of the script has it. As someone mention it here, there's an (very) old x3 script called rapid response fleet around (or was), that did exactly the same nearly a decade ago...

ShiBDiB
Posts: 78
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB » Sat, 25. Apr 20, 02:42

wanderer wrote:
Sat, 25. Apr 20, 01:13
drhay53 wrote:
Fri, 24. Apr 20, 16:51
What are the units of the radius, KM? I have a sector with a bunch of stations and I want this fleet to protect them all, but SCA ships keep blowing up modules on my stations while this fleet is off patrolling 300 km away.
...and some more specs about the working if possible please:
1) how does it 'count' an enemy, menas does it compares to the global setting if a race is an enemy?
2) if 1. not yes but it looks for an enemy object, then, what happens when you have only a ship as enemy from normaly a friendly race?
In this case an engagement will lead to a relation drop if you kill it.
3) what will hapen if its a fleet?
4) where will it resume the patroulling? In the engagement sector, or will it fly back to the 'start' (where you setup the command) sector?
5) Multipe response ships/fleets - will they all come around if an enemy approches? Or will there a 'sharing' functions - means eg. ship 1 and 2 of 5 response ships will go engage the enemy, while the others will still patroulling/waiting.
6) Is there a thread class calculation, means if an enemy carrier comes around, and a M ship will try to engage it? Which will definitly lead to the M ship loose...

The idea of the script has it. As someone mention it here, there's an (very) old x3 script called rapid response fleet around (or was), that did exactly the same nearly a decade ago...
1. It only responds if a ship or station is actively under attack. Once it arrives on scene it will protect whatever was attacked.
2. See 1
3. Right now fleets work fine. The lead ship should have the reaction force order and the rest will behave as subordinates in a fleet would normally behave. (Subordinates sometimes wont dock, trying to figure out why)
4. It will return to its home.
5. Any response force in range will respond. (There's a chance that poorly skilled pilots will *miss* the help request and will not respond) You can use the new hp sliders in the version I'm about to release to set one force to respond much more quickly and the other to only come if things look dire.
6. There's currently no checks in place for this. I'll look to add something for this in the next version.
-----
My Mods
Go Home Drone, Reaction Force, Disable Story, Pay The Builder, Landlord, Training Exercise
Github with the latest (Unstable) Versions
Nexus Page
Steam Workshop Page

ShiBDiB
Posts: 78
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB » Sat, 25. Apr 20, 02:47

1.1 is out, fixes the docking/undocking bug and adds sliders to fine tune when specific response forces will respond
-----
My Mods
Go Home Drone, Reaction Force, Disable Story, Pay The Builder, Landlord, Training Exercise
Github with the latest (Unstable) Versions
Nexus Page
Steam Workshop Page

Max Bain
Posts: 1458
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: [MOD] Reaction Force

Post by Max Bain » Sat, 25. Apr 20, 11:22

This mod sounds great :)

Does the reaction force react to your own property only, or if NPC ships/stations are under attack also?
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link

Deonix
Posts: 1
Joined: Sat, 15. Dec 18, 17:27
x4

Re: [MOD] Reaction Force

Post by Deonix » Sat, 25. Apr 20, 21:55

Hi!
I think i have a QoL improvement you can do to the mod. The % values to when the ships should respond to a panic call should be on ~75% or ~50% instead of 1% so that the players only have to activate the order and do nothing more. This will also help with the players that think that the order does nothing because their ships only react when the ships in distress die.

ShiBDiB
Posts: 78
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB » Sat, 25. Apr 20, 23:30

Max Bain wrote:
Sat, 25. Apr 20, 11:22
This mod sounds great :)

Does the reaction force react to your own property only, or if NPC ships/stations are under attack also?
Own property, responding to npc's will come soon
-----
My Mods
Go Home Drone, Reaction Force, Disable Story, Pay The Builder, Landlord, Training Exercise
Github with the latest (Unstable) Versions
Nexus Page
Steam Workshop Page

Mesthione
Posts: 40
Joined: Wed, 25. Jul 12, 08:13
x4

Re: [MOD] Reaction Force

Post by Mesthione » Sun, 26. Apr 20, 04:30

Thanks for the work! This is giving me anarkis defense network vibes from X3.

Phiolin
Posts: 158
Joined: Wed, 26. May 04, 08:49
x4

Re: [MOD] Reaction Force

Post by Phiolin » Sun, 26. Apr 20, 07:49

Remembering this from X3 as well. Will try it out today, good job! :D

ShiBDiB
Posts: 78
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB » Sun, 26. Apr 20, 08:47

1.2 Just went out
Add debug lines
Make response less finicky
More tweaks to get things to dock correctly (WIP)

I'm headed to bed, will be working on this more tomorrow (rainy weather incoming :( )
-----
My Mods
Go Home Drone, Reaction Force, Disable Story, Pay The Builder, Landlord, Training Exercise
Github with the latest (Unstable) Versions
Nexus Page
Steam Workshop Page

ShiBDiB
Posts: 78
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB » Mon, 27. Apr 20, 10:39

1.4 is out that fixes a lot of issues.

Clear out any orders above the default Reaction Force after updating to make sure there's no issues
-----
My Mods
Go Home Drone, Reaction Force, Disable Story, Pay The Builder, Landlord, Training Exercise
Github with the latest (Unstable) Versions
Nexus Page
Steam Workshop Page

ShiBDiB
Posts: 78
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB » Wed, 29. Apr 20, 05:27

The current release finally is getting a decent amount of playtesting from me.. and I can comfortable say it's working as intended

Image

Current plans
- Tweak subordinates to make them smarter (the stock escort code is awful)
- Clean up response (Add more checks to not respond to hopeless things/stop responding if ships move out of range/etc...)
- Tweak the patrol command to be slightly less braindead
- Further look into carriers and fighter response
-----
My Mods
Go Home Drone, Reaction Force, Disable Story, Pay The Builder, Landlord, Training Exercise
Github with the latest (Unstable) Versions
Nexus Page
Steam Workshop Page

nauttdog
Posts: 14
Joined: Fri, 3. Apr 20, 06:19
x4

Re: [MOD] Reaction Force

Post by nauttdog » Mon, 4. May 20, 15:45

Are there any known conflicts, such as with VRO? I've set numerous squads to act as Reaction Force, and haven't had any of them respond to ships in distress.

Post Reply

Return to “X4: Foundations - Scripts and Modding”