Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.98a is out! (03/27/25)

Pages: [1] 2 3 ... 7

Author Topic: [0.98a] Leading Pip 1.10.2  (Read 303411 times)

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2901
    • View Profile
    • Sc2Mafia
[0.98a] Leading Pip 1.10.2
« on: April 19, 2014, 08:24:12 PM »

(Requires LazyLib 3.0.0)

- Supports LunaLib -


The image kind of speaks for itself, but to clarify, this mod adds a target leading pip in front of whatever ship you have targeted.  If you shoot at that pip, you will generally hit the target.  The algorithm takes into account your position and velocity, your target's position and velocity, your weapon group, the positions of the weapons in the weapon group, the projectile speed of the weapons in the weapon group, and the acceleration and max speed of rocket-type missiles.

Highly customizable, including various display modes (combined vs. individual pips, for instance).

Change Log
Version 1.10.2 (May 27, 2025):
- Leading pips on station/ship modules now take the mothership's rotation and velocity into account

Version 1.10.1 (May 14, 2025):
- Fixed a couple of very minor display issues that most people wouldn't notice

Version 1.10.0 (May 2, 2025):
- Improved accuracy of pip when using weapons with mixed projectile speeds and weapon slot locations
- Removed inaccurate "backup" intercept method; it won't render anything if the primary (accurate) intercept method doesn't find a valid solution
- Now properly calculates intercept points for accelerating rocket-type missiles
- If an alternating weapon group is selected, only the currently active weapon is considered for the purposes of calculating the intercept point
- Will no longer render a leading pip if no weapons within the weapon group have a valid target leading projection
- Target leading now takes into account the time-scaled velocity of target ships
- In combined pips mode, "bad" intercepts (ones which are mathematically valid, but would exceed the weapon's range) are culled unless there are no "good" intercepts to display
  * This behavior is suppressed if out-of-range pips are configured to neither fade nor hide
- Added different pip display configurations:
  * "Individual" mode: an individual indicator will be displayed for each weapon in a linked control group
  * "Combined" mode: the legacy behavior; a single indicator will be displayed in a position that represents a "smart" average aiming point
  * "Auto-Scaling" mode: the new default behavior; a modified variant of "Combined" mode, which causes the combined indicator to dynamically re-scale to represent the standard deviation between individual aiming points
- Added different pip out-of-range behaviors:
  * "Show" mode: pips are displayed normally
  * "Fade" mode: pips that are too far out of range are dimmed
  * "Hide" mode: pips that are too far out of range are hidden
- Added LunaLib support

Version 1.9.5 (March 31, 2025):
- Updated for Starsector 0.98a

Version 1.9.4 (February 3, 2024):
- Updated for Starsector 0.97a

Version 1.9.3 (May 10, 2023):
- Updated for Starsector 0.96a

Version 1.9.2 (December 12, 2021):
- Updated for Starsector 0.95.1a
- Smoother lines

Version 1.9.1 (March 29, 2021):
- Updated for Starsector 0.95a
- Migrated version file to custom host (sigh)

Version 1.9.0 (July 11, 2020):
- Updated for Starsector 0.9.1a
- Migrated version file to BitBucket

Version 1.8.3 (November 16, 2018):
- Works in Starsector 0.9a

Version 1.8.2 (April 24, 2018):
- Toggle key now actually works

Version 1.8.1 (June 4, 2017):
- Various bugs fixed
- Works in Starsector 0.8.1a

Version 1.8.0 (April 22, 2017):
- Started change tracking
- Various bugs fixed
- Works in Starsector 0.8a
« Last Edit: May 27, 2025, 01:58:52 PM by Dark.Revenant »
Logged

Nanao-kun

  • Admiral
  • *****
  • Posts: 829
    • View Profile
Re: Target Leading Pip
« Reply #1 on: April 19, 2014, 08:30:11 PM »

Woah, that's pretty cool.

EDIT: Tried it, works great. Good if you aren't particularly good at leading targets, and you can technically extrapolate particular parts of the ship to hit using it. Is the pip based from the center of the target?
« Last Edit: April 19, 2014, 08:58:16 PM by Nanao-kun »
Logged

MesoTroniK

  • Admiral
  • *****
  • Posts: 1736
  • I am going to destroy your ships
    • View Profile
Re: Target Leading Pip
« Reply #2 on: April 19, 2014, 09:00:12 PM »

Nanao-kun

  • Admiral
  • *****
  • Posts: 829
    • View Profile
Re: Target Leading Pip
« Reply #3 on: April 19, 2014, 09:12:13 PM »

Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2901
    • View Profile
    • Sc2Mafia
Re: Target Leading Pip
« Reply #4 on: April 19, 2014, 09:25:34 PM »

Slight compatibility bug with Combat Radar.  Update Leading Pip to 1.1 (and grab the next Combat Radar as well) and it will be resolved.
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: [0.6.2a] [Interface] Target Leading Pip
« Reply #5 on: April 19, 2014, 10:01:23 PM »

Lazy's Combat Radar and DR's Targeting PIP - for when you need the right information to kill the right ship at the right time.

Loving it.
Logged

Piemanlives

  • Commander
  • ***
  • Posts: 176
  • I've Got This, I think...
    • View Profile
Re: [0.6.2a] [Interface] Target Leading Pip
« Reply #6 on: April 19, 2014, 10:41:00 PM »

While I personally wouldn't use this, it is however certainly well executed and rather nifty.
Logged
This is called me throwing my missile swarm at you, and by swarm I mean massacre, and by missiles... I actually just mean missiles, there's actually not much to it really.

HELMUT

  • Admiral
  • *****
  • Posts: 1365
    • View Profile
Re: [0.6.2a] [Interface] Target Leading Pip
« Reply #7 on: April 22, 2014, 03:30:25 PM »

Just noticed that it make the game crash when you target an enemy but have no weapons.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2901
    • View Profile
    • Sc2Mafia
Re: [0.6.2a] [Interface] Target Leading Pip
« Reply #8 on: April 22, 2014, 07:02:06 PM »

Indeed.  I fixed that in a dev version but didn't get around to uploading it until now because of my shader work.
Logged

Aklyon

  • Commander
  • ***
  • Posts: 197
    • View Profile
Re: [0.6.2a] [Interface] Target Leading Pip 1.2 (Crash Fix!)
« Reply #9 on: April 23, 2014, 05:25:13 AM »

This is pretty nifty.
Logged

Ranakastrasz

  • Admiral
  • *****
  • Posts: 702
  • Prince Corwin of Amber
    • View Profile
Re: [0.6.2a] [Interface] Target Leading Pip 1.2 (Crash Fix!)
« Reply #10 on: April 24, 2014, 12:36:32 PM »

Current version still crashes, and still is labled as 1.0
Logged
I think is easy for Simba and Mufasa sing the Circle of Life when they're on the top of the food chain, I bet the zebras hate that song.

Cigarettes are a lot like hamsters. Perfectly harmless, until you put one in your mouth and light it on fire

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2901
    • View Profile
    • Sc2Mafia
Re: [0.6.2a] [Interface] Target Leading Pip 1.3 (Crash Fix 2!)
« Reply #11 on: April 24, 2014, 01:06:38 PM »

If this version doesn't fix it, the crash is completely unfixable by any means whatsoever.
Logged

Ranakastrasz

  • Admiral
  • *****
  • Posts: 702
  • Prince Corwin of Amber
    • View Profile
Re: [0.6.2a] [Interface] Target Leading Pip 1.3 (Crash Fix 2!)
« Reply #12 on: April 24, 2014, 03:24:24 PM »

Code
36248 [Thread-5] ERROR com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  - java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at data.scripts.plugins.TargetingLeadIndicator.advance(TargetingLeadIndicator.java:154)
at com.fs.starfarer.title.ooOO.K$Oo.o00000(Unknown Source)
at com.fs.starfarer.combat.oOOO.new.super(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
at com.fs.starfarer.combat.G.??00(Unknown Source)
at com.fs.oOOO.A.?0000(Unknown Source)
at com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.o00000(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Assuming it can't then be fixed, that is kinda disappointing, since it is a really helpful mod. It is mostly usable, so long as you don't ever pilot a capital ship with all weapons set to autofire.

~To cause, I just use a ship, and set my selected weapon group to one past the last weapon group, then target an enemy.

~~Looking at the code, while I cannot be certain, I don't think you have a check for having a group past the last one. However, I am not sufficiently familiar with Starsector's API, so it is indeterminate.
« Last Edit: April 24, 2014, 03:28:47 PM by Ranakastrasz »
Logged
I think is easy for Simba and Mufasa sing the Circle of Life when they're on the top of the food chain, I bet the zebras hate that song.

Cigarettes are a lot like hamsters. Perfectly harmless, until you put one in your mouth and light it on fire

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2901
    • View Profile
    • Sc2Mafia
Re: [0.6.2a] [Interface] Target Leading Pip 1.3 (Crash Fix 2!)
« Reply #13 on: April 24, 2014, 03:28:31 PM »

You should have mentioned what caused the crash in the first place; I was assuming it was the same cause as before (a ship without weapons).  I'll get it fixed once I get home.

You must understand that this entire mod is a slapjob I did in my spare time to demonstrate the intercept method I implemented for LazyLib.
« Last Edit: April 24, 2014, 03:30:16 PM by Dark.Revenant »
Logged

Ranakastrasz

  • Admiral
  • *****
  • Posts: 702
  • Prince Corwin of Amber
    • View Profile
Re: [0.6.2a] [Interface] Target Leading Pip 1.3 (Crash Fix 2!)
« Reply #14 on: April 24, 2014, 03:29:32 PM »

Yea, that was a mistake on my part. I was not thinking correctly, and misread it as not having a weapon selected.

Sorry about that.
Logged
I think is easy for Simba and Mufasa sing the Circle of Life when they're on the top of the food chain, I bet the zebras hate that song.

Cigarettes are a lot like hamsters. Perfectly harmless, until you put one in your mouth and light it on fire
Pages: [1] 2 3 ... 7