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); In-development patch notes for Starsector 0.98a (2/8/25)

Author Topic: Radomes?  (Read 5097 times)

Tufted Titmouse

  • Lieutenant
  • **
  • Posts: 70
  • Fire the missiles. All of them.
    • View Profile
Radomes?
« on: May 03, 2017, 10:47:11 PM »

Is it possible to make a decorative weapon like thing to look like the Radome of an Awacs with stuff that's native to the game?
Also, how in god's name does one increase the sensor power of a ship aside from adding high res sensors?
« Last Edit: May 03, 2017, 11:35:09 PM by Tufted Titmouse »
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Radomes?
« Reply #1 on: May 04, 2017, 12:49:54 AM »

Also, how in god's name does one increase the sensor power of a ship aside from adding high res sensors?

Y'know, I don't know. I don't think there are any mods besides HRS that increase sensor strength. There's a bunch that lower profile, but not vice versa...

*Makes a note that TSA needs something like this for logistics ships...*
Logged

Tufted Titmouse

  • Lieutenant
  • **
  • Posts: 70
  • Fire the missiles. All of them.
    • View Profile
Re: Radomes?
« Reply #2 on: May 04, 2017, 01:10:57 AM »

Y'know, I don't know. I don't think there are any mods besides HRS that increase sensor strength. There's a bunch that lower profile, but not vice versa...

*Makes a note that TSA needs something like this for logistics ships...*
Rip.
Tried figuring it out on my own, broke mod, keeps throwing out this error
Code
42919 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.combat.entities.Ship.<init>(Unknown Source)
at com.fs.starfarer.loading.specs.OO0oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.super(Unknown Source)
at com.fs.starfarer.loading.specs.OO0oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.super(Unknown Source)
at com.fs.starfarer.loading.specs.OO0oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.super(Unknown Source)
at com.fs.starfarer.title.A.?0000(Unknown Source)
at com.fs.starfarer.title.A.String(Unknown Source)
at com.fs.starfarer.title.A.?0000(Unknown Source)
at com.fs.starfarer.title.A.super(Unknown Source)
at com.fs.starfarer.combat.super.new.super(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
at com.fs.starfarer.title.TitleScreenState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Every time i start the game and it's getting Really Infuriating since i can't find what's causing it
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Radomes?
« Reply #3 on: May 04, 2017, 01:16:07 AM »

Were you trying to make a custom hullmod?
Logged

Tufted Titmouse

  • Lieutenant
  • **
  • Posts: 70
  • Fire the missiles. All of them.
    • View Profile
Re: Radomes?
« Reply #4 on: May 04, 2017, 01:20:49 AM »

Were you trying to make a custom hullmod?
no actually, i was trying to make a spinning radome out of a decorative weapon ala old scy's missile cruiser
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Radomes?
« Reply #5 on: May 04, 2017, 01:26:55 AM »

Oh. XD What exactly is a "randome"?
Logged

Tufted Titmouse

  • Lieutenant
  • **
  • Posts: 70
  • Fire the missiles. All of them.
    • View Profile
Re: Radomes?
« Reply #6 on: May 04, 2017, 01:28:44 AM »

Oh. XD What exactly is a "randome"?

That's what i was trying to do
Logged

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Radomes?
« Reply #7 on: May 04, 2017, 01:36:14 AM »

Oh, I see. "Radome" not "Randome". I was confused for a moment there.

So in reality, what you're trying to make is "a decorative weapon".

You'll need the following:
- A set of sprites, each one representing a single frame of the animation.
- A "___.wpn" file to handle the weapon's operation.
- A "weapon_data.csv" file with an entry to handle the weapon's stats
Logged

Tufted Titmouse

  • Lieutenant
  • **
  • Posts: 70
  • Fire the missiles. All of them.
    • View Profile
Re: Radomes?
« Reply #8 on: May 04, 2017, 01:44:45 AM »

Oh, I see. "Radome" not "Randome". I was confused for a moment there.

So in reality, what you're trying to make is "a decorative weapon".

You'll need the following:
- A set of sprites, each one representing a single frame of the animation.
- A "___.wpn" file to handle the weapon's operation.
- A "weapon_data.csv" file with an entry to handle the weapon's stats
I figured that much, though my attempt has rendered me with a permanently broken mod, Even switching to archived versions still gives me the error, Even with a clean install.
Edit: Updated an older version to current, made a backup of it.
« Last Edit: May 04, 2017, 02:06:45 AM by Tufted Titmouse »
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 3529
  • MagicLab discord: https://discord.gg/EVQZaD3naU
    • View Profile
Re: Radomes?
« Reply #9 on: May 04, 2017, 02:11:06 AM »

Oh, I see. "Radome" not "Randome". I was confused for a moment there.

So in reality, what you're trying to make is "a decorative weapon".

You'll need the following:
- A set of sprites, each one representing a single frame of the animation.
- A "___.wpn" file to handle the weapon's operation.
- A "weapon_data.csv" file with an entry to handle the weapon's stats
What? Nooooo. You don't do that with an animation sequence! You make a single deco weapon and you make it spin with a simple script. There even is a deprecated one in the game that was used to the Atlas' radar.
Logged
 

AxleMC131

  • Admiral
  • *****
  • Posts: 1722
  • Amateur World-Builder
    • View Profile
Re: Radomes?
« Reply #10 on: May 04, 2017, 02:24:01 AM »

What? Nooooo. You don't do that with an animation sequence! You make a single deco weapon and you make it spin with a simple script. There even is a deprecated one in the game that was used to the Atlas' radar.

Well, you can do that if you know more than an ounce of coding (which I don't).  ;) But... Wait, the Atlas had a script-based animation? I didn't even know it had a radar dish...

Eh. Either way, I'm probably not qualified to give proper advice on this. I'd be an even worse tech support operator than those people who claim to be tech support but are actually calling you from Kenya or something.
Logged

Tufted Titmouse

  • Lieutenant
  • **
  • Posts: 70
  • Fire the missiles. All of them.
    • View Profile
Re: Radomes?
« Reply #11 on: May 04, 2017, 03:53:54 AM »

What? Nooooo. You don't do that with an animation sequence! You make a single deco weapon and you make it spin with a simple script. There even is a deprecated one in the game that was used to the Atlas' radar.

Is the script in the game workable? If so, where can i find it?
Logged

MinusUdn

  • Ensign
  • *
  • Posts: 35
    • View Profile
Re: Radomes?
« Reply #12 on: May 05, 2017, 09:17:20 AM »

I found this script in the Atlas' dish, but can't get it to work in game, the dish doesn't spin and when I try to compile and add it to to a mod the game crashes  :-\

Code
package com.fs.starfarer.api.impl.combat;

import com.fs.starfarer.api.combat.WeaponAPI;

public class SensorDishRotationEffect implements com.fs.starfarer.api.combat.EveryFrameWeaponEffectPlugin
{
  public SensorDishRotationEffect() {}
 
  private float currDir = Math.signum((float)Math.random() - 0.5F);
 
  public void advance(float amount, com.fs.starfarer.api.combat.CombatEngineAPI engine, WeaponAPI weapon) {
    if (engine.isPaused()) { return;
    }
    float curr = weapon.getCurrAngle();
   
    curr += currDir * amount * 10.0F;
    float arc = weapon.getArc();
    float facing = weapon.getArcFacing() + (weapon.getShip() != null ? weapon.getShip().getFacing() : 0.0F);
    if (!isBetween(facing - arc / 2.0F, facing + arc / 2.0F, curr)) {
      currDir = (-currDir);
    }
   
    weapon.setCurrAngle(curr);
  }
 
  public static boolean isBetween(float one, float two, float check) {
    one = normalizeAngle(one);
    two = normalizeAngle(two);
    check = normalizeAngle(check);
   

    if ((check >= one) && (check <= two)) { return true;
    }
    if (one > two) {
      if (check <= two) return true;
      if (check >= one) return true;
    }
    return false;
  }
 
  public static float normalizeAngle(float angleDeg) {
    return (angleDeg % 360.0F + 360.0F) % 360.0F;
  }
}
Logged