Fractal Softworks Forum

Starsector => Mods => Modding Resources => Topic started by: Debido on October 05, 2014, 04:13:44 AM

Title: [0.7.2a] TwigLib TWIG™ 0.6.11 [Superseded in 0.8]
Post by: Debido on October 05, 2014, 04:13:44 AM
TWIG™ Library

Update for 0.8 release
TwibLib has now be superseded by built in game functionality, please use the built in game 'space station slot' functionality. The previous build is still available for those still using the patch (why? seriously? get the latest version!!!)

Update for 0.7.2a release

Download 0.6.11 (https://bitbucket.org/debido/starsector-multiship/downloads/TwigLib%200.6.11.7z)

Modified the default behavior of isMultiShip to not return true if it is a detached node if it is dead.


Update Log:
Spoiler

0.6.8-0.6.10
  • Added/implemented remaining methods for 0.7.2a
  • Now suppresses spawning of parts notifications
  • Allied ship parts are now spawned as allied rather than player parts.
0.7.1 update
The current RC5 patch solved some issues, but there is still an outstanding issue with spawning allied ship parts.
0.6.7a Change Log:
* Fixed up issue with RootNode not actually returning itself as the root when queried via MultiShipAPI
* Fixed up issue with filterConnections not properly adding the root node to the list of parts to be removed from the list
* Added isRoot and isChild from MultiShipManager to the TwigUtils
0.6.6b Change Log:
Changed storage method of Twig Data in the combat engine so that the combat engine may be closed after combat.
0.6.5 Change Log:
Major changes:
Completely restructured package names
Made more classes public for extensibility
There is now a TWIGEntity class used for loading all twig ships
There is now a CampaignTWIGEntity class useful for campaign integration, especially with it's own MemoryAPI object
Twigs are now loaded without Java code at all. You now use a CSV file to point to the twig file(s) containing your twig ship(s).
**Twig loading is now done with TwigNodeLibrary class with new JSON schema by Silent Stormpt** this will break old twig library users.
Added relative position type, there are now two types of positioning available. Relative and Vector. Relative uses a weapon, Vector uses a Vector2f and facing angle.
Added two AI's: Slave AI and No AI.
* Slave AI is slaved to the root ship, and will target whatever the root ship is targeting if non-PD . It has the movement code removed
* No AI is literally has no AI whatsoever
Implemented ShipEngineControllerAPI on the root node so that someone may gather the total engine power
Added TwigUtils helper class for retrieving useful information
Modified frames after death to accomodate scenarios where people are running at more than 60fps
[close]
This mod allows people to build utterly...utterly enormous ships and get around the bounds issues that exist. Also hoping for the addition of a CollisionAPI by Alex eventually to help with a few certain scenarios better.

(http://s5.postimg.org/x26p7l08n/TWIG_TM.png)

previous version:
0.6.7 for 0.65.2a-RC2 (https://bitbucket.org/debido/starsector-multiship/downloads/TwigLib%200.6.7a.zip)
Title: Re: TWIG™ Tech (WIP)
Post by: Debido on October 05, 2014, 04:33:57 AM
Space stations Demo (http://fractalsoftworks.com/forum/index.php?topic=8621.0)
Title: Re: TWIG™ Tech (WIP)
Post by: Tartiflette on October 05, 2014, 06:03:25 AM
SOON TM
(http://i.imgur.com/8HLMRYj.png)(http://i.imgur.com/m7riuu3.png)

I'm sooo using this to make ships with destructible armor rather than giant ships....
Title: Re: TWIG™ Tech (WIP)
Post by: Callabaddie on October 06, 2014, 01:19:40 AM
Bloody brilliant!
Title: Re: TWIG™ Tech (WIP)
Post by: Ryxsen1421 on October 06, 2014, 01:27:23 AM
Scy gets the first space armor to be spaced in space. D:
Title: Re: TWIG™ Tech (WIP)
Post by: Bjørn_in_the_Sector on October 06, 2014, 02:20:47 PM
spaaaaaaaaaaaaaaace! [personality coring intensifies]
Title: Re: TWIG™ Tech (WIP)
Post by: Debido on November 01, 2014, 03:10:44 PM
Version 0.2 Demo
Changes:
Completely re-wrote it
Now uses a JSON file for extra metadata used for ship instancing and behavior.

This is getting much closer to becoming a utility mod, this provided download is to just demonstrate the concept and how various components work.

It is now set up such that the Sprite displayed in the refit and campaign fleet should look the same instead of just the part.

As before there are two damage models.

The first model is the typical model that is already in Star sector, there is unified flux and hit points which is shared amongst all of the ship segments so when one ship segment is damaged in the next frame the damage is redistributed amongst all the other ship parts.

The other damage model is the subcomponent model, in this case damage is isolated to that particular component, when that subcomponent is disabled it's position is no longer relative to the host ship and is free to float around..

With the current system I have a host ship with use both unified segments or subcomponent segments at the same time this means that you can have components that can be shot off as well the central hub which has a unified damage model.

I am using the weapon slot ID as well is the weapon in the weapon slot as meta data for instancing the ship segments and a JSON file for their behavior. So to instance a station part called that has a variant called engineering_standard, you make a weapon with the same name and inserted in the hidden weapons slot that has a prefix of MULTI which is then used to identify which damage model that it uses. The position of the weapon slot is then used as the centre position for the ship segment relative to the host ship each frame.

New Demo version:

Download (http://goo.gl/MUNszF)

I haven't redone the multi-ship-Collision (collisions amongst multi-ships) for the newest code tree yet as I'm still working on the core code, but the core code is very nearly complete.

There are still design restrictions to having a multiship that I simply cannot work around at the moment:
+Vanilla Autofire AI will not fire 'inside' or over the top of another subship as it will see there are other parts in the way. You would need to use a custom AutoFire AI to get around this, this cannot be changed on the fly, but I have put in the request.
+ To be able to have weapons 'fire over the top' the projectile needs to be of a NO_FF collision class, I may leave it to the mod authors to implement a projectile swapping at certain distances back to FF or under certain conditions for their weapons depending on how they want their projectiles to behave.
+ Using beam weapons cannot be used where they need to 'fire over the top' as there is no 'NO_FF' collision class
+ I haven't tested RAY or RAY_FIGHTER collision class yet, but you may need to limit or prevent people using these weapons
+ If using weapons on the host ship that are 'inside' the bounds of another UNI/SUB ship, you may wish to restrict it to built-in because of
A) Vanilla behavior Autofire
B) Vanilla projectiles collision class

The point being you cannot currently rely upon Vanilla projectiles or Autofire. I have tried grabbing and replacing projectiles each frame, but it seems that projectiles can be spawned by a weapon and collide with an FF class in the same frame...so trying to change it after the fact is pointless right now.

+ Although in a preliminary sense I have observed enemy AI multiships retreating properly, the same cannot be said for a player multiship. I still need to set it so that a player multiship that is retreating is properly picked up.
+ Still need to do
++ Buff sharing
++ Applying speed based upon all engines across the entire ship that are still active
++ Have not tested multiple levels of multi-ships. That is you have a root ship spawns a host ship that further spawns more parts. One level should be enough for now...
++ UNI segment Ships will sometimes vent flux even when you are not.

+ Another rather unavoidable bug with UNI ships where health/flux is shared is that health is rebalanced only *after* damage is already done. So for a uniship ensure that health is significant enough so that any given alpha strike will not completely blow up your ship. Once any single UNI ship segment is destroyed, the rest are destroyed with it.

+ Another unavoidable situation is your multiship potentially being completely vaporised on destruction. Imagine what is effectively a ripple effect, one ship explodes, killing the one next to it which vaporises the one that damaged it...which disables another...which explodes...vaporising another etc. I cannot really change the damage of ship death explosions.

There are probably a few other things...but yeah...nearly there.
Title: Re: TWIG™ Tech (WIP)
Post by: Tartiflette on November 04, 2014, 04:53:32 AM
SOON-er tm

Spoiler
(http://i.imgur.com/GulwAsD.png)
[close]
Though it's a bit tedious and prone to errors, it's bloody simple to implement TWIG!
Beware of the overlapping weapons and subpart when designing a TWIG ship, there might be a solution later, but for now the weapons are under the child parts.
Title: Re: TwigLib TWIG™ Tech
Post by: Debido on November 06, 2014, 04:39:10 AM
Now calling this TwigLib, just because :D

Here is a download for a the 'library'. This release is not for general consumption or building of ships/stations quite yet as certain features or behaviours may change between now and the 1.0 release, however some ships and stations are being actively created and tested by myself and Tartiflette to flesh out the features as well as working with the various behaviours/bugs of vanilla.

Download Version 0.41 (http://goo.gl/5Hf7oA)

There have been quite a few changes to the code since the last release, it's almost been re-written again in the background while keeping the core features the same. The purpose for this is of course to make it more flexible and work within the contraints of SS.
Title: Re: TwigLib TWIG™ Tech
Post by: Debido on November 10, 2014, 08:59:26 PM


Download Version 0.5.0 (http://goo.gl/DZPF7Y)

0.5.0 Change Log:
Resolved issues with UNICHILD type ship
**Implemented new UNICHILD node/Root health/flux distribution system to avoid alpha strike damage killing a unified entity**
Removed all projectiles etc.
Fixed up incorrect castings
Put in checks to ensure people do not try to spawn ROOT or CHILDHOST, NORMAL etc.
New UniNode class that implements UniShipAPI
New UniShipAPI, RootNode now also implements UniShipAPI
Removed unibase mission and all assets
Re ordered more of the fields and members of classes.
Changed method name from subNode and subHost to childNode and childHost and reshuffled order of methods.
Title: Re: TwigLib TWIG™ Tech
Post by: Debido on November 12, 2014, 06:19:40 AM
Download Version 0.5.1 (http://goo.gl/0VGXNN)
0.5.1 Change Log:
Added TwigUtils helper class.
Made a few minor structural changes to make searching for TWIG components easier
Modified the setNodeList in line with structural changes.
Title: Re: TwigLib TWIG™ Tech
Post by: Tartiflette on November 13, 2014, 10:26:31 AM
Now that Scy feature 4 TWIG powered ships, I figured I could make a small guide to show how simple is it to create a Multi-Ship. If you are to look for reference in the mod, don't use the Nemean Lion as a template: it uses it's own custom version of TwigLib. The cruisers on the other hand are a simple application of this library.
Spoiler
(http://i.imgur.com/MyJEFgi.jpg)
[close]
Title: Re: TwigLib TWIG™ Tech
Post by: Debido on November 27, 2014, 01:54:50 PM

Download Version 0.6.5 (https://bitbucket.org/debido/starsector-multiship/downloads/TwigLib%200.6.5p.zip)
0.6.5 Change Log:
Major changes:
Completely restructured package names
Made more classes public for extensibility
There is now a TWIGEntity class used for loading all twig ships
There is now a CampaignTWIGEntity class useful for campaign integration, especially with it's own MemoryAPI object
Twigs are now loaded without Java code at all. You now use a CSV file to point to the twig file(s) containing your twig ship(s).
**Twig loading is now done with TwigNodeLibrary class with new JSON schema by Silent Stormpt** this will break old twig library users.
Added relative position type, there are now two types of positioning available. Relative and Vector. Relative uses a weapon, Vector uses a Vector2f and facing angle.
Added two AI's: Slave AI and No AI.
* Slave AI is slaved to the root ship, and will target whatever the root ship is targeting if non-PD . It has the movement code removed
* No AI is literally has no AI whatsoever
Implemented ShipEngineControllerAPI on the root node so that someone may gather the total engine power
Added TwigUtils helper class for retrieving useful information
Modified frames after death to accomodate scenarios where people are running at more than 60fps
Title: Re: TwigLib TWIG™ Tech
Post by: ucws on December 05, 2014, 09:28:12 AM
Very useful mod!
Finally I can destroy my ship parts.
(http://s7.postimg.org/a741kkzef/ship.jpg) (http://postimg.org/image/a741kkzef/)
Title: Re: TwigLib TWIG™ Tech
Post by: ucws on December 11, 2014, 09:59:29 AM
Here is a problem:
I create a small ship which can use external armor and turret?
In the mutiship_entities.json, I wrote three rootNodes. They have same shipID and three different varID.
I made this used for change external things in the refit window.
But what ever I use any one of three variants, the scripts only select the last rootNodes set in combat...
And I don't know how to set will make it achieved.



[attachment deleted by admin]
Title: Re: TwigLib TWIG™ Tech
Post by: Debido on December 11, 2014, 08:43:21 PM
Hi ucws, they should all have different ShipID.
Title: Re: TwigLib TWIG™ Tech
Post by: Jay2Jay on February 09, 2015, 08:35:40 AM
Can we manually aim the turrets? I wanna manually aim some turrets.
Title: Re: TwigLib TWIG™ Tech
Post by: Tartiflette on February 09, 2015, 08:43:24 AM
You can aim hidden built-in weapons if you add them to the main hull and choose to disable them in the twig settings once the sub-ship get destroyed. Check the Armored Lamia, Armored Sthenos, or Keto in my Scy mod.

You might kinda be able to do that in a hackish way for visible turrets: you need to hide their sprite via a every-frame weapon script once the sub-ship dies, and make sure they won't appear again once the main hull is destroyed.
Title: Re: TwigLib TWIG™ Tech
Post by: Debido on February 09, 2015, 03:53:13 PM
Can we manually aim the turrets? I wanna manually aim some turrets.

Like Tartiflette said, yes it is possible. There is some scripting that occurs in the background to remove designated weapons on uni ships when an associated part is destroyed.
Title: Re: TwigLib TWIG™ Tech
Post by: Debido on February 17, 2015, 03:41:47 AM
If anyone has any requests for various methods of information to be exposed by TwigUtils, can those interested post them in the next few days while I go over the code and fix up a few other things?

Current helpers:
List<MultiShipAPI> getChildNodes(ShipAPI ship)
List<ShipAPI> getChildNodesAsShips(ShipAPI ship)
int getNumberOfChildNodes(ShipAPI ship)
ShipAPI getRoot(ShipAPI ship)
boolean isMultiShip(ShipAPI ship)
DeathType stringToDeathType(String deathType)
ShipType stringToShipType(String shipType)
Title: Re: TwigLib TWIG™ Tech
Post by: Debido on February 17, 2015, 03:55:18 AM
Also these are the ones in MultiShipManager:

Also these are the ones in MultiShipManager:

static boolean checkIsNode(ShipAPI ship) 
protected static java.util.HashMap<ShipAPI,MultiShipAPI> getGlobalMultiShipAPIRegister() 
protected static java.util.HashMap<RootShipAPI,java.util.List<MultiShipAPI>> getGlobalMultiShipAPIs() 
static MultiShipAPI getNodeFromShip(ShipAPI ship) 
static java.util.List<MultiShipAPI> getNodesFromRoot(RootShipAPI rootShip) 
static com.fs.starfarer.api.util.IntervalUtil getVentTracker() 
static void registerNode(ShipAPI ship, MultiShipAPI multiShip) 
static void registerRoot(RootShipAPI rootShip, java.util.List<MultiShipAPI> childShips) 

Title: Re: TwigLib TWIG™ Tech
Post by: Debido on February 17, 2015, 04:31:45 AM
Adding a couple of new methods to MultiShipManager

public static boolean isRoot(ShipAPI ship)

public static boolean isChild(ShipAPI ship)

public static List<ShipAPI> getAllNodes()

public static List<ShipAPI> getAllRoots()

Added a new method to the TwigUtils


public static void filterConnections(ShipAPI ship, Collection<ShipAPI> col)

     * It removes the twig ship specified by
     * ShipAPI from the Collection if the ShipAPI is any part of the twig ship
     * it will remove the entire twig ship, including root
     *
Title: Re: TwigLib TWIG™ Tech
Post by: Beobachter on February 18, 2015, 12:27:41 PM
Got an error, not sure what is the root cause.
Occurred when looking at the armored SCY ships in the codex.
Using 0.65.2a, 64-bit java, xms/x 1024

Error message spoilered
Spoiler
Quote
178916 [Thread-5] ERROR com.fs.starfarer.combat.D  - java.lang.NoClassDefFoundError: db/twiglib/core/RootShipAPI
java.lang.NoClassDefFoundError: db/twiglib/core/RootShipAPI
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Unknown Source)
   at com.fs.starfarer.loading.scripts.ScriptStore.Object(Unknown Source)
   at com.fs.starfarer.loading.specs.private.getEveryFrameEffect(Unknown Source)
   at com.fs.starfarer.combat.entities.ship.oOOO.void.<init>(Unknown Source)
   at com.fs.starfarer.loading.specs.intsuper.o00000(Unknown Source)
   at com.fs.starfarer.loading.specs.intsuper.o00000(Unknown Source)
   at com.fs.starfarer.campaign.ui.trade.OoOO.ÓÕÔ000(Unknown Source)
   at com.fs.starfarer.campaign.ui.trade.OoOO.<init>(Unknown Source)
   at com.fs.starfarer.campaign.ui.trade.OoOO.<init>(Unknown Source)
   at com.fs.starfarer.codex.ui.C.<init>(Unknown Source)
   at com.fs.starfarer.codex.ui.class.super(Unknown Source)
   at com.fs.starfarer.codex.ui.class.super(Unknown Source)
   at com.fs.starfarer.codex.ui.class.Ò00000(Unknown Source)
   at com.fs.starfarer.codex.ui.A.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.thisnew.super(Unknown Source)
   at com.fs.starfarer.ui.H.processInput(Unknown Source)
   at com.fs.starfarer.ui.thisnew.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.d$Oo.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.d.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.I.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.do.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.title.OoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.super(Unknown Source)
   at com.fs.starfarer.new.Òôo000(Unknown Source)
   at com.fs.oOOO.oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.D.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: db.twiglib.core.RootShipAPI
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 49 more
[close]
Title: Re: TwigLib TWIG™ Tech
Post by: Tartiflette on February 18, 2015, 03:57:58 PM
Wow really? It's... not supposed to happen because I believe Twig isn't used in the codex, only deco weapons are displayed... I'll see about that with Debido.
Title: Re: TwigLib TWIG™ Tech
Post by: Debido on February 18, 2015, 06:19:00 PM
Got an error, not sure what is the root cause.
Occurred when looking at the armored SCY ships in the codex.
Using 0.65.2a, 64-bit java, xms/x 1024

Error message spoilered
Spoiler
Quote
178916 [Thread-5] ERROR com.fs.starfarer.combat.D  - java.lang.NoClassDefFoundError: db/twiglib/core/RootShipAPI
java.lang.NoClassDefFoundError: db/twiglib/core/RootShipAPI
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Unknown Source)
   at com.fs.starfarer.loading.scripts.ScriptStore.Object(Unknown Source)
   at com.fs.starfarer.loading.specs.private.getEveryFrameEffect(Unknown Source)
   at com.fs.starfarer.combat.entities.ship.oOOO.void.<init>(Unknown Source)
   at com.fs.starfarer.loading.specs.intsuper.o00000(Unknown Source)
   at com.fs.starfarer.loading.specs.intsuper.o00000(Unknown Source)
   at com.fs.starfarer.campaign.ui.trade.OoOO.ÓÕÔ000(Unknown Source)
   at com.fs.starfarer.campaign.ui.trade.OoOO.<init>(Unknown Source)
   at com.fs.starfarer.campaign.ui.trade.OoOO.<init>(Unknown Source)
   at com.fs.starfarer.codex.ui.C.<init>(Unknown Source)
   at com.fs.starfarer.codex.ui.class.super(Unknown Source)
   at com.fs.starfarer.codex.ui.class.super(Unknown Source)
   at com.fs.starfarer.codex.ui.class.Ò00000(Unknown Source)
   at com.fs.starfarer.codex.ui.A.actionPerformed(Unknown Source)
   at com.fs.starfarer.ui.thisnew.super(Unknown Source)
   at com.fs.starfarer.ui.H.processInput(Unknown Source)
   at com.fs.starfarer.ui.thisnew.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.d$Oo.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.d.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.O0OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.I.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.do.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.ui.O0o0.dispatchEventsToChildren(Unknown Source)
   at com.fs.starfarer.ui.O0o0.processInputImpl(Unknown Source)
   at com.fs.starfarer.ui.o00O.processInput(Unknown Source)
   at com.fs.starfarer.title.OoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.super(Unknown Source)
   at com.fs.starfarer.new.Òôo000(Unknown Source)
   at com.fs.oOOO.oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.Ò00000(Unknown Source)
   at com.fs.starfarer.combat.D.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: db.twiglib.core.RootShipAPI
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 49 more
[close]

Can you please tell me the steps you used to create this bug? I have tried looking at SCY/Twig ships in the Codex and have not been able to re-create it.

If you start seeing something like Class Not Found Exception I think it can either be
A) You don't have TwigLib installed/activated
B) Some weird bug related to permissions?

But yeah, if you can tell me the version of Twig you're using, and the steps to re-create the bug. I'll be able to narrow it down. Hm, the only other thing I can think of is that it wasn't necessarily the Codex itself, but possibly a Twig ship being loaded in the background (you know how they're fighting and stuff behind the menu?)
Title: Re: TwigLib TWIG™ Tech
Post by: Beobachter on February 18, 2015, 07:16:58 PM
Starsector Version: 0.65.2a-RC2
Mods: Blackrock 0.7.1, Imperium 1.7, Lazylib 2.0b, Randsector 0.2.2a, SCY 0.8.9, Simulator Overhaul 1.0c, Knights Templar 0.9.4, TwigLib 0.5.1p, Shaderlib 1.04
Shaderlib is currently active but off. All mods listed are active.

From the main screen I go directly to codex. I go to to either ship hulls or ship variants. Any ship from that is 'armored' causes a crash to desktop. However, it seems that an armored ship can show up in the background without too much problem.

I'll try reinstalling SCY and Twiglib tonight.

Edit: In hindsight, I should have checked the mod version first. Sorry about causing all this ruckus.
Title: Re: TwigLib TWIG™ Tech
Post by: Debido on February 18, 2015, 07:30:50 PM
Quote
TwigLib 0.5.1p

You're a few versions behind buddy.
Title: Re: TwigLib TWIG™ Tech 0.6.7a for [0.65.2a-RC2]
Post by: Debido on March 29, 2015, 12:57:51 AM
Download Version 0.6.7a (https://bitbucket.org/debido/starsector-multiship/downloads/TwigLib%200.6.7a.zip)
0.6.7a Change Log:
Updates for TwigLib
* Fixed up issue with RootNode not actually returning itself as the root when queried via MultiShipAPI
* Fixed up issue with filterConnections not properly adding the root node to the list of parts to be removed from the list
* Added isRoot and isChild from MultiShipManager to the TwigUtils
Title: Re: TwigLib TWIG™ Tech 0.6.7a for [0.65.2a-RC2]
Post by: Maelstrom on November 27, 2015, 07:59:14 AM
Are you still working on this? I mean, would suck if this is no longer being worked on  :'(
Title: Re: TwigLib TWIG™ Tech 0.6.7a for [0.65.2a-RC2]
Post by: Debido on November 27, 2015, 04:57:14 PM
Yep, the current version seems to work for the most part in the latest 0.7 release but there is a small bug, Alex will be providing a fix to address this in the 0.7.1 release.

I guess the only thing really left to do is to create a generic persistent campaign twig tracker, currently there is a persistent campaign tracker implemented in in the SCY faction but it is faction specific.

It shouldn't take too long to make a generic one available.
Title: Re: TwigLib TWIG™ for Interim 0.7.1-RC5 patch.
Post by: Debido on March 01, 2016, 10:35:52 PM
0.7.2

(http://lib.store.yahoo.net/lib/autopia/blackfire-fine-cut-aluminum-polish.jpg)

Needs a little bit of spit and polish, working on it.
Title: Re: TwigLib TWIG™ 0.6.9 [for 0.7.2a]
Post by: Debido on March 02, 2016, 04:21:17 PM
Download 0.6.9 (https://bitbucket.org/debido/starsector-multiship/downloads/TwigLib%200.6.9.7z)

Title: Re: TwigLib TWIG™ 0.6.9 [for 0.7.2a]
Post by: Debido on March 02, 2016, 04:43:21 PM
Apparently had some of the version numbers incorrectly stated, updated them in the files. I've replaced the 0.6.9 download with an update one correcting that.
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.10
Post by: Debido on March 09, 2016, 07:53:41 PM
Download 0.6.10 (https://bitbucket.org/debido/starsector-multiship/downloads/TwigLib%200.6.10.7z)

Modified the default behavior of getRoot(ShipAPI ship) to not return the root if the multiship part is detached from the parent to cause less headaches to modders.
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.10
Post by: Weltall on March 10, 2016, 05:02:43 AM
Out of curiosity; Why 0.6.8a is not offered anymore? Was it giving problems? I am playing again SS, and I am going around collecting mods for 0.7.1a. I realized I have 0.6.8a, but it is taken down. Was it problematic?
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.10
Post by: Tartiflette on March 10, 2016, 06:38:13 AM
Out of curiosity; Why 0.6.8a is not offered anymore? Was it giving problems? I am playing again SS, and I am going around collecting mods for 0.7.1a. I realized I have 0.6.8a, but it is taken down. Was it problematic?
Allied TWIG ships were spawning armor bit that were part of your player fleet. Also some mod scripted weapons that were check if they hit a Twig part to apply their effect to the parent ship still did that when hitting an already destroyed Twig part floating around.
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.10
Post by: Weltall on March 10, 2016, 09:20:56 AM
Allied TWIG ships were spawning armor bit that were part of your player fleet. Also some mod scripted weapons that were check if they hit a Twig part to apply their effect to the parent ship still did that when hitting an already destroyed Twig part floating around.

That definitely sounds problematic XD Thanks for the answer Tartiflette. I am sure the main reason I am using TwigLib is SCY. That means I should use 0.6.7a instead of the 0.6.8a that I have?
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.10
Post by: Tartiflette on March 10, 2016, 09:41:46 AM
That definitely sounds problematic XD Thanks for the answer Tartiflette. I am sure the main reason I am using TwigLib is SCY. That means I should use 0.6.7a instead of the 0.6.8a that I have?
Those problems were standing issues in 0.7.1. If you want to play with that version of the game, you should dig the "fix" I put up in the Scy thread.
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.10
Post by: Weltall on March 10, 2016, 09:49:35 AM
Those problems were standing issues in 0.7.1. If you want to play with that version of the game, you should dig the "fix" I put up in the Scy thread.

Thank you for the heads up! Got it as you suggested and will use that :) I hope you are having a nice and hopefully relaxing day :)
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.10
Post by: Argonic82 on March 17, 2016, 09:52:42 AM
Hi, I've been having crashes with the latest version of TwigLib. It happens when I fight Scy ships. Before you ask I have all my mods updated and they are all compatible with each other. Here is the tail end of one of the crash logs:

Code
11192384 [Thread-10] INFO  sound.O  - Creating streaming player for music with id [Spacer15Seconds.ogg]
11192385 [Thread-10] INFO  sound.H  - Playing music with id [Spacer15Seconds.ogg]
11193161 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ClassCastException: db.twiglib.core.SubNode cannot be cast to db.twiglib.core.RootShipAPI
java.lang.ClassCastException: db.twiglib.core.SubNode cannot be cast to db.twiglib.core.RootShipAPI
at db.twiglib.TwigUtils.getChildNodesAsShips(TwigUtils.java:58)
at data.scripts.util.SSP_Twig.empTargetTwig(SSP_Twig.java:27)
at data.scripts.weapons.SSP_TachyonLanceEffect.advance(SSP_TachyonLanceEffect.java:47)
at com.fs.starfarer.combat.entities.ship.A.G.advance(Unknown Source)
at com.fs.starfarer.combat.systems.void.advanceLinked(Unknown Source)
at com.fs.starfarer.combat.systems.void.advance(Unknown Source)
at com.fs.starfarer.combat.entities.Ship.fire(Unknown Source)
at com.fs.starfarer.combat.entities.Ship.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$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.10
Post by: Debido on March 17, 2016, 06:09:19 PM
Hi, I've been having crashes with the latest version of TwigLib. It happens when I fight Scy ships. Before you ask I have all my mods updated and they are all compatible with each other. Here is the tail end of one of the crash logs:

Code
11192384 [Thread-10] INFO  sound.O  - Creating streaming player for music with id [Spacer15Seconds.ogg]
11192385 [Thread-10] INFO  sound.H  - Playing music with id [Spacer15Seconds.ogg]
11193161 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ClassCastException: db.twiglib.core.SubNode cannot be cast to db.twiglib.core.RootShipAPI
java.lang.ClassCastException: db.twiglib.core.SubNode cannot be cast to db.twiglib.core.RootShipAPI
at db.twiglib.TwigUtils.getChildNodesAsShips(TwigUtils.java:58)
at data.scripts.util.SSP_Twig.empTargetTwig(SSP_Twig.java:27)
at data.scripts.weapons.SSP_TachyonLanceEffect.advance(SSP_TachyonLanceEffect.java:47)
at com.fs.starfarer.combat.entities.ship.A.G.advance(Unknown Source)
at com.fs.starfarer.combat.systems.void.advanceLinked(Unknown Source)
at com.fs.starfarer.combat.systems.void.advance(Unknown Source)
at com.fs.starfarer.combat.entities.Ship.fire(Unknown Source)
at com.fs.starfarer.combat.entities.Ship.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$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Thanks! I'll look into it.
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.10
Post by: NightKev on March 20, 2016, 03:34:55 AM
I just encountered that too, though I'd fought many SCY fleets prior to the crash so it was rather surprising. The only difference I know of is that the fleet that crashed had a "Nemean Lion Battle Fortress" and none of the others I fought did (though plenty had twiglib-enabled armored ships); my fleet loadout (ships/weapons) was pretty static. I'm using 0.6.10 of TwigLib and 0.99c of SCY.

Spoiler
15487948 [Thread-4] INFO  com.fs.starfarer.combat.CombatEngine  - FP1: 336, FP2: 286, maxFP1: 160, maxFP2: 140
15488233 [Thread-4] INFO  org.histidine.chatter.combat.ChatterCombatPlugin  - Chatter plugin initialized
15488233 [Thread-4] INFO  org.tc.autonomous.AutonomousCommandsPlugin  - Autonomous commands plugin initialized
15653761 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ClassCastException: db.twiglib.core.SubNode cannot be cast to db.twiglib.core.RootShipAPI
java.lang.ClassCastException: db.twiglib.core.SubNode cannot be cast to db.twiglib.core.RootShipAPI
   at db.twiglib.TwigUtils.getChildNodesAsShips(TwigUtils.java:58)
   at data.scripts.util.SSP_Twig.empTargetTwig(SSP_Twig.java:27)
   at data.scripts.weapons.SSP_IonBeamEffect.advance(SSP_IonBeamEffect.java:48)
   at com.fs.starfarer.combat.entities.ship.oOOO.oOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.advance(Unknown Source)
   at com.fs.starfarer.combat.systems.oOoO.o00000(Unknown Source)
   at com.fs.starfarer.combat.systems.oOoO.advance(Unknown Source)
   at com.fs.starfarer.combat.entities.Ship.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$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.10
Post by: Debido on March 23, 2016, 10:13:33 PM
Thanks! I'll have it updated real soon!
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.10
Post by: Debido on March 24, 2016, 12:54:18 AM
Download 0.6.11 (https://bitbucket.org/debido/starsector-multiship/downloads/TwigLib%200.6.11.7z)

Modified the default behavior of isMultiShip to not return true if it is a detached node if it is dead.
Title: Re: [0.7.2a] TwigLib TWIG™ 0.6.11 [Depreceted as of 0.8]
Post by: Debido on April 27, 2017, 03:27:37 AM
TwigLib has been superseded by the built in space station functionality that also allows multi-part ships. Migrating from TwigLib to the built in function to the new system is straight forward as it uses the same weapon slot based modularity but without the need for additional JSON files beyond variant files.