Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Psiyon

Pages: 1 [2] 3 4 5
16
Modding / (April Fools) Starsector SUPER EDITION
« on: April 01, 2013, 07:20:09 AM »


Surely, all the souls of this superb forum can wholly concede that the current state of Star Sector is subpar. The sad truth is simply that the game is severely insufficient when it comes to simulated combat. Currently, the player’s valiant efforts to thwart their enemies are impaired by the manifold restrictions placed on the game’s specialized combat mechanics.

I, alone, have solely solved this sad snarl.

Allow me to present Star Sector: Super Edition, a modification that serves to make Star Sector a surely enjoyable game once again.

Certainly, you ask, “What proves to make the Super Edition so Super?”

Allow me to clarify the nature of this modification:

Flux is dead gone, as is ammunition! Who would dare desire to be limited by such banal and sour limitations? Starships can now shoot to their heart’s content without ever stopping for rest! Battles have never been so explosive!


The shields of all space vessels have been spun to a sum of two pi radians! No more shall the starships struggle with holes in their stalwart defenses! There is no sense is shields that cannot secure the entirety of the ship!


Structural integrity of all ships has been changed to better serve the realm of reality! No more shall small vessels stand up to substantially-sized capital ships!


All armaments have had their rate of rearmament increased by roughly half! Who can stand to wait while weapons work to reload in a realm of ruthless war?


Without waiting any longer, I unleash the link to the super-anticipated Super Edition of Star Sector!
https://dl.dropbox.com/u/71512473/SSSE.zip

Surely Alex will see the superior nature of the Super Edition and seek to include it in the Simple Edition of Star Sector! Be sure to show your support!



17
Modding / Decorative Weapons Appearing in Weapon Groups -- fix?
« on: March 13, 2013, 12:27:25 PM »
When using pre-defined variants, decorative weapons work fine, and will never show up in the ship's weapon groups. However, after you refit them, there's a very high chance that they'll get placed into group 1. This is extremely annoying as some of the ships that I'm working with can have like, 20+ decorative weapons.




Is there any way to prevent this from happening, or am I just going to have to wait for the next update?

18
Modding / Alex, I broke your game again
« on: February 17, 2013, 10:01:08 PM »

19
Modding / Code Sample: Area-of-Effect Ship Systems
« on: January 30, 2013, 08:28:49 PM »
This is an example of a ship system script that allows a vessel to project a field around it that applies modifications to the ships within range.

The code:

Code
package data.shipsystems.scripts;

import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.plugins.ShipSystemStatsScript;

import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.ShipSystemAIScript;
import com.fs.starfarer.api.combat.ShipSystemAPI;
import com.fs.starfarer.api.combat.ShipwideAIFlags;
import com.fs.starfarer.api.combat.DamagingProjectileAPI;
import data.scripts.plugins.CombatUtils;
import java.util.Iterator;
import org.lwjgl.util.vector.Vector2f;

import java.util.HashMap;
import java.util.Map;

public class firecontrol_sys implements ShipSystemStatsScript {


//Just some global variables.
public static final float RANGE = 520f;
public static final float ACCURACY_BONUS = 0.50f;
public static final float RANGE_BONUS = 15f;
public static final float SPEED_REDUCTION_FC = -50f;

//Creates a hashmap that keeps track of what ships are receiving the benefits.
private static Map receiving = new HashMap();


public void apply(MutableShipStatsAPI stats, String id, State state, float effectLevel) {

//This applies some effects to the host ship. Nothing special.
stats.getMaxSpeed().modifyPercent(id, SPEED_REDUCTION_FC * effectLevel);
stats.getAcceleration().modifyPercent(id, SPEED_REDUCTION_FC * effectLevel);
stats.getDeceleration().modifyPercent(id, SPEED_REDUCTION_FC * effectLevel);
stats.getTurnAcceleration().modifyPercent(id, SPEED_REDUCTION_FC * effectLevel);
stats.getMaxTurnRate().modifyPercent(id, SPEED_REDUCTION_FC * effectLevel);


//Declares two objects of type ShipAPI. 'ship' is just a generic holder for ships that are cycled through. 'host_ship' is the ship that is using the system.
ShipAPI ship;
ShipAPI host_ship = CombatUtils.getOwner(stats);

//This loop iterates through all ships active on the field.
for (Iterator iter = CombatUtils.getCombatEngine().getShips().iterator(); iter.hasNext();)
{

ship = (ShipAPI) iter.next(); //Loads the current ship the iterator is on into 'ship'

if (ship.isHulk()) continue; //We don't want to bother modifying stats of the ship if it's disabled.
            if (ship == host_ship) continue; //Doesn't let the host ship receive the benefits it's giving to others.

//If the ship is on the same team as the host ship, and it's within range...
if ((host_ship.getOwner() == ship.getOwner()) && (CombatUtils.getDistance(ship, host_ship) <= (RANGE)))  {

//Modify this ship's stats.
ship.getMutableStats().getAutofireAimAccuracy().modifyFlat(id, ACCURACY_BONUS);
ship.getMutableStats().getBallisticWeaponRangeBonus().modifyPercent(id, RANGE_BONUS);
ship.getMutableStats().getEnergyWeaponRangeBonus().modifyPercent(id, RANGE_BONUS);


//Speed is helpful when determining what range to use, since its effects are quite obvious.
ship.getMutableStats().getMaxSpeed().modifyFlat(id, 300f * effectLevel);
ship.getMutableStats().getAcceleration().modifyFlat(id, 300f * effectLevel);


//Adds the ship to the hashmap, and associates it with the host ship.
receiving.put(ship, host_ship);

//If the ship isn't in range but is contained in the hashmap, and the host ship of the ship is indeed this one...
} else if ((receiving.containsKey(ship)) && (receiving.get(ship) == host_ship)){

//removes all benefits
ship.getMutableStats().getAutofireAimAccuracy().unmodify(id);
ship.getMutableStats().getBallisticWeaponRangeBonus().unmodify(id);
ship.getMutableStats().getEnergyWeaponRangeBonus().unmodify(id);


ship.getMutableStats().getMaxSpeed().unmodify(id);
ship.getMutableStats().getAcceleration().unmodify(id);

//Removes the ship from the hashmap.
receiving.remove(ship);

}
}
}

public void unapply(MutableShipStatsAPI stats, String id) {

//Removes the effects from the host ship.
stats.getMaxSpeed().unmodify(id);
stats.getMaxTurnRate().unmodify(id);
stats.getTurnAcceleration().unmodify(id);
stats.getAcceleration().unmodify(id);
stats.getDeceleration().unmodify(id);

//same objects as before.
ShipAPI ship;
ShipAPI host_ship = CombatUtils.getOwner(stats);

//Loops through all the ships in the hashmap.
        for (Iterator iter = receiving.keySet().iterator(); iter.hasNext();)
        {
            ship = (ShipAPI) iter.next();

//If the ship in the hash map is receiving benefits from this host ship (which is currently powering-down its system):
//(This makes it so that one host ship bringing down its system doesn't remove benefits that are being applied to other ships by host ships elsewhere.
if (receiving.get(ship) == host_ship) {

//removes all benefits
ship.getMutableStats().getAutofireAimAccuracy().unmodify(id);
ship.getMutableStats().getBallisticWeaponRangeBonus().unmodify(id);
ship.getMutableStats().getEnergyWeaponRangeBonus().unmodify(id);

ship.getMutableStats().getMaxSpeed().unmodify(id);
ship.getMutableStats().getAcceleration().unmodify(id);
}
        }
}

public StatusData getStatusData(int index, State state, float effectLevel) {

if (index == 0) {
return new StatusData("Targeting data streaming.", false);
} else if (index == 1) {
return new StatusData("Engine systems impaired.", true);
}
return null;
}
}


Do note, you will need the CombatUtils plugin for this to work.

If you don't have it, here it is:
(Save in scripts/plugins)
Code
package data.scripts.plugins;

import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.CombatEntityAPI;
import com.fs.starfarer.api.combat.EveryFrameCombatPlugin;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import java.util.Iterator;
import java.util.List;
import org.lwjgl.util.vector.Vector2f;

public class CombatUtils implements EveryFrameCombatPlugin
{
    private static CombatEngineAPI engine;
    private static float combatTime;

    public static CombatEngineAPI getCombatEngine()
    {
        return engine;
    }

    public static float getElapsedCombatTime()
    {
        return combatTime;
    }

    public static ShipAPI getOwner(MutableShipStatsAPI stats)
    {
        if (engine == null)
        {
            return null;
        }

        ShipAPI tmp;
        for (Iterator allShips = engine.getShips().iterator(); allShips.hasNext();)
        {
            tmp = (ShipAPI) allShips.next();

            if (tmp.getMutableStats() == stats)
            {
                return tmp;
            }
        }

        return null;
    }

    public static float getDistance(CombatEntityAPI obj1, CombatEntityAPI obj2)
    {
        return getDistance(obj1.getLocation(), obj2.getLocation());
    }

    public static float getDistance(CombatEntityAPI entity, Vector2f vector)
    {
        return getDistance(entity.getLocation(), vector);
    }

    public static float getDistance(Vector2f vector1, Vector2f vector2)
    {
        float a = vector1.x - vector2.x;
        float b = vector1.y - vector2.y;
        return (float) Math.hypot(a, b);
    }

    @Override
    public void advance(float amount, List events)
    {
        combatTime += amount;
    }

    @Override
    public void init(CombatEngineAPI engine)
    {
        CombatUtils.engine = engine;
        combatTime = 0f;
    }
}



Screenshot:

I used a decorative weapon for the circle effect. It ran under this code:

Code
package data.weapons.scripts;

import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.CombatEntityAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.EveryFrameWeaponEffectPlugin;
import com.fs.starfarer.api.combat.WeaponAPI;
import com.fs.starfarer.api.combat.ShipSystemAPI;
import com.fs.starfarer.api.AnimationAPI;

public class AMoverlay implements EveryFrameWeaponEffectPlugin {



public void advance(float amount, CombatEngineAPI engine, WeaponAPI weapon) {
if (engine.isPaused()) return;

AnimationAPI anim = weapon.getAnimation();

//anim.pause();

if (weapon.getShip().isHulk()) {
anim.setFrame(0);
} else if (!weapon.getShip().getSystem().isActive()) {
anim.setFrame(0);
} else {
anim.setFrame(1);
}
anim.pause();
}
}
This script basically makes the weapon switch to the second frame when the ship's system is on. In this case, the first frame is completely transparent.


Thanks to EnderNerdcore, whose code I somewhat based the first script off of. And LazyWizard, who made the combatutils plugin.




EDIT: Here's a sample AI script. Might or might not work for your implementation of the AoE script. This one deals with providing accuracy bonuses.


Code

package data.shipsystems.ai;

import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.ShipSystemAIScript;
import com.fs.starfarer.api.combat.ShipSystemAPI;
import com.fs.starfarer.api.combat.ShipwideAIFlags;
import com.fs.starfarer.api.combat.DamagingProjectileAPI;
import data.scripts.plugins.CombatUtils;
import java.util.Iterator;
import org.lwjgl.util.vector.Vector2f;
import com.fs.starfarer.api.util.IntervalUtil;

public class FCAI implements ShipSystemAIScript {
    private ShipSystemAPI system;
    private ShipAPI ship;
private float sinceLast = 0f;

//Sets an interval for once every 1-1.5 seconds. (meaning the code will only run once this interval has elapsed, not every frame)
private IntervalUtil tracker = new IntervalUtil(1f, 1.5f);

    @Override
    public void init(ShipAPI ship, ShipSystemAPI system, ShipwideAIFlags flags, CombatEngineAPI engine)
    {
        this.ship = ship;
        this.system = system;
    }

    @Override
    public void advance(float amount, Vector2f missileDangerDir, Vector2f collisionDangerDir, ShipAPI target)
    {

tracker.advance(amount);

sinceLast += amount;
//Once the interval has elapsed...
if (tracker.intervalElapsed()) {

//Activ_range is the range at which the AOE benefits are applied. Should match the radius from the other script.
        float activ_range = 520f;
//Range at which the system will be effective. (Meaning, if enemy ships are within a range of 1000, then our friendly ships around us will have enemies to shoot at.
        float effective_range = 1000f;
//A variable that increases or decreases the chance for activation. Keeps track of enemies within the effective range.
        float activ_chance = 0f;

//Counters for friendly and hostile ships within the activ_range
int ships_friendly = 0;
int ships_hostile = 0;

//Sets up a temporary ship object.
        ShipAPI ship_tmp;


//Iterates through all ships on the map.
for (Iterator iter = CombatUtils.getCombatEngine().getShips().iterator();
                iter.hasNext();)
        {
//Loads the current ship the iterator is on into ship_tmp
            ship_tmp = (ShipAPI) iter.next();

//We don't care about this ship if it's disabled, so we continue.
if (ship_tmp.isHulk()) continue;

//If the distance to the ship is less than or equal to the activ_range...
            if (CombatUtils.getDistance(ship_tmp, ship) <= (activ_range)) {
//If the owner of ship_tmp is not the same owner as the host ship, increment the hostile ships by 1. Else, it's friendly, so we increment friendly ships by 1.
if (ship_tmp.getOwner() != ship.getOwner()) {
ships_hostile++;
} else {
ships_friendly++;
}
}
//If the ship is hostile and it's inside of the effective range, up the activ_chance by 1.
if ((ship_tmp.getOwner() != ship.getOwner()) && (CombatUtils.getDistance(ship_tmp, ship) <= (effective_range))) {
activ_chance += 1f;
            }
        }



        float fluxLevel = ship.getFluxTracker().getFluxLevel(); //Gets our ship's flux level.


//If there are four ships within the effective range, the system isn't active, there are less than or equal to three hostile ships within the activ_range,
//there are at least 3 friendly ships within the activ_range, our flux level is less than 85%, and the random number is greater than 0.25,
//We activate the system.
if (activ_chance > 4f && !system.isActive() && (ships_hostile <= 3) && (ships_friendly >= 3) && fluxLevel < 0.85f && ((float) Math.random() > 0.25f)) {
             ship.useSystem();       



//If there are more than 2 ships within the effective range, the system isn't active, there are no hostile ships within the activ_range,
//there are at least 2 friendly ships within the activ_range, our flux level is less than 60%, and the random number is greater than 0.7,
//We activate the system.
        } else if (activ_chance > 2f && !system.isActive() && (ships_hostile == 0) && (ships_friendly >= 2) && fluxLevel < 0.6f && ((float) Math.random() > 0.7f)) {
            ship.useSystem();


//If there are one or fewer enemy ships in the effective range, OR if our flux is over 90%, OR if there are one or fewer friendly ships in range,
//OR if there are a ton of hostile ships in range, AND the system is active...
//Deactivate the system. (Using a system twice just turns it off)
        } else if ((activ_chance <= 1f || fluxLevel >= 0.9f || ships_friendly <= 1 || ships_hostile >= 5) && system.isActive()) {

            ship.useSystem();
        } else { return; }
    }

}
}



20
Discussions / Arctic Combat is an Amazing Game
« on: January 19, 2013, 10:57:40 AM »
I lied.
http://www.youtube.com/watch?v=CKlI2nBga68 (Warning: video contains numerous misspelled swear words and abundant references to homosexuality.)



oh and if anyone wants to play video games with me just let me know and illl give you my steam name

21
Modding / Community Mod 2 (Framework Download Available)
« on: January 06, 2013, 03:47:44 PM »
Framework

As of now, all ships have proper infection systems. I got the infection beam working. The campaign is playable, though it's garbage and 99% incomplete. Infected fleets slowly increase in spawn frequency, and spawn on the edge of the system. Civilian fleets move between worlds. A small military presence is there to keep the infection at bay for a little while, but ultimately gets overwhelmed after a good bit of time. I put the munitions ships in-game as civilian vessels.

There's one horrible issue, however: refitting your ship will result in the infection overlay decorative weapons being placed in group 1. As there is no way to fix this, if you refit your ship, do NOT use group 1 for any weapons, otherwise, stupid will happen.


To anyone who's still thinking about contributing, this download is the current framework. Here's how contributing will work:

-> You download the framework, add/modify content.
-> You upload the new version of the mod somewhere and send the link to me. Inform me of what has been changed. If you can upload just the relevant files you've modified, that would be great too.
-> I implement your changes into my version.
-> I upload a new framework after a sizable amount has been added. Don't worry about using framework that is slightly out of date, unless you're modifying core campaign code. If that's the case, talk with me, and I can provide you with the most up-to-date version.


The link: https://dl.dropbox.com/u/71512473/CoMM2-base.zip




Original Post



Some of you might remember the old Community Mod I started a while back that sadly failed. It failed for a simple reason: it relied too heavily on large contributions from many individuals, and also because I was pretty hard pressed for time. This time around, I want to try something different, and open it to modders of virtually any skill level at the same time.



So, a community mod. Yeah. I'll cut out the superfluous introduction and get right to the stuff that matters. In Q&A format too, because Q&As are awesome.

Q: Uh, what's this mod going to be? Just cramming content into the base game?

A: Yes and no. Cramming more ships and weapons into the base game is all fine and dandy, but it really doesn't do anything new or interesting if it isn't accompanied by anything special.

Q: Stop wasting my time. What's going to be special?

A: Completely changing the way the campaign plays.

Q: Cool story bro. How?

A: As it stands, the campaign's purpose is essentially "become the strongest", which is a goal that's easily achieved after a few hours of play. I propose a new goal: "survive for as long as you can".

Q: Oh so like some lame survival game, but in space?

A: This one won't be lame. Starsector's current campaign could be easily turned from a "free-roam pirate-hunting sandbox" into a full-fledged "use all resources at your disposal to fight off an unrelenting enemy game".

Q: I guess that's kind of interesting. What's the community going to do?

A: The community's job will be to make this even more interesting. While I could pull off the mod in its simplest form alone without too much difficulty, the end result would be something unremarkable as I don't have the time to pour 100% of my effort into it.

Q: So you want us to do all the hard work for you?

A: No. The community can contribute in whatever way they wish. Ships, weapons, sounds, music, code, ideas, art, whatever--everything is welcome.

Q: Aren't you concerned about quality control if practically anyone can just toss their garbage into this mod?

A: I will reserve the right to choose which content is officially added, as well as the right to edit all submitted content however I see fit.

Q: Okay. So far so good, I suppose. What's the end goal here?

A: The end goal is a totally new campaign mode in which the player, utilizing both default and community-created content, fights to their last breath against an extraordinarily powerful foe. It's somewhat inspired by an old but excellent Starcraft mod, Armageddon Onslaught. In that mod, you fought as one of the default 3 races against a godlike AI that commanded the armies of hell against you. Beating it, even in a 7 vs 1, was virtually impossible, but oh my God was it fun. I, and hopefully many others, would greatly enjoy a similar survival experience in Starsector.



Of course, these details are hardly set in stone. This is a community mod, and everyone should have equal say in determining which direction it should go in (if it should go anywhere at all).

I'll make this simple: if you reply, tell me:
-Whether or not you're interested in the idea. If not, please tell why.
-Whether or not you're interested in contributing. If yes, please tell me what you're good with, and how often you'd be willing to contribute.
-Whether or not you're interested in a larger development role. I'm a full time student at a university, so my free time isn't always plentiful. It would be great to have at least one other person capable of developing the mod if I am unable to.
-And of course, any comments, questions and suggestions you might have.


If you wish to converse with me about something personally, feel free to add me on Skype under the name "blarghle".

Google Document page for concept work: https://docs.google.com/folder/d/0B3zHruqQTTyoSi1VeFFNdjA5eWc/edit
(PM me with your Google account's email to get editing permissions)

22
Modding / Plugin Example - Electricity Arcs on Damaged Ships
« on: January 05, 2013, 09:53:27 AM »
So I was messing around with the new ability to spawn EMP arcs, and this happened:



Code
//Electrical Damage Plugin, by Psiyon
package data.scripts.plugins;

import java.awt.Color;
import java.util.Iterator;
import java.util.List;

import org.lwjgl.input.Keyboard;
import org.lwjgl.util.vector.Vector2f;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.combat.CombatEngineAPI;
import com.fs.starfarer.api.combat.CombatEntityAPI;
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.input.InputEventAPI;
import com.fs.starfarer.api.mission.FleetSide;
import com.fs.starfarer.api.util.IntervalUtil;

public class TestCombatPlugin implements EveryFrameCombatPlugin {

/**
* Set this to true to have the plugin actually do stuff.
*/
private static boolean TEST_MODE = true;

private CombatEngineAPI engine;

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



//Generates an interval between 0.5 and 3 seconds.
private IntervalUtil interval = new IntervalUtil(0.5f, 3f);
public void advance(float amount, List events) {
//Makes sure this code doesn't run if test mode is inactive, or if the game is paused.
if (!TEST_MODE) return;
if (engine.isPaused()) return;

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

//When the interval has elapsed...
if (interval.intervalElapsed()) {

//cycles through all the ships in play.
List ships = engine.getAllShips();
Iterator it = ships.iterator();

//While there are still more ships to cycle through...
while (it.hasNext()) {
//loads the current ship the iterator is on into the object "ship"
ShipAPI ship = (ShipAPI) it.next();

//If the ship is disabled or is a fighter, we don't want to bother with arcs, so we'll start the loop over
if (ship.isHulk()) continue;
if (ship.isFighter()) continue;

//If the ship has less than an eigth of its HP
if (ship.getHitpoints() <= ship.getMaxHitpoints() / 8f) {
//Gets the center of the ship, needed for spawning the EMP arc.
Vector2f point = new Vector2f(ship.getLocation());

//This randomizes the point's x and y values a bit. Keep in mind, these are world coordinates, and are not relative to the ship.
//This means that the x and y values stored in point aren't always 0,0.
point.x += (ship.getCollisionRadius() / 2f) * (((float) Math.random() * 2f) - 1);
point.y += (ship.getCollisionRadius() / 2f) * (((float) Math.random() * 2f) - 1);

//spawns the arc.
engine.spawnEmpArc(ship, point, ship, ship,
   DamageType.ENERGY,
   0f,
   0f, // emp
   100000f, // max range
   "hit_shield_beam_loop", //Just used a blank sound ID so it'll work with anything.
   12f, // thickness
   new Color(155,100,25,255),
   new Color(255,255,255,255)
   );
   
}

}

}
}
}


Heavily commented so those not very programming-inclined can easily understand.

The plugin is pretty simple: when a ship goes below an eighth of its HP, random EMP arcs will spawn around the ship, creating a cool-looking electrical damage effect.

If you wanted you could totally make it do damage, and even make a healing beam weapon to reverse the ship's continual damage. This new update has a ton of amazing possibilities.

Feel free to use or modify in any way you wish.



And while I'm at it, Alex (or anyone who knows), do onHitEffect scripts work for missiles too? Or is it only projectiles? Because I can't seem to get my EMP-arc spamming missiles to work, though the script works fine when I add it to a normal weapon.

23
Bug Reports & Support / Multiple Bugs, Most Modding-related
« on: January 02, 2013, 12:31:52 PM »
First, a crash. This one relates to drone systems and their parent ship retreating.

I encountered this error:
Spoiler
2613909 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.NullPointerException
java.lang.NullPointerException
   at com.fs.starfarer.combat.ai.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO$Oo.Õ00000(Unknown Source)
   at com.fs.starfarer.combat.ai.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Ó00000(Unknown Source)
   at com.fs.starfarer.combat.ai.system.drones.DroneAI.ÒÕ0000(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.combat.OOoO.ÕØÒ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)

[close]

This happened right after my ship, with drones deployed, retreated from the bottom of the map via a full retreat order. It was the last ship to retreat, so it was just about to go back to the campaign mode.

Perhaps this isn't a bug and is instead something I've done wrong, but nothing is coming to mind. Note: I only encountered this once. I tried several times, but cannot reproduce it.

Some additional info:

-The drones have shields
-The drones are unarmed





Bug 2: Recoil/barrel sprites and regenerating ammo.

While in the vanilla game, regenerating ammunition works fine (as there are no ammo-regenerating weapons with recoil graphics), with modded weapons, there's a bit of a problem: when a weapon runs out of ammo, its recoil sprite will get "stuck" in the furthest back position. When ammo regenerates, the sprite will remain back in that position, even after the weapon fires multiple times. Eventually, it'll get unstuck after a lot of firing. I don't have a screenshot for this, but it should be easy enough to reproduce.



Bug 3: Ship information on Pre-battle screen hangs off the bottom.

The image should make this one obvious:



The first white line represents the bottom of the little UI window, and the hullmod list can be seen going partially underneath that. Additionally, the scanlines from the ship display's background go out of bounds as well, as shown by the second white line.




Bug 4: Player fleet screen not reflecting updates to minimum crew requirements and maximum cargo capacity.

When a ship's maximum cargo or minimum crew requirements are modified through skills (or presumably anything else), the fleet screen does not update these things immediately.

For example, if I have a perk that gives a ship with 10 cargo capacity +100% cargo capacity, the yellow cargo bar (assuming it's the only ship in the fleet) will still only show 10 max cargo, not 20. It will only change to 20 when you mouse over a ship to the left. The same happens with minimum crew requirements.



Bug 5: Long music tracks do not loop in the campaign.

Pretty much self-explanatory. There's only one music track in my mod (a mashup of a few others), and it's like a half an hour long or something. Once the track finishes, it doesn't loop back to the start, and instead goes away entirely.




Hope these prove to be helpful :)

24
Discussions / Psiyon's LP
« on: December 26, 2012, 07:39:00 PM »
HA HA GOT YOU. It's not LP as in "Let's Play", it's LP as in "Long-playing record". That's an album! And what's on an album? Music! Or in this case, something that sort of resembles it.

If you're one of the 2.5 people who have listened to any of my stuff on my utub channel, you'll know I'm extremely self-critical about my music. This has not changed. What has changed is that I'm now fed up with hoarding a bunch of unreleased tracks that just lie rotting away on my hard drive. Some people said they liked my stuff. Fine. Here it is:




If you like electronic music or video game soundtracks, then you might like some of the songs on this.

utub previews (Most songs there that are on this LP are non-final, and not all songs on my channel are on this LP.): http://www.youtube.com/playlist?list=PL8AA86A9B816B68FE

Download: https://dl.dropbox.com/u/71512473/Ascendency%20loLP.zip

Feedback is nice, I guess. I suspect anyone who has any real experience with music has the ability to tear all my songs here apart. I encourage this.




From the readme file:


If for some inane reason you desire to use my music for something other than your listening displeasure, please contact me for permission. Odds are I'll say yes, so long as you don't want to use either Beyond Familiar Stars or In the Orbit of God. The rest are cool to do with as you please. Just let me know you're using it and don't claim it as your own. I do bad things to people who dishonor my simple requests.





FUN FACTS:

-All tracks were composed with FL Studio. All point-and-click. I don't have a MIDI keyboard. (Well, didn't. I got one for Christmas)
-Teaching yourself music theory is not fun.
-Mastering your music is not fun. You usually just make it worse in the end.
-People seem to give you a hard time for being self-critical about your work.
-The genre is called "Brain Damage" because having to listen to this over and over and over again in FL Studio probably knocked off about 8 IQ points.
-I named the music files in a way that resembles an illegal album download, so you can feel like you're getting something worth paying for.

-"Beyond Familiar Stars", "In the Orbit of God" and "Terran" were inspired by the Fury 3 series of PC games.
-"Gliese 411 B" and "Unknown" were inspired by Homeworld Cataclysm's soundtrack.
-"Marineris" and "Tharsis" were made for a terrible college game that we had to clobber together in about two and a half months. When my team went to present our game, there was an overlooked bug present that prevented the music from playing. My professor wouldn't let me hookup my laptop with the fixed version for the demonstration. What a loser.
-"Empyrean Caverns" was made for some ancient Starcraft 2 mod project that was eventually scrapped. It was kind of cool, though: it was a tactical-combat map that took place in caves throughout the dwarf planet Ceres. The caves looked pretty.
-"Callista", is of course, a remix of the track from Need for Speed, or more notably, Mass Effect 2's Club Afterlife. The original is far better.


25
Modding / Psiyon's Stupendous Weapon Tutorial
« on: December 09, 2012, 06:46:56 PM »
So after realizing some people have real trouble getting new weapons in game I made this.

http://www.youtube.com/watch?v=mA-Qpk8FNnM

Hopefully this helps. If not, then I just wasted about a half an hour of your life. Either way, I win.

26
Modding / Convoy Spawn Point Code -- Something Different in .54a?
« on: December 09, 2012, 12:53:46 PM »
So it seems that my code for spawning convoys is crashing in .54a, spitting out a null error.
I've looked over it several times in comparison to the default Hegemony spawnpoint code, and I can find no major difference nor reason why mine would cause a crash.

Here's the error from the .log:

Spoiler
Code
java.lang.NullPointerException
at com.fs.starfarer.campaign.fleet.CargoData.initMothballedShips(Unknown Source)
at com.fs.starfarer.campaign.fleet.CargoData.addMothballedShip(Unknown Source)
at data.scripts.world.corvus.okouthconvoySpawnPoint.addRandomShips$(okouthconvoySpawnPoint.java:91)
at data.scripts.world.corvus.okouthconvoySpawnPoint.spawnFleet(okouthconvoySpawnPoint.java:53)
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)
[close]


As you can see, the source of the error seems to be coming from the addRandomShips function, as that's the only place that contains "addMothballedShip".

Here's the spawnpoint code:
Spoiler
package data.scripts.world.corvus;

import java.util.List;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.Script;
import com.fs.starfarer.api.campaign.CampaignFleetAPI;
import com.fs.starfarer.api.campaign.CargoAPI;
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.fleet.FleetMemberType;

import data.scripts.world.BaseSpawnPoint;

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

   private final SectorEntityToken convoyDestination;

   public okouthconvoySpawnPoint(SectorAPI sector, LocationAPI location,
                     float daysInterval, int maxFleets, SectorEntityToken anchor,
                     SectorEntityToken convoyDestination) {
      super(sector, location, daysInterval, maxFleets, anchor);
      this.convoyDestination = convoyDestination;
   }

   private int convoyNumber = 1;
   
   @Override
   protected CampaignFleetAPI spawnFleet() {
      CampaignFleetAPI fleet = getSector().createFleet("okouth", "convoylrg");
      getLocation().spawnFleet(getAnchor(), 0, 0, fleet);
      
      CargoAPI cargo = fleet.getCargo();
      if (convoyNumber == 1) {
         cargo.addWeapons("lsupp", 5);
         cargo.addWeapons("zapper", 5);            
         cargo.addWeapons("mrg2", 2);      
         cargo.addWeapons("mmrg", 2);         
         cargo.addWeapons("mortar", 2);         
      } else {
         cargo.addWeapons("hsupp", 5);
         cargo.addWeapons("lsupp", 5);   
         cargo.addWeapons("zapper", 5);      
         cargo.addWeapons("mrg2", 5);   
         cargo.addWeapons("popper", 4);
         cargo.addWeapons("mmrg", 4);
         cargo.addWeapons("mortar", 2);         
      }
   
      addRandomShips(fleet.getCargo(), (int) (Math.random() * 6f));
      
      Script script = null;
      script = createArrivedScript();
      Global.getSectorAPI().addMessage("An Okouth supply convoy is en-route to their station.");
      
      fleet.addAssignment(FleetAssignment.DELIVER_RESOURCES, convoyDestination, 1000);
      fleet.addAssignment(FleetAssignment.GO_TO_LOCATION_AND_DESPAWN, convoyDestination, 1000, script);
      
      convoyNumber++;
      return fleet;
   }
   
   private Script createArrivedScript() {
      return new Script() {
         public void run() {
            Global.getSectorAPI().addMessage("The Okouth supply convoy has docked with their station.");
         }
      };
   }
   
   private void addRandomWeapons(CargoAPI cargo, int count) {
      List weaponIds = getSector().getAllWeaponIds();
      for (int i = 0; i < count; i++) {
         String weaponId = (String) weaponIds.get((int) (weaponIds.size() * Math.random()));
         int quantity = (int)(Math.random() * 4f + 2f);
         cargo.addWeapons(weaponId, quantity);
      }
   }
   
   private void addRandomShips(CargoAPI cargo, int count) {
      List weaponIds = getSector().getAllWeaponIds();
      for (int i = 0; i < count; i++) {
         if ((float) Math.random() > 0.4f) {
            String wing = (String) wings[(int) (wings.length * Math.random())];
            cargo.addMothballedShip(FleetMemberType.FIGHTER_WING, wing, null);
         } else {
            String ship = (String) ships[(int) (ships.length * Math.random())];
            cargo.addMothballedShip(FleetMemberType.SHIP, ship, null);
         }
      }
   }

   private static String [] ships = {
                           "rela_def",
                           "savil_def",                           
                           "rela_ass",                           
                           "saldara_def",                           
                           "gfreighter_def",
                           };

   private static String [] wings = {
                           "zetil_wing",
                           "gara_wing",                           
                           "ves_wing",
                           "vasir_wing",
                           };
                           
}
[close]



Any ideas as to what the problem might be? I'm at a total loss.

27
Bug Reports & Support / Can't Replace Skill_data.csv
« on: November 23, 2012, 09:17:06 PM »
Title pretty much says it all, I cannot use mod_info.json to replace skill_data.csv. I removed all of the default aptitudes in aptitude_data.csv and appropriately modified skill_data.csv to add my single new skill, however, when Starfarer runs, it still tries to read all the default skill files and crashes when the original aptitude IDs cannot be found.



Code
4346 [Thread-6] INFO  com.fs.starfarer.loading.LoadingUtils  - Loading JSON from [C:\Program Files (x86)\Fractal Softworks\Starfarer\starfarer-core\data\characters\skills\advanced_tactics.skill]

...

4794 [Thread-6] ERROR com.fs.starfarer.combat.String  - java.lang.RuntimeException: Spec of class [com.fs.starfarer.loading.E] with id [leadership] not found
java.lang.RuntimeException: Spec of class [com.fs.starfarer.loading.E] with id [leadership] not found
at com.fs.starfarer.loading.SpecStore.super(Unknown Source)
at com.fs.starfarer.loading.SkillSpec.Ó00000(Unknown Source)
at com.fs.starfarer.loading.SpecStore.super(Unknown Source)
at com.fs.starfarer.loading.SpecStore.Ò00000(Unknown Source)
at com.fs.starfarer.loading.null.o00000(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)



mod_info.json:

Code

{
"id":"inorbita", # internal id
"name":"Ascendency", # displayed to the player
"version":"Beta 2",
"description":"Beta 2. Campaign supported.",
"gameVersion":"0.54a",
  "totalConversion":"true",
 
  "replace":["data/config/sounds.json",
  "data/world/factions/player.faction",
  "data/campaign/sim_opponents.csv",
  "data/missions/mission_list.csv",
  "data/hullmods/hull_mods.csv",
  "data/world/factions/factions.csv",
  "data/config/title_screen_variants.csv",
  "data/hulls/ship_data.csv",
  "data/hulls/wing_data.csv",
   "data/characters/skills/aptitude_data.csv",
   "data/characters/skills/skill_data.csv",
 
  ],
}





skill_data.csv:
Code

id name order description icon
strat_fire_control Fire Control 0 Increases the resolution of the fleet-wide sensor network for better accuracy on all ships. graphics/icons/skills/missile_specialization.png


As you can see, advanced tactics shouldn't be getting loaded at all.

28
Modding / Product of a Boring Summer Vacation
« on: August 18, 2012, 08:44:48 PM »
Being stuck in a condo for hours at a time is pretty boring. Thankfully I had my laptop with Photoshop and Starfarer installed.

For the possible faction called the "Pegasus Legion", a really old faction from one of my ancient Starcraft 1 mods.
(Note the names were their originals from that Starcraft mod, conflicts with Starfarer are purely coincidental.)


Quail:


Mauler:


Condor:


Maverick:


Matador:


Outrider:



So, yeah. Hopefully I might find the time to turn these guys into a reality. Either way, at least they won't be lost forever if I post them up here.

29
Modding / setLocation Usage
« on: August 17, 2012, 03:50:57 PM »
A quick question: how does one use the setLocation(float x, float y) method in CampaingFleetAPI?

I'm trying to use it like this:

playerfleet.setLocation(-11500, 11500);

But I've got a feeling that's completely wrong because I get this error:

Quote
A method named "setLocation" is not declared in any enclosing class nor any supertype, nor through a static import

...and I have no idea what that means. I have CampaignFleetAPI imported at the top of the file, so that's not an issue. Here's the relevant code:


Code
		StarSystemAPI system = getSector().getStarSystem("God");
FactionAPI csix = getSector().getFaction("csix");
FactionAPI player = getSector().getFaction("player");
SectorEntityToken dockyard = system.getEntityByName("Dockyard");
SectorEntityToken wn = system.getEntityByName("Warp Node");

SectorEntityToken playerf = system.getEntityByName("Fleet");


CargoAPI cargoh = wn.getCargo();
CargoAPI cargoplayer = playerf.getCargo();



boolean jumptl = cargoplayer.removeItems(CargoAPI.CargoItemType.RESOURCES, "jumptl", 1);
boolean jumptr = cargoplayer.removeItems(CargoAPI.CargoItemType.RESOURCES, "jumptr", 1);
boolean jumpbr = cargoplayer.removeItems(CargoAPI.CargoItemType.RESOURCES, "jumpbr", 1);
boolean jumpbl = cargoplayer.removeItems(CargoAPI.CargoItemType.RESOURCES, "jumpbl", 1);



if (jumptl) {

playerf.setLocation(-11500, 11500); //line that the error report gives as problematic.

Global.getSectorAPI().addMessage("Mass hyperstream jump successful.", Color.green);

cargoh.addItems(CargoAPI.CargoItemType.RESOURCES, "jumptl", 1);

}

Any help would be greatly appreciated.

30
Modding / Free Ship Sprites
« on: August 16, 2012, 05:33:09 PM »
So, a while back when I started the ill-fated Community Mini-faction mod, I made all these ships:

Hurricane:


Valiant:


Flanker:


Tornado:


Firestorm:


Spectre:



(Do note that some of these look derpy in places. They were my first attempt at kitbashing/painting sprites from a top-down perspective)

I really have no use for these any more. Instead of letting them rot in an obscure folder on my hard drive, I figured someone who perhaps isn't all that exceptional in the art department might be able to make use of them, and turn them into a small-ish faction. The images are hosted on ImageShack, so the .png files are still in their original state. Just right click>save image as.

Pages: 1 [2] 3 4 5