Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 ... 9 10 [11]

Author Topic: Gun Runners mod 1.06 for Starfarer 0.53a (previously Tri-Tachyon Station mod)  (Read 104026 times)

hadesian

  • Admiral
  • *****
  • Posts: 2058
  • It's been one of those days...
    • View Profile

Oh, how long has 1.05 been deleted from the thread? Just noticed it's been deleted by admin. Were we not supposed to attach mod files to the threads?

Was about to upload 1.06, guess I'll find an alternate host. Hmm, what's a good file hosting service that everyone can access?
mediafire?
Logged
Changes as of May 24, 2013
  • Reinvented Starsector.
  • That is all.

Paul

  • Commander
  • ***
  • Posts: 159
    • View Profile

Apparently it was just deleted like half an hour ago as part of a cleansing of old files, and it's perfectly OK to host it here. So I just attached the new version on here. It may be deleted again in a few months, but it's more convenient to download here than some off-site hosting with expiration times and ads and such.

So, new version is up. I tested it a bit and the station is still spawning correctly and my code for refreshing the ships is working. If anyone finds any bugs, let me know.
Logged

robokill

  • Captain
  • ****
  • Posts: 424
  • Hey, over there stop looking at my guns!
    • View Profile

is this mod to date
Logged

Paul

  • Commander
  • ***
  • Posts: 159
    • View Profile

I haven't had time to test it on the newest version, but it should work fine in 0.53.1a. I'll look into it when I have time.
Logged

Darloth

  • Admiral
  • *****
  • Posts: 592
    • View Profile

It's working fine for me.
Logged

Degraine

  • Ensign
  • *
  • Posts: 37
    • View Profile
Re: Gun Runners mod 1.06 for Starfarer 0.53a (previously Tri-Tachyon Station mod)
« Reply #155 on: September 27, 2012, 03:38:05 AM »

Is anyone else having troubles fighting the Gun Runners' Defence Fleets? Half a dozen Medusas, I could take. God knows how many fighters, sure. But the two at the same time, coupled with Hyperions that grab most of the beacons before I can get myself sorted out? It's just not working.
Logged

Andy H.K.

  • Commander
  • ***
  • Posts: 232
    • View Profile
Re: Gun Runners mod 1.06 for Starfarer 0.53a (previously Tri-Tachyon Station mod)
« Reply #156 on: December 13, 2012, 09:27:27 AM »

Negative sir, I've encountered such error in 0.54, please take a look

Quote
261064 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.world.GRDefenseSpawnPoint.spawnFleet(GRDefenseSpawnPoint.java:30)
   at data.scripts.world.BaseSpawnPoint.advance(BaseSpawnPoint.java:52)
   at com.fs.starfarer.campaign.BaseLocation.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.A.o00000(Unknown Source)
   at com.fs.starfarer.super.???000(Unknown Source)
   at com.fs.super.A.new(Unknown Source)
   at com.fs.starfarer.combat.String.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)
Logged

LostInTheWired

  • Lieutenant
  • **
  • Posts: 83
    • View Profile
Re: Gun Runners mod 1.06 for Starfarer 0.53a (previously Tri-Tachyon Station mod)
« Reply #157 on: December 13, 2012, 04:42:01 PM »

Negative sir, I've encountered such error in 0.54, please take a look

Quote
261064 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.world.GRDefenseSpawnPoint.spawnFleet(GRDefenseSpawnPoint.java:30)
   at data.scripts.world.BaseSpawnPoint.advance(BaseSpawnPoint.java:52)
   at com.fs.starfarer.campaign.BaseLocation.advance(Unknown Source)
   at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
   at com.fs.starfarer.campaign.A.o00000(Unknown Source)
   at com.fs.starfarer.super.???000(Unknown Source)
   at com.fs.super.A.new(Unknown Source)
   at com.fs.starfarer.combat.String.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:619)

I'm having a very similar error.  Sadly, I just removed Gunrunners, even though I like how little it modifies the game.  Currently Playing Power Blocs, but I'm not so into that...
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7174
  • Harpoon Affectionado
    • View Profile
Re: Gun Runners mod 1.06 for Starfarer 0.53a (previously Tri-Tachyon Station mod)
« Reply #158 on: December 13, 2012, 06:26:48 PM »

Note: I haven't tested this because of the time it takes for the station to spawn, but it compiles.

Try replacing the GRDefenseSpawnPoint file with this:

Spoiler
Code
package data.scripts.world;
import java.util.List;

import com.fs.starfarer.api.campaign.CampaignFleetAPI;
import com.fs.starfarer.api.campaign.FleetAssignment;
import com.fs.starfarer.api.campaign.LocationAPI;
import com.fs.starfarer.api.campaign.SectorAPI;
import com.fs.starfarer.api.campaign.SectorEntityToken;
import com.fs.starfarer.api.campaign.CargoAPI;
import com.fs.starfarer.api.campaign.FactionAPI;
import com.fs.starfarer.api.campaign.StarSystemAPI;
import com.fs.starfarer.api.Global;

@SuppressWarnings("unchecked")
public class GRDefenseSpawnPoint extends BaseSpawnPoint {

public GRDefenseSpawnPoint(SectorAPI sector, LocationAPI location,
float daysInterval, int maxFleets, SectorEntityToken anchor) {
super(sector, location, daysInterval, maxFleets, anchor);
}

private CargoAPI playercargo;

@Override
public CampaignFleetAPI spawnFleet() {

    // Faction pardon check
    StarSystemAPI system = getSector().getStarSystem("Corvus");
    List allFleets = system.getFleets();
    for (int i = 0; i < allFleets.size(); i++) {
if (((CampaignFleetAPI) allFleets.get(i)).isPlayerFleet()) {
playercargo = ((CampaignFleetAPI) allFleets.get(i)).getCargo();
break;
}
}


    //SectorEntityToken playerfleet = system.getEntityByName("Fleet");
    SectorEntityToken station = system.getEntityByName("Orbital Depot");
    CargoAPI cargo = station.getCargo();
    //CargoAPI playercargo = playerfleet.getCargo();
    FactionAPI player = getSector().getFaction("player");
    float pvh = player.getRelationship("hegemony");
    float pvi = player.getRelationship("independent");
    float pvt = player.getRelationship("tritachyon");
    float pvg = player.getRelationship("gunrunners");
    float pvp = player.getRelationship("pirates");
   
    if (pvh < 0) {
      boolean haspardon = playercargo.removeItems(CargoAPI.CargoItemType.RESOURCES, "hpardon", 1);
      if (haspardon) {
      player.setRelationship("hegemony", 0);
      Global.getSectorAPI().addMessage("The Gun Runners have worked their magic. The Hegemony has granted you a full pardon.");
      cargo.addItems(CargoAPI.CargoItemType.RESOURCES, "hpardon", 1);
    }}
    if (pvi < 0) {
      boolean haspardon = playercargo.removeItems(CargoAPI.CargoItemType.RESOURCES, "ipardon", 1);
      if (haspardon) {
      player.setRelationship("independent", 0);
      Global.getSectorAPI().addMessage("The Gun Runners have worked their magic. The independents will see you as neutral now.");
      cargo.addItems(CargoAPI.CargoItemType.RESOURCES, "ipardon", 1);
    }}
    if (pvt < 0) {
      boolean haspardon = playercargo.removeItems(CargoAPI.CargoItemType.RESOURCES, "tpardon", 1);
      if (haspardon) {
      player.setRelationship("tritachyon", 0);
      Global.getSectorAPI().addMessage("The Gun Runners have worked their magic. You've been erased from the Tri-Tachyon kill list.");
      cargo.addItems(CargoAPI.CargoItemType.RESOURCES, "tpardon", 1);
    }}
    if (pvg < 0) {
      boolean haspardon = playercargo.removeItems(CargoAPI.CargoItemType.RESOURCES, "gpardon", 1);
      if (haspardon) {
      player.setRelationship("gunrunners", 0);
      Global.getSectorAPI().addMessage("The Gun Runners have officially forgiven your past transgressions.");
      cargo.addItems(CargoAPI.CargoItemType.RESOURCES, "gpardon", 1);
    }}
    if (pvp < 0) {
      boolean haspardon = playercargo.removeItems(CargoAPI.CargoItemType.RESOURCES, "ppardon", 1);
      if (haspardon) {
      player.setRelationship("pirates", 0);
      Global.getSectorAPI().addMessage("The Gun Runners have worked their magic. Pirates across the sector will no longer hunt you.");
      cargo.addItems(CargoAPI.CargoItemType.RESOURCES, "ppardon", 1);
    }}
// Faction pardon check

CampaignFleetAPI fleet = getSector().createFleet("gunrunners", "defenseForce");
getLocation().spawnFleet(getAnchor(), 0, 0, fleet);

fleet.addAssignment(FleetAssignment.DEFEND_LOCATION, getAnchor(), 6);
fleet.addAssignment(FleetAssignment.GO_TO_LOCATION_AND_DESPAWN, getAnchor(), 1000);

return fleet;
}

}
[close]

I believe that the method this mod uses to find the player's fleet is no longer valid - I'll give a glance through the other files to see if the same method is used elsewhere.
Logged

erynr73

  • Ensign
  • *
  • Posts: 29
    • View Profile
Re: Gun Runners mod 1.06 for Starfarer 0.53a (previously Tri-Tachyon Station mod)
« Reply #159 on: December 14, 2012, 05:41:00 AM »

I'be been using gun runners a lot since .54, there is a simple fix that I found in the Omega's Minimash thread (compilation mod with gun runners).

Just replace
Code:
SectorEntityToken playerfleet = system.getEntityByName("Fleet");

with

Code:
CampaignFleetAPI playerfleet = Global.getSector().getPlayerFleet();

in GRDefenseSpawnPoint.java (file found in Starfarer\mods\Gun Runners\data\scripts\world).
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 7174
  • Harpoon Affectionado
    • View Profile
Re: Gun Runners mod 1.06 for Starfarer 0.53a (previously Tri-Tachyon Station mod)
« Reply #160 on: December 14, 2012, 09:02:09 AM »

I'be been using gun runners a lot since .54, there is a simple fix that I found in the Omega's Minimash thread (compilation mod with gun runners).

Just replace
Code:
SectorEntityToken playerfleet = system.getEntityByName("Fleet");

with

Code:
CampaignFleetAPI playerfleet = Global.getSector().getPlayerFleet();

in GRDefenseSpawnPoint.java (file found in Starfarer\mods\Gun Runners\data\scripts\world).

This is better than what I did - I forgot about .getPlayerFleet() :P
Logged

Plasmatic

  • Admiral
  • *****
  • Posts: 500
  • Curious no?
    • View Profile

Is this mod still being worked on?

Does it work with current version?
Logged
"Better to remain silent and be thought a fool than to speak out and remove all doubt"
- Maurice Switzer

LostInTheWired

  • Lieutenant
  • **
  • Posts: 83
    • View Profile

Is this mod still being worked on?

Does it work with current version?

It doesn't seem to be worked on anymore.  I have it working with the current version, but I edited a few lines myself, as well as making the Gemini remake (the Paria, iirc) use the Carrier hint so it will actually rally at carrier waypoints.  I don't think I should be posting it though, since it's not my mod.
Logged

Paul

  • Commander
  • ***
  • Posts: 159
    • View Profile

You can post it if you like.

I was planning on keeping this updated to the latest version, but I've kind of withdrawn from modding anything or gaming in general lately. My mother passed suddenly on the 5th of last month and I've been very busy since then helping my dad and getting things in order. Haven't even downloaded the newer versions yet, heh.

Once I have more free time I'd like to play around with Starsector modding some more, but I'm not sure when that will be. Until then, if someone wants to maintain this mod so that it keeps working for the latest release I'd appreciate it.
Logged

LostInTheWired

  • Lieutenant
  • **
  • Posts: 83
    • View Profile

Well, this is the one I use.  Just small fixes, makes the Paria act like a carrier as well.  I haven't had a single crash with it yet as well, so that's a plus.  As far as I know, there's no real bugs from there, at least none that I've noticed.

[attachment deleted by admin]
Logged
Pages: 1 ... 9 10 [11]