[REQ] Mod against sensible friendly fire

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

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

Raumkraut93
Posts: 1368
Joined: Wed, 18. Mar 09, 22:20
x3tc

[REQ] Mod against sensible friendly fire

Post by Raumkraut93 »

Hey,

I'd like to know whether there is a mod against friendly fire and stations turning red after just a few shots. I really like space fights in stations but I am constantly hitting them because not every shot hits the target, so I always have to lure them away to empty space so I don't hit anything.

I believe the intention of Egosoft for creating these huge stations was so that we had some kind of level design for dogfights. But it's pointless the way it is right now.

Any suggestions?
"Dies ist alles, was ich über den Krieg weiss: Einer gewinnt, einer verliert
und nichts ist nachher so
wie es vorher war."

"Stellt eure Truppen auf, oh große Generäle,
Der Preis des Sieges übersteigt den Preis der Niederlage."
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

no idea if a Mod already exists, but you can find the related values deining the thresholds in libraries/defaults.xml (search file for <attack> )
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Raumkraut93
Posts: 1368
Joined: Wed, 18. Mar 09, 22:20
x3tc

Post by Raumkraut93 »

Code: Select all

<dataset class="station">
    <properties>
      <capture allow="true" />
      <hull max="20000000" invulnerable="true" threshold="0.05" />
      <!--effects>
        <surface ref="surface_sparks" />
      </effects-->
      <relation>
        <attack>
          <tolerance threshold="-1.0" change="-0.25" decay="0.25" delay="5" />
          <boost absolute="-1.0" decay="0.02" delay="540" />
          <faction scan="-0.0032" hack="-0.0032" />
        </attack>
So I guess this is where it's at. I'm not sure about the numbers though, which do I have to change and to what number? I'm guessing threshold which is at -1.0 right now but what does that mean? [/code]
"Dies ist alles, was ich über den Krieg weiss: Einer gewinnt, einer verliert
und nichts ist nachher so
wie es vorher war."

"Stellt eure Truppen auf, oh große Generäle,
Der Preis des Sieges übersteigt den Preis der Niederlage."
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

tolerance threshold is the max tolerance value which may be reached before a station turns hostile temporarily
tolerance change is the value which is added to the tolerance value each second you hit a station (the change will be the same if its 1 hit per second or 1000 hits per second)
tolerance delay is the time it takes after the last hit before the tolerance decays
tolerance decay is the tolerance value added per second after the delay until its back to 0

note that when you reach the threshold value you are given a warning and if you hit for more than 1 second after that the temporary relation boost is applied.
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
pref
Posts: 5625
Joined: Sat, 10. Nov 12, 17:55
x4

Post by pref »

Think the code that handles this is in Notifications.xml:

IllegalActivity.$firstattacktolerance is the time delay you get the warning after the first shot, and
IllegalActivity.$timeout is the value after which counters reset and the next attack will be counted as a new one.

This code part is triggered when player attacks something, so for first shot the time is saved, consecutive shots are ignored within $firstattacktolerance (3sec default), next shot after 3secs will trigger warning, and if you have already been warned you get the rep loss from the police entity on the nearest station.

you get here in execution from cue PlayerAttacks, and this logic is in AttackResponse.

Return to “X Rebirth - Scripts and Modding”