Hi everyone,
I've already helped resolve the issue with Archean Order for the above poster but I thought I'd explain it here for anyone else running into similar issues. This mod works by removing the fighter.setJitterUnder and fighter.setJitter effects from the Targeting Feed subsystem code. It's the interaction between this jitter effect and the shield glow on shielded fighters that causes the frame rate drop on AMD cards. Any mods that reuse the Targeting Feed code can cause the same issue, which this will not fix. However, if you have access to the mod's source files, you can diagnose and fix the problem yourself with a bit of work. All you need are two programs, a .csv spreadsheet reader such as Ron's Editor, and a robust text editor such as Notepad++.
It is also possible to fix this bug if the mod did not come with source files, but that involves the use of either an IDE or Java decompiler, which lies outside the scope of this guide. In either case, make a bug report with the mod creator and hopefully they will fix it with an update.
In our example, the mod Archean Order TC v1.4.1.1 has a ship, the Malevolent, which has a ship system ability that causes a significant frame rate drop. Here I have activated "Phase Shell (AO)" with shielded fighters deployed causing an immediate 30 fps drop.
To see what the code is doing to cause this, we need to track down the correct ship system file. First, let's take a look at the ship's entry in ship.csv. This is a spreadsheet located at (mod directory)\data\hulls\ship_data.csv
Under system id we can see how the game refers to the system internally, but we still need to track down the code it's using. In data\shipsystems we can look by system id and find the file archean_phaseprojector.system. This is just a text file. Opening it up reveals:
This is a path to a Java class, and PhaseProjectorStats.java is the file we need to look at. However, a copy might not actually exist at \data\scripts\shipsystems\, since it could have already been compiled by the mod maker as part of a .jar file. To find it, we need to look for the source file.
Checking the \src\ directory inside the mod's main folder we find the following in \src\data\scripts\shipsystems\.
After we found the .java file, we can take a look through the code and search for fighter.setJitterUnder and fighter.setJitter. If they're present, we've found out culprit.
However, before we can make changes, first we need archean_phaseprojector.system to point to a new location so it will load our edited code. Going back to the .system file, we will comment out the old "statsScript" line with #, add a new line pointing to a new directory, and save the changes.
Next, we will create the directory \data\myfix\ and paste a copy of PhaseProjectorStats.java there so we can work on it.
Now we're ready to work on PhaseProjectorStats.java. However, before the game will load it properly, we need to do some housekeeping.
Because our .java file now resides at a new location, we need to have its "package" field point to the right place. This is simply the directory where the file is currently residing, \data\myfix\. Next, we need to delete the "final" keyword from the various class variables. Starsector comes with a Java compiler that will convert our code to a version usable by the computer. It's what allows us to make text edits to the source code and have it reflected in-game without using an IDE. However, the capabilities of the Janinio compiler are very limited, and if we attempt to compile our .java file with the "final" keyword, it will crash. Deleting this has no impact on gameplay, so we'll remove them.
Finally, we're ready to comment out the code causing our bug. We do this by adding two / slashes before each line, like so:
If we did everything right, the game should run and no longer suffer the slowdown.
Success!
If you game crashes, or the changes are not showing up, you can run through a quick checklist:
Did I update my .system file's "statsScript" field to point to the right directory?
Is my .java file in that directory?
Did I change the "package" field in my .java file to point to its current location?
Does the "statusScript file name, .java file name, and class name all match up?
Did I delete all final keywords in my .java file?
Did I comment out the actual code causing the slowdown?
Did I save all my updates?
Hopefully this should help you get the changes working.