Fractal Softworks Forum

Starsector => Mods => Topic started by: tomatopaste on July 12, 2021, 08:23:31 AM

Title: [0.95.1a-RC6] DroneLib v1.1.1
Post by: tomatopaste on July 12, 2021, 08:23:31 AM
(https://i.imgur.com/eglmLTR.png)

- discontinued -

Much of the code and concepts in this mod were moved to CMUtils for various reasons.
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: Yunru on July 12, 2021, 08:55:03 AM
Oooh subsystems!
So how do they work with ship systems?
Are they completely independent?
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: Klokinator on July 12, 2021, 09:01:34 AM
Please modders, make use of this, and hopefully a lot of use. This sounds too cool to ignore. I'd love to see hullmods that instate specific drone behavior, just as one example.
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: tomatopaste on July 12, 2021, 09:05:37 AM
Oooh subsystems!
So how do they work with ship systems?
Are they completely independent?
Yep, 100% independent. Transferable across all ships.
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: Sutopia on July 12, 2021, 10:20:01 AM
Are drones affected by any skills?
Can I use this library to make custom wing AI instead of drone AI?
Are subsystems affected by system expertise?
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: Morrokain on July 12, 2021, 01:16:17 PM
Well now, this looks very interesting!

Do you have an idea of how easy/difficult the framework will be to maintain in future Starsector updates? My one hesitation would be to rig a bunch of stuff to use the framework and then an update would render all of it inoperable for an indeterminable amount of time.

Still, this is very cool and I love how its even separate from ship systems so you could conceivably synergize the dual mechanics for a pretty unique ship.
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: DecoyGrenadeOut on July 12, 2021, 04:15:09 PM
This looks REALLY cool! I can't wait to see what other modders are going to do with it!

Speaking of GUI modifications, is there any way to modify the weapon GUI so that it notifies you when all weapons in a given weapon group is able to fire (an OK/READY right beside the weapon group in combat HUD)? Because I have quite some trouble timing cooldowns for weapon with high delays like AM Blaster.
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: tomatopaste on July 12, 2021, 07:41:06 PM
Are drones affected by any skills?
Can I use this library to make custom wing AI instead of drone AI?
Are subsystems affected by system expertise?

Player skills are not currently taken into account, I will add them once the initial proof of concept is rock steady.
Custom wing AI is currently outside the scope of this library, that would be a whole different can of worms to modularise and there would have to be sufficient motivation to do so, unless somebody else wanted to work on it.
Well now, this looks very interesting!

Do you have an idea of how easy/difficult the framework will be to maintain in future Starsector updates? My one hesitation would be to rig a bunch of stuff to use the framework and then an update would render all of it inoperable for an indeterminable amount of time.

Still, this is very cool and I love how its even separate from ship systems so you could conceivably synergize the dual mechanics for a pretty unique ship.

This framework could have existed in a number of previous updates since it is uses combat api functions that have been around for a while, so unless alex decides to revamp the entire combat engine and GUI I don't see future updates breaking it.
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: 6chad.noirlee9 on July 12, 2021, 09:48:46 PM
STOKED IS AN UNDERSTATEMENT: thanks for doing this
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: Morrokain on July 13, 2021, 04:42:39 PM
This framework could have existed in a number of previous updates since it is uses combat api functions that have been around for a while, so unless alex decides to revamp the entire combat engine and GUI I don't see future updates breaking it.

Ah nice good to know! Yeah never say never but I feel that its pretty unlikely that this would be reworked at this point.
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: Thaago on July 17, 2021, 06:31:18 PM
This looks awesome! I've always liked drones, and the ability to have multiple systems on a ship (applying to individual weapon groups even!!) is great.
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: Cirind on July 18, 2021, 03:36:27 PM
Just wanted to say that this is probably one of best things on this forum.
Title: Re: [0.95a] DroneLib - Evolved Combat Systems (Mod Utility Library)
Post by: tomatopaste on July 19, 2021, 10:30:01 AM
DroneLib v1.0.1
Download v1.0.1 (https://github.com/automatopaste/DroneLib/releases/download/v1.0.1/DroneLib_1.0.1.zip)
Fixed major problem with mod csv merging. A reminder that subsystem instances applied in combat via applySubsystemToShip(ShipAPI Ship, dl_Subsystem subsystem) will need to have .init(ShipAPI ship) and .aiInit() called externally.

v1.0.1
-fixed CSV merging between mods
-updated method documentation
Title: Re: [0.95a] DroneLib v1.0.1 - Evolved Combat Systems (Mod Utility Library)
Post by: tomatopaste on July 20, 2021, 11:08:33 AM
Quick showcase of some shenanigans implementing subsystems with RogueSynth hullmods, which I am working on updating to 0.95a.

(https://i.imgur.com/XEHC5RG.png)
(https://i.imgur.com/Opzs3jh.png)
(https://i.imgur.com/AyOptUq.gif)
(https://i.imgur.com/7wolZCy.gif)
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (Mod Utility Library)
Post by: tomatopaste on July 27, 2021, 05:05:49 AM
DroneLib v1.1.0
Download v1.1.0 (https://github.com/automatopaste/DroneLib/releases/download/v1.1.0/DroneLib_1.1.0.zip)
Important update with refinements and fixes.

v1.1.0
-added centralised subsystem hullmod queuing function to dl_SubsystemUtils
    -queueSubsystemFromHullmodForShip(ShipAPI ship, Class<? extends dl_BaseSubsystem> subsystemClass)
    -Queues a subsystem for a ShipAPI instance so it will be applied upon entering combat. Allows subsystems to be
     cleanly added via hullmod
-fixed subsystem ai scripts running while player control active
-fixed subsystem gui showing with no subsystems installed on player ship
-added useful getter and setter methods to dl_BaseSubsystem
    -methods such as setCooldown(float cooldown) apply changes only to the subsystem instance, it does not globally
     change the subsystem spec data
-added default hotkey manager, if the 'hotkey' field in the csv is left blank it will use a unique default
    -custom hotkeys can be defined for subsystem slots 1-6, 6th slot will be copied with more subsystems
-added static getSubsystemsOnShip(ShipAPI ship) method to dl_SubsystemCombatManager
-added overridable methods in dl_BaseSubsystem to prevent subsystem being used while venting and/or overloaded
-changed a couple of method names for clarity - unfortunately will cause crashes with any mods using old method names
    -queueSubsystemFromHullmodForShip -> queueSubsystemForShip
        -method does not require a hullmod
    -getSystemId -> getSubsystemId
        -clear up any confusion with regular shipsystems
    -may have missed one or two, but nothing has been removed so the successor name should be obvious
-updated/added javadoc comments to several methods
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (Mod Utility Library)
Post by: tomatopaste on July 27, 2021, 08:16:14 AM
Added a tutorial walkthrough for adding a subsystem imitating Maneuvering Jets to a ship via hullmod to the OP, in the tutorials section.
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (New Tutorial!)
Post by: megabot on July 27, 2021, 11:10:53 AM
so ummm, if i may ask, if i remember correctly you said something about bringing out a mod which uses drone lib. may i ask when it might come out/how far it is developed, if you already started developing it?
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (New Tutorial!)
Post by: tomatopaste on July 27, 2021, 09:04:52 PM
so ummm, if i may ask, if i remember correctly you said something about bringing out a mod which uses drone lib. may i ask when it might come out/how far it is developed, if you already started developing it?
I posted clips from a mod called RogueSynth that adds random variants to ships with fun and dumb effects, it used to be a discord-only mod for 0.9.1a but I'm working on a full release.

I also have my faction mod Pearson Exotronics which has been in dev hell for months, lots of feature creep, currently not release ready while I pick over the guts of the thing regarding dronelib integration. A lot of the scripts in DL come from pearson and I have to remove all the conflicts with externalising a lot of things into the library.

Finally there is Neutrino Corp which I fully intend to overhaul, plans and tests have been made for armour mechanics using subsystems, as well as upgraded drone shipsystems, but the mod needs a complete art overhaul which will take a long time to achieve.
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (New Tutorial!)
Post by: megabot on July 28, 2021, 01:38:46 AM
hmm, i see. so it will probably take a while, and new updates will only make it an even longer wait. if i may ask, when might RogueSynth come out if you are working towards a full release? and also i did not completely get what you meant, did you mean like there are new hullmods which do weird things? so is it like the "incredibly gullible hullmods" mod?
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (New Tutorial!)
Post by: 6chad.noirlee9 on August 28, 2021, 05:06:07 AM
so ummm, if i may ask, if i remember correctly you said something about bringing out a mod which uses drone lib. may i ask when it might come out/how far it is developed, if you already started developing it?
I posted clips from a mod called RogueSynth that adds random variants to ships with fun and dumb effects, it used to be a discord-only mod for 0.9.1a but I'm working on a full release.

I also have my faction mod Pearson Exotronics which has been in dev hell for months, lots of feature creep, currently not release ready while I pick over the guts of the thing regarding dronelib integration. A lot of the scripts in DL come from pearson and I have to remove all the conflicts with externalising a lot of things into the library.

Finally there is Neutrino Corp which I fully intend to overhaul, plans and tests have been made for armour mechanics using subsystems, as well as upgraded drone shipsystems, but the mod needs a complete art overhaul which will take a long time to achieve.

Just here to say I'm stoked for roguesynth cause it sounds like something I've wanted in the sector for.....yea I guess for years now lol
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (New Tutorial!)
Post by: megabot on September 21, 2021, 12:21:08 PM
mister tomatopaste? sorry for asking but, are you still working on rogue synth?
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (New Tutorial!)
Post by: Space_Lettuce_OG on October 06, 2021, 12:22:59 PM
I'm curious, are there any mods out there that make use of DroneLib or are planning/developing a mod to use it?
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (New Tutorial!)
Post by: dfd13 on November 25, 2021, 04:00:52 PM
Can anyone provide a mirror? The download link isn't working. I get SSL encryption errors.
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (New Tutorial!)
Post by: Wojmistrz on December 05, 2021, 06:41:11 AM
So I got error here for tomatopaste to look at (dunno if You are on unofficial starsector discord or not so I am writting here)

[Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ArrayIndexOutOfBoundsException: -1
java.lang.ArrayIndexOutOfBoundsException: -1
    at data.scripts.ai.example.mymod_EpicSubsystemDroneAI.advance(mymod_EpicSubsystemDroneAI.java:55)
    at com.fs.starfarer.combat.entities.Ship$ShipAIWrapper.advance(Unknown Source)
    at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
    at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
    at com.fs.starfarer.combat.CombatState.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.o00000(Unknown Source)
    at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:748)

so what do You think about that?
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (New Tutorial!)
Post by: NephilimNexus on December 20, 2021, 04:25:30 AM
I wonder if this can be used to alter whether a ship is a drone or crewed to begin with?  Like, make droned vs crewed versions of the same fighter, with the manned version having better stats to compensate for the crew losses they'd incur.
Title: Re: [0.95a] DroneLib v1.1.0 - Evolved Combat Systems (New Tutorial!)
Post by: Sir Arcana on December 24, 2021, 03:46:16 PM
Hello! I've found a crash with DroneLib on Starsector version 0.95.1a RC6. If there is a drone active in combat and you press Tab to open the strategic view, the game will crash with this error:
Code
368590 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
    at org.lwjgl.util.vector.Vector2f.set(Vector2f.java:89)
    at org.lwjgl.util.vector.Vector2f.<init>(Vector2f.java:65)
    at data.scripts.subsystems.dl_BaseDroneSubsystem.guiRender(dl_BaseDroneSubsystem.java:91)
    at data.scripts.plugins.dl_SubsystemCombatManager.advance(dl_SubsystemCombatManager.java:137)
    at com.fs.starfarer.title.Object.L$Oo.o00000(Unknown Source)
    at com.fs.starfarer.combat.A.new.o00000(Unknown Source)
    at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
    at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
    at com.fs.starfarer.combat.CombatState.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.o00000(Unknown Source)
    at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
I have replicated this crash on both a hullmod I am making and the example hammerhead included with DroneLib.
Title: Re: [0.95a] DroneLib v1.1.1
Post by: tomatopaste on December 25, 2021, 11:42:55 PM
Small maitenance update
-updated to 0.95.1a
-fixed crash opening tactical map with drone subsystem and gui active
-added activation sfx id field to dl_BaseSubsystem, plays sound id when activated
Title: Re: [0.95.1a-RC6] DroneLib v1.1.1
Post by: Wojmistrz on January 03, 2022, 08:29:09 AM
Right now I am getting this error when playing with mod that utilizes DroneLib but even that mod author couldn't understand why crash happens when destroying ship that uses drones coz on his end everything works fine.

317891 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.ai.dl_BaseSubsystemDroneAI.advance(dl_BaseSubsystemDroneAI.java:64)
   at data.shipsystems.scripts.ai.expsp_SubsystemDroneAI.advance(expsp_SubsystemDroneAI.java:44)
   at com.fs.starfarer.combat.entities.Ship$ShipAIWrapper.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatState.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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)
Title: Re: [0.95.1a-RC6] DroneLib v1.1.1
Post by: Ajaxial92 on January 04, 2022, 01:34:42 PM
I've also been getting some crashes. Most recently is this one.

3781619 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.shipsystems.scripts.ai.expsp_SubsystemDroneAI.advance(expsp_SubsystemDroneAI.java:71)
   at com.fs.starfarer.combat.entities.Ship$ShipAIWrapper.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatState.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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)


Title: Re: [0.95.1a-RC6] DroneLib v1.1.1
Post by: tomatopaste on January 04, 2022, 07:50:53 PM
I've also been getting some crashes. Most recently is this one.

3781619 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.shipsystems.scripts.ai.expsp_SubsystemDroneAI.advance(expsp_SubsystemDroneAI.java:71)
   at com.fs.starfarer.combat.entities.Ship$ShipAIWrapper.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatState.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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Thread.java:748)


-> https://fractalsoftworks.com/forum/index.php?topic=21113
Title: Re: [0.95.1a-RC6] DroneLib v1.1.1
Post by: lyravega on January 29, 2022, 03:16:47 AM
Hey tomatopaste! The example in the OP has a slight error:

Code
if (ship == null || ship.isAlive()) return;
This makes the AI basically never use the ability, because of a missing '!' :D

I had this idea the other day, making hullmods that replace systems, but this subsystem thing your library has is awesome, and this example is just on point! I'll start with a few vanilla stuff and see where it goes I guess ;D Thank you for the library.
Title: Re: [0.95.1a-RC6] DroneLib v1.1.1
Post by: Ryers on February 13, 2022, 07:46:52 PM
this realy needs more attention! i wish i was better at modding, id love to make this.
Title: Re: [0.95.1a-RC6] DroneLib v1.1.1
Post by: tomatopaste on February 14, 2022, 10:25:30 PM
Hey tomatopaste! The example in the OP has a slight error:

Code
if (ship == null || ship.isAlive()) return;
This makes the AI basically never use the ability, because of a missing '!' :D

I had this idea the other day, making hullmods that replace systems, but this subsystem thing your library has is awesome, and this example is just on point! I'll start with a few vanilla stuff and see where it goes I guess ;D Thank you for the library.

Thanks for pointing that out champ :).

Note that this mod is more or less on the shelf until I publish certain top-tier faction mods that are in the works indefinitely. I'll still do bugfix/version updates but only really pay attention if it is used by anyone in the meantime.
Title: Re: [0.95.1a-RC6] DroneLib v1.1.1
Post by: tomatopaste on August 26, 2022, 11:18:57 AM
Discontinued indefinitely. I retain copyright authorship of all code contained in the mod, excluding where external authorship is marked, and any mods from this date that contain some whole or part derivation must comply with the current license. http://creativecommons.org/licenses/by-nc-nd/4.0/
Title: Re: [0.95.1a-RC6] DroneLib v1.1.1
Post by: theDragn on August 26, 2022, 07:14:02 PM
Discontinued indefinitely. I retain copyright authorship of all code contained in the mod, excluding where external authorship is marked, and any mods from this date that contain some whole or part derivation must comply with the current license. http://creativecommons.org/licenses/by-nc-nd/4.0/

Is this license change gonna be an issue for the dronelib code I already have integrated into Apex if I want to make further changes?
Title: Re: [0.95.1a-RC6] DroneLib v1.1.1
Post by: tomatopaste on August 27, 2022, 07:32:30 AM
Discontinued indefinitely. I retain copyright authorship of all code contained in the mod, excluding where external authorship is marked, and any mods from this date that contain some whole or part derivation must comply with the current license. http://creativecommons.org/licenses/by-nc-nd/4.0/

Is this license change gonna be an issue for the dronelib code I already have integrated into Apex if I want to make further changes?

no, apex is fine since there wasn't a license when you copied it, just as long as you indicate that my source code now has the linked license applied to it
Title: Re: [0.95.1a-RC6] DroneLib v1.1.1
Post by: theDragn on August 27, 2022, 07:48:09 PM
no, apex is fine since there wasn't a license when you copied it, just as long as you indicate that my source code now has the linked license applied to it

sure thing, I'll add that in there for the next version. thanks.