[MOD] Reaction Force

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

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

ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Reaction Force

Post by ScandyNav »

nauttdog wrote: 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.
Did you change settings that activate response? By default they set to react on dead ship. :mrgreen: :mrgreen:
Default is 1% and this should be changed to at least 90%.
User avatar
Shuulo
Posts: 1633
Joined: Mon, 14. Apr 08, 17:03
x4

Re: [MOD] Reaction Force

Post by Shuulo »

nauttdog wrote: 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.
no, there should be really 0 conflicting mods unless they try to do something with faction reputation
ShiBDiB
Posts: 79
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB »

2.0.1 Released
- 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 Changes
- 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.
-----
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
ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Reaction Force

Post by ScandyNav »

My dragon gone completely crazy with this update. Command was launched on it after i've updated RF.
First it started to attack everyone in range! Then it starts wandering around without any logic path. It looks more like a piracy force, than reaction force now. :mrgreen:
Then it started to spam "awaiting orders" every minute.

Actually it starts attacking not everyone, it shoot down MIN, with whom i have positive relation. Was positive. :mrgreen: :mrgreen:
ShiBDiB
Posts: 79
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB »

ScandyNav wrote: Wed, 6. May 20, 00:03 My dragon gone completely crazy with this update. Command was launched on it after i've updated RF.
First it started to attack everyone in range! Then it starts wandering around without any logic path. It looks more like a piracy force, than reaction force now. :mrgreen:
Then it started to spam "awaiting orders" every minute.

Actually it starts attacking not everyone, it shoot down MIN, with whom i have positive relation. Was positive. :mrgreen: :mrgreen:
Are you using the 3.2 beta patch for the game? I've yet to see that kind of response lol, I haven't had a chance to debug on 3.2 yet tho
-----
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: 79
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB »

2.0.2 Released
- T-Files Added
- German translation provided by LeLeon
-----
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
ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Reaction Force

Post by ScandyNav »

ShiBDiB wrote: Wed, 6. May 20, 01:15
ScandyNav wrote: Wed, 6. May 20, 00:03 My dragon gone completely crazy with this update. Command was launched on it after i've updated RF.
First it started to attack everyone in range! Then it starts wandering around without any logic path. It looks more like a piracy force, than reaction force now. :mrgreen:
Then it started to spam "awaiting orders" every minute.

Actually it starts attacking not everyone, it shoot down MIN, with whom i have positive relation. Was positive. :mrgreen: :mrgreen:
Are you using the 3.2 beta patch for the game? I've yet to see that kind of response lol, I haven't had a chance to debug on 3.2 yet tho
No, it's 3.10.
ShiBDiB
Posts: 79
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB »

ScandyNav wrote: Wed, 6. May 20, 02:03
ShiBDiB wrote: Wed, 6. May 20, 01:15
ScandyNav wrote: Wed, 6. May 20, 00:03 My dragon gone completely crazy with this update. Command was launched on it after i've updated RF.
First it started to attack everyone in range! Then it starts wandering around without any logic path. It looks more like a piracy force, than reaction force now. :mrgreen:
Then it started to spam "awaiting orders" every minute.

Actually it starts attacking not everyone, it shoot down MIN, with whom i have positive relation. Was positive. :mrgreen: :mrgreen:
Are you using the 3.2 beta patch for the game? I've yet to see that kind of response lol, I haven't had a chance to debug on 3.2 yet tho
No, it's 3.10.
Hmm interesting... all this order does is use the stock commands when they make sense. So if using it makes it shoot things than it would also shoot them if you issued a normal patrol command.
-----
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
ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Reaction Force

Post by ScandyNav »

ShiBDiB wrote: Wed, 6. May 20, 01:42 2.0.2 Released
That dragon of mine still behave like a patrol. Ignoring docking if idle. Just patrolling. It started after 2.0.1 update and continued into 2.0.2
Will try with another ship.
ShiBDiB
Posts: 79
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB »

ScandyNav wrote: Wed, 6. May 20, 11:17
ShiBDiB wrote: Wed, 6. May 20, 01:42 2.0.2 Released
That dragon of mine still behave like a patrol. Ignoring docking if idle. Just patrolling. It started after 2.0.1 update and continued into 2.0.2
Will try with another ship.
The dragon is a corvette, does the station it's assigned to have open M docking bays?
-----
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
ScandyNav
Posts: 321
Joined: Wed, 6. Nov 02, 20:31
x4

Re: [MOD] Reaction Force

Post by ScandyNav »

ShiBDiB wrote: Wed, 6. May 20, 19:53
ScandyNav wrote: Wed, 6. May 20, 11:17
ShiBDiB wrote: Wed, 6. May 20, 01:42 2.0.2 Released
That dragon of mine still behave like a patrol. Ignoring docking if idle. Just patrolling. It started after 2.0.1 update and continued into 2.0.2
Will try with another ship.
The dragon is a corvette, does the station it's assigned to have open M docking bays?
6S3M dock , so it should be.
Phiolin
Posts: 158
Joined: Wed, 26. May 04, 08:49
x4

Re: [MOD] Reaction Force

Post by Phiolin »

Two things that might need to be fixed:
- Whenever my reaction force fleet has killed all targets in range, I get an "Awaiting Orders" voice prompt from them. This adds up significantly to several times per minute, so I permanently have someone whispering "Awaiting Orders" in my ear now. ;)
- When I "Remove All Orders and Assignments" from the reaction force fleet leader, this will only remove the script from the fleet leader but not from all the subordinates. So if you want to remove the command from a larger fleet, you'll have to unassign all the ships, forcing you to rebuild the complete fleet, unless I have missed an easier way to do this...?
ShiBDiB
Posts: 79
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB »

Phiolin wrote: Sun, 10. May 20, 15:56 Two things that might need to be fixed:
- Whenever my reaction force fleet has killed all targets in range, I get an "Awaiting Orders" voice prompt from them. This adds up significantly to several times per minute, so I permanently have someone whispering "Awaiting Orders" in my ear now. ;)
- When I "Remove All Orders and Assignments" from the reaction force fleet leader, this will only remove the script from the fleet leader but not from all the subordinates. So if you want to remove the command from a larger fleet, you'll have to unassign all the ships, forcing you to rebuild the complete fleet, unless I have missed an easier way to do this...?
I will look into these
-----
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
talentless
Posts: 13
Joined: Fri, 1. May 20, 23:18

Re: [MOD] Reaction Force

Post by talentless »

Since you are using the gatedistance component property, I have noticed that gatedistance from eighteen billion to grand exchange is 6 and not 1 as you would expect. From Napolios Fortune togrand exchange is 7 instead of 1. Note that this is not symmetric, gatedistances from both EB and NF to GE are 1 as expected. Since you are measuring distance from event to home, if you setup home at grand exchange, which I guess no short number of players will do since it is pretty much the center and where PHQ is located, pretty much your ship will not react to anything out of there unless is towards the Black Hole sun direction.. Have you observed this as well, or is it only hapenning to me?
sandalle
Posts: 177
Joined: Wed, 18. Jul 12, 20:17
x4

Re: [MOD] Reaction Force

Post by sandalle »

talentless wrote: Sun, 17. May 20, 20:56 Since you are using the gatedistance component property, I have noticed that gatedistance from eighteen billion to grand exchange is 6 and not 1 as you would expect. From Napolios Fortune togrand exchange is 7 instead of 1. Note that this is not symmetric, gatedistances from both EB and NF to GE are 1 as expected. Since you are measuring distance from event to home, if you setup home at grand exchange, which I guess no short number of players will do since it is pretty much the center and where PHQ is located, pretty much your ship will not react to anything out of there unless is towards the Black Hole sun direction.. Have you observed this as well, or is it only hapenning to me?
This sounds like the vanilla bugs Eighteen Billion -> Grand Exchange I shortest distance (or how Egosoft successfully created artificial stupidity) and [3.0] Unable to teleport from Eighteen Billion to HQ - Fix in a future build.
ShiBDiB
Posts: 79
Joined: Mon, 7. May 07, 00:12
x4

Re: [MOD] Reaction Force

Post by ShiBDiB »

talentless wrote: Sun, 17. May 20, 20:56 Since you are using the gatedistance component property, I have noticed that gatedistance from eighteen billion to grand exchange is 6 and not 1 as you would expect. From Napolios Fortune togrand exchange is 7 instead of 1. Note that this is not symmetric, gatedistances from both EB and NF to GE are 1 as expected. Since you are measuring distance from event to home, if you setup home at grand exchange, which I guess no short number of players will do since it is pretty much the center and where PHQ is located, pretty much your ship will not react to anything out of there unless is towards the Black Hole sun direction.. Have you observed this as well, or is it only hapenning to me?
I can try to find a better way to figure out ranges, but as the other reply says I think it's just the awful pathfinding that comes with the game (which apparently this specific issue is known and planned to be fixed)
-----
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
talentless
Posts: 13
Joined: Fri, 1. May 20, 23:18

Re: [MOD] Reaction Force

Post by talentless »

They have fixed it only for teleportation I think. The game has the ability to calculate correct paths. When they use get_global_path call it's ok, when they use get_jump_path call it's not ok. <component>.gatedistance it is also not ok. I have looked into this in detail here: viewtopic.php?f=192&t=426678. I think there is something more into it because the dev don't provide any feedback. So far I am patching my way through but it cannot really be delivered in any reasonable mod form, too patchy.

My suggestion would be to get the distance in both directions A->B and B->A and take the lowest. I think that in your case you should take travel blacklists into account as well, so <component>.gatedistance...<blacklistgroup>...
DeadAirRT
Posts: 1124
Joined: Fri, 25. Jan 19, 03:26
x4

Re: [MOD] Reaction Force

Post by DeadAirRT »

talentless wrote: Tue, 26. May 20, 22:26 They have fixed it only for teleportation I think. The game has the ability to calculate correct paths. When they use get_global_path call it's ok, when they use get_jump_path call it's not ok. <component>.gatedistance it is also not ok. I have looked into this in detail here: viewtopic.php?f=192&t=426678. I think there is something more into it because the dev don't provide any feedback. So far I am patching my way through but it cannot really be delivered in any reasonable mod form, too patchy.

My suggestion would be to get the distance in both directions A->B and B->A and take the lowest. I think that in your case you should take travel blacklists into account as well, so <component>.gatedistance...<blacklistgroup>...
using $object.gatedistance.{$sector}.{$blacklistgroup}.{$object} will return a distance of -1 if the sector is blacklisted or it has no route without passing through a blacklisted sector.
talentless
Posts: 13
Joined: Fri, 1. May 20, 23:18

Re: [MOD] Reaction Force

Post by talentless »

DeadAirRT wrote: Wed, 27. May 20, 00:57
talentless wrote: Tue, 26. May 20, 22:26 They have fixed it only for teleportation I think. The game has the ability to calculate correct paths. When they use get_global_path call it's ok, when they use get_jump_path call it's not ok. <component>.gatedistance it is also not ok. I have looked into this in detail here: viewtopic.php?f=192&t=426678. I think there is something more into it because the dev don't provide any feedback. So far I am patching my way through but it cannot really be delivered in any reasonable mod form, too patchy.

My suggestion would be to get the distance in both directions A->B and B->A and take the lowest. I think that in your case you should take travel blacklists into account as well, so <component>.gatedistance...<blacklistgroup>...
using $object.gatedistance.{$sector}.{$blacklistgroup}.{$object} will return a distance of -1 if the sector is blacklisted or it has no route without passing through a blacklisted sector.
True. I also expect it to return a longer distance if there is a route with no blacklisted sectors that is not the shortest one with blacklisted sectors. But I agree that is debatable whether it would be desirable for patrols to traverse blacklisted sectors or not, and also depends a lot on how the sub orders/scripts are going to behave with them.
Sturmer
Posts: 505
Joined: Thu, 9. Jun 11, 19:17

Re: [MOD] Reaction Force

Post by Sturmer »

Do the reaction force react only for the player's assets or for calls for help from any non-player-owned ship as well?

Cause I had a report of reaction force reacting and then a minute or two later I lose reputation with friendly HOP for unauthorized kill that I know would never attack me.

Also, is it possible to change the reaction notification from coordinates to sector name?

Return to “X4: Foundations - Scripts and Modding”