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.

Messages - Zaphide

Pages: [1] 2 3 ... 54
1
Yeah no worries :) I wasn't quite sure which forum it went in as I was pretty sure no vanilla ships used it!

2
Hi!

Just been mucking around with skins a bit to see what can and cannot be done with them.

I was trying to see if I could add/remove fighter bays (among other things) via a skin but couldn't work it out trying obvious things and I couldn't find any doco anywhere about what actually is possible with a skin file. So, I peeked inside starfarer_obf.jar and looked up how the skins are loaded (ShipHullSpecLoader I believe, via 2 methods (as far as I can work out), one which loads the initial hull via hull spec, and then another which applies the skin on a clone of the base hullSpec).

But the interesting thing is that there is actually a check for "fighterBays" but I don't think it is working as intended:
(I believe var1 is the skinSpec, var4 is the cloned hullSpec)
Quote
if (var1.has("fighterBays")) {
    var4.setFleetPoints(var1.getInt("fighterBays"));
}

So, unless I have this wrong, "fighterBays" is actually a valid property of the skin JSON but if it is set it will actually set the fleet points to this value?

3
Suggestions / Re: API request thread (please read OP before posting!)
« on: November 09, 2019, 08:29:06 PM »
Hi Alex!

I would be interested in a way to set either a wing as builtin or as UI-locked.

<snip>

Simplest advice: You also need to tell the game that the ship has a built-in wing of that type.  You start as you have with "ship.getVariant().setWingId(...)", and immediately follow it with "ship.getHullSpec().getBuiltInWings().add(WING_ID)". It doesn't add a new wing, but instead does the equivalent of what you're asking for: it locks that wing you set in as a built-in.
<snip>

Thanks Axle! Didn't realise I could add it to the built-in's List directly (and also set the wing index). I used your example (tyvm) to do a bit of exploring.

This seems to be something that kind of works but is not exactly directly supported by the API:
- I can't seem to add a fighter bay to a ship if it has an existing built-in wing (the hullmod just doesn't get added at all, no error in log or anything)
   - EDIT: Actually I was wrong about this, seems to work fine :P
 - If I use getHullSpec().getBuiltInWings.add("my_wing_id"), any existing wings also become locked (can get around this by shuffling things around like your example)
- This basically means only using one of these add-built-in-wing type hull mods at any given time
   - EDIT: I think this should be OK if a seperate second hull-mod to manage the removal of the built-in wing is used for each hull-mod type that adds a built-in wing

Given this, I suspect built-in wings are handled a little differently than normal wings and so perhaps it is not so straight-forward an API request :P

EDIT: Actually, it seems fine to add and remove built-in wings if there are already built in wings. Not sure how I was getting that issue. So, only really need to work with the shuffling around of non-built-in wings, which is possible with another hull mod to track (as per your neat example) :)

@Alex, probably OK to not worry about this now :D

4
Blog Posts / Re: Skills and Story Points
« on: November 09, 2019, 03:22:10 PM »
Really liking the look of this Alex! (I haven't played much since 0.7-ish and the game has come so far. Loving all the additions!)

I've only read part way through all the pages but I wonder if it would be worthwhile to allow picking the second choice in a tier if all previous choices in tiers are picked(instead of the wrap around)? i.e. after choosing in a tier, your next pick can either be the other choice in that tier or the next tier.

It would mean the same number of points invested to 'double-up' and get those 2 tier 5 skills but if wanted the player could choose breadth instead of depth.

5
Suggestions / Re: API request thread (please read OP before posting!)
« on: November 09, 2019, 03:06:45 PM »
Hi Alex!

I would be interested in a way to set either a wing as builtin or as UI-locked.

Use case is a hull mod to add a dedicated launch bay for a particular wing.

Example usage (in hull mod):
Code
public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {
        stats.getNumFighterBays().modifyFlat(id, 1f);

        boolean isUILocked_Or_BuiltIn = true;

        int wingIndex = stats.getNumFighterBays().getModifiedInt() - 1;
        stats.getVariant().setWingId(this.wingIndex, wingId, isUILocked_Or_BuiltIn);
}

I couldn't work out a way to do it in the existing API but someone let me know if it is possible :)

Cheers,
Zaphide

6
Announcements / Re: Starsector 0.9a (Released) Patch Notes
« on: November 16, 2018, 10:05:17 PM »
Nice work Alex :D

Can't wait to get stuck into 0.9!

7
Suggestions / Re: API request thread (please read OP before posting!)
« on: March 15, 2016, 08:33:16 PM »
Could ShipAPI extend AssignmentTargetAPI? I might be doing something wrong but it seems like it would be convenient to use ships as assignment targets directly. Especially since the ShipAPI already has all the required method AFAICT (through the CombatEntityAPI interface).

http://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/combat/ShipAPI.html
http://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/combat/AssignmentTargetAPI.html

You can do this with a DeployedFleetMemberAPI object if you explicit cast it, but I can't remember if it works with ShipAPI or FleetMemberAPI:

Code
// Get combat fleet manager for the deployed ship's fleet side
CombatFleetManagerAPI combatFleetManagerAPI = Global.getCombatEngine().getFleetManager(shipAPI.getOwner());

// Create an escort assignment on the deployed ship
CombatFleetManagerAPI.AssignmentInfo assignmentInfo = combatFleetManagerAPI.getTaskManager(false).createAssignment(CombatAssignmentType.LIGHT_ESCORT, (AssignmentTargetAPI)this.getDeployedFleetMemberAPI(shipAPI), false);

// Give the escort assigned to another ship
combatFleetManagerAPI.getTaskManager(false).giveAssignment(this.getDeployedFleetMemberAPI(otherShipAPI), assignmentInfo, false);

Supporting code (I think a duplicate of this might exist in LazyLib):
Code
private DeployedFleetMemberAPI getDeployedFleetMemberAPI(ShipAPI shipAPI) {

        CombatFleetManagerAPI fm = Global.getCombatEngine().getFleetManager(shipAPI.getOriginalOwner());
        return fm.getDeployedFleetMember(shipAPI);
    }

8
Improve/expand the capabilities of the mission structure, and allow/support more mechanics within a mission/combat instance.

I'm imagining a mission structure that could say run a mini campaign via a sequence of branching combat instances, each changing depending on how you went in the previous mission. Think something like the Homeworld campaigns in 2D :) Or even something like FTL-in-StarSector.

While the campaign 'overworld' is great (and I think the far better tool for the sandbox-y type of game the StarSector campaign is) I think the ability to create epic mission sequences would expand the game AND add a ton of modding possibilities :)

To support the above, it would be great to add some extra functionality to the combat part of the game to support a more RTS-style gameplay, but even without that just the ability to have branching mission sequences with data transfer between missions would add tons to the game :D

I'd love to do that at some point; there's actually a todo item for it in the "if there's ever free time to do random things" category. Which, honestly, isn't very hopeful, but I very much hear you there.

Just something for one of your lazy Sundays... ;)

9
Improve/expand the capabilities of the mission structure, and allow/support more mechanics within a mission/combat instance.

I'm imagining a mission structure that could say run a mini campaign via a sequence of branching combat instances, each changing depending on how you went in the previous mission. Think something like the Homeworld campaigns in 2D :) Or even something like FTL-in-StarSector.

While the campaign 'overworld' is great (and I think the far better tool for the sandbox-y type of game the StarSector campaign is) I think the ability to create epic mission sequences would expand the game AND add a ton of modding possibilities :)

To support the above, it would be great to add some extra functionality to the combat part of the game to support a more RTS-style gameplay, but even without that just the ability to have branching mission sequences with data transfer between missions would add tons to the game :D

10
Suggestions / Re: Crew mechanic ideas
« on: March 02, 2016, 07:20:47 PM »
@Megas

Well, in Cyc's suggestion (and my echo) the assumption was that permanent damage (from salvaging/boarding) would be removable but for a large fee (most likely higher than the base cost of the ship itself).

The kind of decision making I would like to see:
 - A battle occurred and some ships are available for salvage/boarding

 - Do I want to take the time/supply cost to setup a salvage/board operation while enemies are potentially nearby?
   - Disclaimer: I think you should be able to attempt to board/salvage any ship that was disabled in the battle and would prefer a time/cost limit rather than RNG
   - A Hyperion was disabled? Heck YES
   - 3 Tarsus were all that was disabled? No thanks

 - Do I want to board/salvage a particular ship?
   - A Hyperion? Sure!
   - A Tarsus? Hmm well maybe I can sell the resulting D-class for $$$
   - A Gryphon? I don't have that many marines... but maybe worth a shot? Haven't been able to find one in local markets...

 - If so, do I want to pay the fees to bother getting it back to fully operational or am I happy for it just as-is?
   - A Hyperion? *eye watering full repair cost* Hmm well it is still good as-is, maybe leave the full repair until the next big bounty payout?
   - A Tarsus? Nah, just sell as is
   - A Gryphon? Well, I really want that extra missile mount on it, and -1 burn speed is terrible

11
Suggestions / Re: Crew mechanic ideas
« on: March 02, 2016, 02:45:48 PM »
A few more (not well thought out) ideas :)

There could a be a non-permanent degradation that occurs to ships if they are not repaired in docking facilities. So, if you fight battle after battle your ships slowly accrue non-permanent' degradation until you dry-dock them in repairing facilities. This could just be a lowering of max recoverable CR until you dry-dock.

I really like Cyc's suggestion. Permanent degradation would occur on salvaged ships. After battle, you can stick around and attempt to salvage ships that were disabled during the fight (each salvage attempt using in-game days). Any ship successfully salvaged gets a number of negative hull mods, disabled weapons mounts and/or severely lowered stats. Permanent degradation can be removed in dry-dock for a large fee. It's up to the player to decide whether they want to salvage that ship (and risk sticking around), whether they can then just use the ship as-is or whether they want to pay the fee to restore the ship to original stats.

As for crew, at the moment I don't really feel like my stack of crew in the cargo screen really represents the crew for the entire fleet. They seem more like a cargo of which I have to have a specific minimum of all the time. Some ideas:
 - Crew minimum could just become Crew
 - Crew maximum could become passenger space
 - Crew just becomes another stat on the hull rather than a cargo item
 - Buying new ships comes with a full Crew stat
 - The Crew stat is lowered in the same way that crew are currently killed in combat
   - If the Crew stat becomes low the ship gets a reduction to stats and/or max CR
   - If the Crew stat becomes too low it gets mothballed
 - The Crew stat can be replenished when docking at a market
 - Add a Crew Experience stat to ships (represents the level/efficiency/knowledge of an entire ships crew)
   - A higher Crew Experience level raises the max CR for a ship
   - Crew Experience is increased for various actions (combat, flying, salvaging etc.)
   - Crew Experience is decreased when signing on new crew (but perhaps you can pay more to recruit a more experienced crew member to keep the average higher?)
 - Crew can be transferred from ships in fleet but lower the Crew Experience stat

EDIT: Forgot to actually say what Crew Experience stat does... zzz...  :P

12
Modding / Re: Modding Guidelines
« on: February 11, 2016, 07:12:51 PM »
There is definitely some good stuff in here, but the section on burn speeds is a little out of date I think.

Also, it would be great to have a bit of consensus on the 'value' of flight decks. I have seen 4 - 6 small mounts equivalents per flight deck but I'm not sure really.

Quote
Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

I think this could do with a reply rather than starting a new topic... :)

13
Can anyone point me to a good tutorial on how to compile the .java files to .class files that Starsector will read?

Are you sure you actually need to (pre)compile them? StarSector will auto-compile any .java files (I think if they are under <yourModDirectory>/data/...) for you using Janino.

It is only necessary to pre-compile your .java files if you are using Java features that are not supported by Janino.

If you do need to compile your .java files, I suggest using kazi's guide here:
http://fractalsoftworks.com/forum/index.php?topic=10057.0

and setting your mod up like:
<yourModDirectory>/src (your .java source files go here)
e.g. <yourModDirectory>/src/data/scripts/yourModPlugin.java
<yourModDirectory>/jars (your compiled .jar [a collection of .class files] goes here)
e.g. <yourModDirectory>/jars/yourMod.jar

14
Suggestions / Re: Switching weapons between linked or alternating in battle
« on: February 04, 2016, 07:51:55 PM »
Well, this can be toggled via the modding API:
http://fractalsoftworks.com/starfarer.api/com/fs/starfarer/api/combat/WeaponGroupAPI.html

So chances are it will make it in at some point :)

15
Announcements / Re: Starsector 0.7.2a (In Development) Patch Notes
« on: February 02, 2016, 04:20:59 PM »
... Alex and David are actually having a competition to see who can be the biggest tease... :D

Pages: [1] 2 3 ... 54