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)

Author Topic: Issuing Fleet Commands  (Read 2806 times)

Tschudy

  • Lieutenant
  • **
  • Posts: 75
    • View Profile
Issuing Fleet Commands
« on: April 22, 2014, 06:59:34 AM »

The current AI command system only allows you a small number of commands per battle, after which the only thing you can apparently tell your ships to do is either split up and S&D or do a full retreat.  What im suggesting is the ability to queue up a bunch of different commands, then click a button to spend one command point and issue those orders to your fleet.

Lets say I take 19 frigates into battle against 2 cruisers and 3 destroyers.  With this change to the command structure, I would be able to sic 5 ships onto each cruiser and 3 onto each destroyer using only a single command point instead of 5.

to clarify, it would go like this

1: Select ships
2: Issue a command (Will not be carried out immediately)
3: Repeat 1 and 2 as desired.
4: Click "Issue Orders" button.
5: Commands are then carried out and the player is deducted 1 command point.
« Last Edit: April 22, 2014, 07:06:57 AM by Tschudy »
Logged

Megas

  • Admiral
  • *****
  • Posts: 12117
    • View Profile
Re: Issuing Fleet Commands
« Reply #1 on: April 22, 2014, 07:03:30 AM »

I would love a global Capture All.  I always burn two to four CP in every battle to capture objectives.
Logged

Metroidude

  • Ensign
  • *
  • Posts: 30
    • View Profile
    • Knights of Reason
Re: Issuing Fleet Commands
« Reply #2 on: April 22, 2014, 07:12:42 AM »

I thought it already did that, with the "Command Channel Open" thing?
I may be wrong.

But this idea sounds great.
Logged
“Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid.”


? Albert Einstein

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Issuing Fleet Commands
« Reply #3 on: April 22, 2014, 01:00:16 PM »

I would love a global Capture All.  I always burn two to four CP in every battle to capture objectives.

This seems limiting to me as well. Since capturing points tends to make a pretty big difference in larger battles, using up so many command points hurts. This is especially true when the A.I is far better at holding their points and recapturing them than your A.I ships  :P
Logged

Midnight Kitsune

  • Admiral
  • *****
  • Posts: 2846
  • Your Friendly Forum Friend
    • View Profile
Re: Issuing Fleet Commands
« Reply #4 on: April 22, 2014, 08:52:28 PM »

I thought it already did that, with the "Command Channel Open" thing?
I may be wrong.

But this idea sounds great.
To me it seems like that feature is broken actually... I always end up using more than one CP even if I issue mutiple orders at once while the game is paused.
Logged
Help out MesoTroniK, a modder in need

2021 is 2020 won
2022 is 2020 too

Sundog

  • Admiral
  • *****
  • Posts: 1723
    • View Profile
Re: Issuing Fleet Commands
« Reply #5 on: April 22, 2014, 11:20:16 PM »

Having the command channel open doesn't allow you to create new assignments/waypoints for free, it only lets you change which ships have which assignments. Come to think of it though, I don't know if the game ever actually tells you that.

See page 45 of the manual for details on giving commands.
For Alex's take on this, read his blog post on the subject.

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Issuing Fleet Commands
« Reply #6 on: April 22, 2014, 11:43:43 PM »

Quote
Having the command channel open doesn't allow you to create new assignments/waypoints for free, it only lets you change which ships have which assignments. Come to think of it though, I don't know if the game ever actually tells you that.
It's kind of useless, though; it'd be cooler if every time it refreshed, you could cancel an assignment and get your CP back

I've lost count of the number of times when I've run out of CPs partially because of an assignment that I didn't even want to give in the first place, or which became moot shortly after issuing the command; fpr example, issuing a Strike command on a ship that's going to blow up in 10 seconds because its AI did something silly or a bunch of torpedoes got through is always a bit annoying.

The current CP system is probably one of my least-favorite things in the game, tbh, as it just puts a tight leash on using tactics unless you're going to put a lot of points into Logistics.  It encourages hoarding of CPs, instead of spending them, which is irksome.

I really think it'd be more fun if, instead of limited CPs, there was a timer loop and putting more points into Command would shorten that timer, so that people who want to play the game like Starcraft can do it if they put lots of points into the Command tree, but even with zero points, people would be able to change fleet priorities over time.  Then we wouldn't be able to set up Capture for every point immediately, but we'd be able to use things like Strike, which is pretty un-attractive when facing large fleets simply because of the CP wastage; it often makes more sense to simply designate a point where you want Strike stuff to concentrate, so that they won't just lay waste to one ship but will continue to scour that area.

Given how it works, I've resorted to deliberately "mining" for CPs sometimes by letting the AI capture points and then re-taking them just to get more CPs during really long battles; I am thinking seriously of writing the timer system as described above into Vacuum just to get rid of that issue, as it's possible to do :)
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Sundog

  • Admiral
  • *****
  • Posts: 1723
    • View Profile
Re: Issuing Fleet Commands
« Reply #7 on: April 23, 2014, 12:36:00 AM »

Yep. I only meant to point something out. In fact, my opinion on CP is pretty close to yours. It's always bothered me that they're a finite resource. I've even created a hullmod (albeit an unrefined one) that regenerates CP much like your timer system. I'm planning to incorporate it into my faction mod before the next release.

Spoiler
Warning: this code is barely tested.
Code: java
package data.hullmods;

import com.fs.starfarer.api.Global;
import com.fs.starfarer.api.combat.BattleObjectiveAPI;
import com.fs.starfarer.api.combat.CombatFleetManagerAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import data.scripts.plugins.SunUtils;
import java.util.HashMap;
import java.util.Iterator;

public class TacticalAnsible extends BaseHullMod {
    static final float CP_REGEN_PER_SECOND = 0.05f;
    static final String EFFECT_ID = "sun_ice_tactical_ansible_mod";

    static final HashMap OBJECTIVE_CP_BONUS = new HashMap();
    static {
        OBJECTIVE_CP_BONUS.put("nav_buoy", 1);
        OBJECTIVE_CP_BONUS.put("sensor_array", 1);
        OBJECTIVE_CP_BONUS.put("comm_relay", 3);
    }

    float bonus = 0;
    float tick = 0;
    float initialCP;

    int countObjectiveCpBonus(int fleetSide) {
        int count = 0;

        for(Iterator iter = Global.getCombatEngine().getObjectives().iterator(); iter.hasNext();) {
            BattleObjectiveAPI obj = (BattleObjectiveAPI)iter.next();

            if(obj.getOwner() != fleetSide || !OBJECTIVE_CP_BONUS.containsKey(obj.getType()))
                continue;

            count += (Integer)OBJECTIVE_CP_BONUS.get(obj.getType());
        }

        return count;
    }
    int countCommRelays(int fleetSide) {
        int count = 0;

        for(Iterator iter = Global.getCombatEngine().getObjectives().iterator(); iter.hasNext();) {
            BattleObjectiveAPI obj = (BattleObjectiveAPI)iter.next();

            if(obj.getOwner() != fleetSide || !obj.getType().equals("comm_relay"))
                continue;

            ++count;
        }

        return count;
    }

    @Override
    public void applyEffectsAfterShipCreation(ShipAPI ship, String id) {
        super.applyEffectsAfterShipCreation(ship, id);
        tick = 0;
        bonus = 0;
        initialCP = Global.getCombatEngine().getFleetManager(ship.getOwner())
                .getCommandPointsStat().getModifiedValue();
    }

    @Override
    public void advanceInCombat(ShipAPI ship, float amount) {
        float cpLimit = initialCP + countObjectiveCpBonus(ship.getOwner());
       
        tick += amount * (0.5f + countCommRelays(ship.getOwner()))
                * CP_REGEN_PER_SECOND;
       
        if(tick > 1) {
            tick -= 1;

            CombatFleetManagerAPI fleet = Global.getCombatEngine().getFleetManager(ship.getOwner());
            float cp = fleet.getCommandPointsStat().getModifiedValue();

            SunUtils.print(""+cpLimit);
            if(cp < cpLimit) {
                fleet.getCommandPointsStat().modifyFlat(EFFECT_ID, ++bonus);
            }
        }
    }
}
[close]