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 2 [3] 4 5 ... 197

Author Topic: [0.8a] Starsector+ 3.7.0  (Read 1325097 times)

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #30 on: February 17, 2014, 07:04:04 PM »

I have no middle-ground computer to test on; my desktop is way too overpowered for performance testing and my laptop can't run the game at a playable rate in the first place.  What I'll probably do is include a file link in the mod so people with weaker machines can delete the graphics-boosting plugins.
Logged

FasterThanSleepyfish

  • Admiral
  • *****
  • Posts: 727
  • Blub
    • View Profile
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #31 on: February 17, 2014, 07:28:24 PM »

I have a decent PC that can adequately run starsector. Big battles make it suffer though, the engines are quite intensive.
Logged

Toxcity

  • Admiral
  • *****
  • Posts: 561
    • View Profile
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #32 on: February 17, 2014, 07:48:30 PM »

The way the modding API works, that's impossible.  Starsector+ is incompatible with mods that change the core JSON files.  I don't know why Mayorate edits the Hegemony faction files, but it does.  A mod that doesn't edit Corvus shouldn't be messing with the core files, in my opinion.

To answer this, some mods edit faction files so that they can have their ships added to the vanilla factions, or they are used so that they can make a custom fleet (in the Mayorate's case it is so that they can have a Hegemony fleet invade their system for lore reasons).
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #33 on: February 17, 2014, 08:20:04 PM »

Either way, it's not possible with the current state of the API to make it compatible with mods that do that.  It's up to individual faction developers or the end user to merge the faction files.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #34 on: February 18, 2014, 11:43:44 AM »

Alright.  Download this mod and activate it.  Tell me how it runs on your computers.
Logged

Uomoz

  • Admiral
  • *****
  • Posts: 2663
  • 'womo'dz
    • View Profile
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #35 on: February 18, 2014, 11:47:12 AM »

Hey, I've seen those plugins somewhere... :D

Testing them right now!

EDIT: a lot of cool stuff! The emp arcs are a bit too long imho (or maybe it was some form of interference between mods). 0 fps hit, by my pc is pretty beastly..
« Last Edit: February 18, 2014, 12:09:23 PM by Uomoz »
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #36 on: February 18, 2014, 12:50:35 PM »

The EMP arc plugin is unchanged from the version in your mod (it's credited in the OP).  I could modify it to clamp the arc length to a particular maximum length, though.
Logged

Uomoz

  • Admiral
  • *****
  • Posts: 2663
  • 'womo'dz
    • View Profile
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #37 on: February 18, 2014, 12:59:53 PM »

The EMP arc plugin is unchanged from the version in your mod (it's credited in the OP).  I could modify it to clamp the arc length to a particular maximum length, though.

I did a bunch of tweaks, like making the smoke actually visible in WeaponDamageSmoke:

Spoiler
package data.scripts.plugins;

import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.EveryFrameCombatPlugin;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.WeaponAPI;
import com.fs.starfarer.api.combat.WeaponAPI.WeaponSize;
import com.fs.starfarer.api.util.IntervalUtil;
import java.awt.Color;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.lwjgl.util.vector.Vector2f;

public class WeaponDamageSmoke implements EveryFrameCombatPlugin
{

    private CombatEngineAPI engine;
    private static final Map mag = new HashMap();
    static
    {
        mag.put(WeaponSize.SMALL, 1f);
        mag.put(WeaponSize.MEDIUM, 1.5f);
        mag.put(WeaponSize.LARGE, 2.5f);
    }

    private final float smokeSize = 0.8f + 0.4f * (float)Math.random();

    public void init(CombatEngineAPI engine)
    {
        this.engine = engine;
    }

    private final IntervalUtil interval = new IntervalUtil(0.1f, 0.1f);

    public void advance(float amount, List events)
    {
        if (engine.isPaused()) return;
      
      interval.advance(amount);
      
        if (interval.intervalElapsed())
        {
            List ships = engine.getShips();
            Iterator it = ships.iterator();
            while (it.hasNext())
            {
                ShipAPI ship = (ShipAPI) it.next();      
                List weapons = ship.getAllWeapons();
                Iterator it2 = weapons.iterator();
                
                while (it2.hasNext())
                {
                    WeaponAPI weapon = (WeaponAPI) it2.next();
                    
                    if(weapon.isDisabled())// -only happening on weapon disable since your explosion stuff is way better anyway
                    {
                        float smokeSizeValue = (Float)mag.get(weapon.getSize());

                        float velX = (float)Math.random() * 10f - 5f;
                        float velY = (float)Math.sqrt(25f - velX * velX);
                        if((float)Math.random() >= 0.5f)
                        {
                            velY = -velY;
                        }
                        
                        engine.addSmokeParticle(weapon.getLocation(), new Vector2f(velX,velY), 40f * this.smokeSize * smokeSizeValue, 0.05f, 4f, new Color(25,25,25,80));// -less transparency here
                        engine.addSmokeParticle(weapon.getLocation(), new Vector2f(velX,velY), 20f * this.smokeSize * smokeSizeValue, 0.05f, 3f, new Color(90,90,90,80));// -less transparency here
                    }
                }
            }
        }
    }
}
[close]

And some changes to the Arc as well:

Spoiler
package data.scripts.plugins;

import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.DamageType;
import com.fs.starfarer.api.combat.EveryFrameCombatPlugin;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.util.IntervalUtil;
import java.awt.Color;
import java.util.Iterator;
import java.util.List;
import org.lwjgl.util.vector.Vector2f;

public class ArcEffectOnOverload implements EveryFrameCombatPlugin
{
    private CombatEngineAPI engine;
    
    public void init(CombatEngineAPI engine) {
        this.engine = engine;
    }

   private IntervalUtil interval = new IntervalUtil(0.25f, 0.5f); //set the time you want the arc to happen
        
    public void advance(float amount, List events)
   {
      if (engine.isPaused()) {
         return;
      }

      //Advances the interval.
      interval.advance(amount);   

      //When the interval has elapsed...
      if (interval.intervalElapsed())
      {
         List ships = engine.getShips();
         Iterator it = ships.iterator();

         while (it.hasNext())
         {
            ShipAPI ship = (ShipAPI) it.next();
            
            if (ship.isHulk()) {
               continue;
            }
            
            if (ship.getFluxTracker().isOverloaded())
            {
               Vector2f point = new Vector2f(ship.getLocation());         
   
               point.x += (ship.getCollisionRadius() / 3f) * (((float) Math.random() * 2f) - 1);
               point.y += (ship.getCollisionRadius() / 3f) * (((float) Math.random() * 2f) - 1);
               
               //spawns one arc.
               engine.spawnEmpArc(ship,point,ship,ship,DamageType.OTHER,0f,0f,ship.getCollisionRadius()*2,"hit_shield_beam_loop",12f,new Color(55,170,245,255),new Color(255,255,255,255));// -made its max length equal to the ship diameter
            }
         }
      }
   }
}
[close]

EDIT: maybe I made the smoke a little bit to visible, need to tone it back down. Still:



This is amazing. Maybe some hull parts flying away and debris would complete this masterpiece.
« Last Edit: February 18, 2014, 01:49:17 PM by Uomoz »
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #38 on: February 18, 2014, 03:28:39 PM »

Unfortunately, hull parts and debris are impossible to add.  Unless Alex allows us to spawn custom asteroid-tier objects and have user-defined particle sprites, it's just not going to happen.

A simulacrum can be done with projectiles, but it's laggy and ultimately buggy due to the fact that ballistic projectiles have fadeout crap.
Logged

Tecrys

  • Admiral
  • *****
  • Posts: 592
  • repair that space elevator!
    • View Profile
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #39 on: February 18, 2014, 03:36:35 PM »

Now that looks pretty neat!

I am working on giving BGE some custom damage decals/effects and this stuff happens to be exactly what I would need for that.
Would you mind if I use that plugin for my mod? (After I repurposed it a bit)
Logged
Symbiotic Void Creatures 0.5.0-alpha for 0.97a is out
https://fractalsoftworks.com/forum/index.php?topic=28010.0

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #40 on: February 18, 2014, 03:54:12 PM »

Quote
I give free permission for any modder to take and use my ships/weapons/scripts if credit is given.
Logged

Uomoz

  • Admiral
  • *****
  • Posts: 2663
  • 'womo'dz
    • View Profile
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #41 on: February 19, 2014, 01:10:11 AM »

Unfortunately, hull parts and debris are impossible to add.  Unless Alex allows us to spawn custom asteroid-tier objects and have user-defined particle sprites, it's just not going to happen.

A simulacrum can be done with projectiles, but it's laggy and ultimately buggy due to the fact that ballistic projectiles have fadeout crap.

What about projectile like flares popping out from the explosions like fiery debris? Those could be cool!

EDIT: fairly inconsistent null in the title screen (maybe related to the fact that ships get despawned before getting killed there)

Spoiler
com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.combat.CombatEngine.addHitParticle(Unknown Source)
   at data.scripts.plugins.ShipDestructionEffects.advance(ShipDestructionEffects.java:163)
   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.title.OoOO.o00000(Unknown Source)
   at com.fs.starfarer.B.??00(Unknown Source)
   at com.fs.oOOO.A.?0000(Unknown Source)
   at com.fs.starfarer.combat.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]
« Last Edit: February 19, 2014, 02:53:28 AM by Uomoz »
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.3.2
« Reply #42 on: February 19, 2014, 03:47:30 AM »

See: Laggy.  It's not optimal at all to create that many projectiles.

Also, the current effect for ship destruction is sufficient enough.  It's got a LOT of effects on it and frankly it's bordering on excessive due to all the smoke and fire and lights.

When the ship is vaporized, that's a different story.  Ideally I would want to spawn a few flaming chunks but that's a tall order with the current projectile system as it is.  I've experimented with it and there's really no way to get an acceptable result.  They all fade away at the same time, point defense turrets fire upon them, they sometimes have missile outlines, they are a huge performance hit, etc.  It's just not worth it unless Alex adds a way to spawn custom objects into the world.

By the way, that crash may be a bug on Alex's part.  I've noticed that if you use scripts to spawn missiles, they do not get cleaned up when you switch battle screens from the title.  They'll still be there, floating around!

Edit: I think I managed to fix it on my end.  Title screen ran for an hour without crashing.
« Last Edit: February 19, 2014, 04:23:48 AM by Dark.Revenant »
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.4
« Reply #43 on: February 19, 2014, 04:28:42 AM »

I might as well announce Version 0.4, which includes this graphics update and a few more balance changes.  Have fun!

If you are having performance issues, delete the Starsector Plus/data/scripts/plugins folder.
Logged

TimeDiver

  • Captain
  • ****
  • Posts: 345
    • View Profile
Re: [0.6.2a] Starsector+ Vanilla Enhancement Mod 0.4.1
« Reply #44 on: February 21, 2014, 07:02:34 PM »

Kind of hilarious bug with the 'Small Unit Tactics' skill as of v0.4.1:

Instead of decreasing CR loss by 5% per level on ships that have a Peak Readiness timer (once the timer runs hits zero), CR loss is increased by 5% per level.
Logged
Pages: 1 2 [3] 4 5 ... 197