[MOD] Allied Stations ignore neutral fire (plus a cheat version)

The place to discuss scripting and game modifications for X Rebirth.

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

copperzinc
Posts: 80
Joined: Sun, 23. Sep 12, 20:29
x4

[MOD] Allied Stations ignore neutral fire (plus a cheat version)

Post by copperzinc »

Forgot to write a description of a mod I made last year here. I'll be doing it now.

Station only responds to player attacks when any one of the following conditions are true:
1: Relation to player is <0.01 (Allied)
2: Attacked object's owner = station's owner (will not ignore attacks to themselves.)

This is useful if you want to play the original plot and had to kill enemies in allied sectors.

Similar to http://xrebirth.nexusmods.com/mods/220 (We submitted at about the same time)
but this fixes the station's dispatch as well as the police.
P.S.: Looks like 220 was removed...

How it works:

When a ship is attacked, the notification will be sent to one of the stations nearby, who is within 30km to an object owned by the player. Originally, the station must satisfy the following criteria for it to be selected as the "station command" for the law enforcement dispatch:
1: Owner of the station is not PLAYER
2: Owner of the station is not NULL
3: Is not an enemy of the victim
4: Falls within 30km of a player object.

Priority given to those that is the commander of the sector, and that with best distance.

In addition to the check above, an addition check is added to see whether the station has:
1. Relation with player <0.01
OR
2. Faction of the station = Faction of the victim.

This means if there's another non-allied station nearby, you would still receive the station warning. The faction where the rep is subtracted from may be different from the faction it would subtract if you did not apply this mod.

Link: http://www.nexusmods.com/xrebirth/mods/221

Two Versions:
Sensible Police: police will ignore neutral fires if station is allied to player.
No Station Watch: removes police altogether (cheat version)
Last edited by copperzinc on Sun, 27. Jul 14, 01:27, edited 2 times in total.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

copperzinc, nice idea :)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

Is it intended that friendly stations still react to fire from the skunk? On a fire test I got warned off on first shot as normal by +26 HoA station.

Edit : no enemy stations in system to confuse the warning, but some 0 standing which could be the case
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
copperzinc
Posts: 80
Joined: Sun, 23. Sep 12, 20:29
x4

Post by copperzinc »

This is the correct behavior. As I have explained in another reply in the mod page, if there's any station within 30km that has relation with you lower than 11 (not allied), they will act as dispatch for police. In this case, using the mod would mean the dispatch is done at a longer distance and give you more time to escape.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

Thanks for the clarification :)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
copperzinc
Posts: 80
Joined: Sun, 23. Sep 12, 20:29
x4

Post by copperzinc »

YorrickVander wrote:Thanks for the clarification :)
Ahhh!!! I finally found out why people got confused :lol:

Just fixed the description. Sorry about all previous confusions.
Stonehouse
Posts: 320
Joined: Sat, 7. Feb 04, 18:47
x4

Post by Stonehouse »

ok, now i could kill some people around without problems thx...but is it possible to stop warning at friendly fire? (my caps hit the stations sometime ... at the end station red and get destroyed by my ships)
copperzinc
Posts: 80
Joined: Sun, 23. Sep 12, 20:29
x4

Post by copperzinc »

I thought about it but I can't think of a way to do it without letting the player to abuse the system. I remember back in X3TC some people suggested that station retaliate only when shield < 25% or something like that, but with the shields became fragmented it's difficult to extract this info for all stations without hampering performance.

When should the stations fight back? In my opinion there are many factors: your relationship with the faction, your relationship with the station (are you right now doing missions for them? do you have any previous profitable trade deals with the station?), and your karma (how many stations have you destroyed before? how many stations of that faction have you destroyed before?) etc. etc. I can't find a good formula for it yet. Any inputs?

Return to “X Rebirth - Scripts and Modding”