Fractal Softworks Forum
April 18, 2019, 03:29:17 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Starsector 0.9a is out! (11/16/18); In-dev patch notes for 0.9.1a (01/31/19)
 
   Home   Help Search Login Register  
Pages: 1 [2] 3
  Print  
Author Topic: [0.7.2a] TwigLib TWIG™ 0.6.11 [Superseded in 0.8]  (Read 43497 times)
Debido
Admiral
*****
Posts: 1183



View Profile
« Reply #15 on: December 12, 2014, 04:43:21 AM »

Hi ucws, they should all have different ShipID.
Logged
Jay2Jay
Lieutenant
**
Posts: 60



View Profile Email
« Reply #16 on: February 09, 2015, 04:35:40 PM »

Can we manually aim the turrets? I wanna manually aim some turrets.
Logged

"The greatest pleasure is to vanquish your enemies and chase them before you, to rob them of their wealth and see those dear to them bathed in tears, to ride their horses and clasp to your bosom their wives and daughters." ~Ghengis Khan
Tartiflette
Admiral
*****
Posts: 2612


Kickstarter is NOT a magic spring of free money!


View Profile Email
« Reply #17 on: February 09, 2015, 04:43:24 PM »

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.
Logged

 
Debido
Admiral
*****
Posts: 1183



View Profile
« Reply #18 on: February 09, 2015, 11: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.
Logged
Debido
Admiral
*****
Posts: 1183



View Profile
« Reply #19 on: February 17, 2015, 11: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)
« Last Edit: February 17, 2015, 11:44:59 AM by Debido » Logged
Debido
Admiral
*****
Posts: 1183



View Profile
« Reply #20 on: February 17, 2015, 11: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) 

Logged
Debido
Admiral
*****
Posts: 1183



View Profile
« Reply #21 on: February 17, 2015, 12:31:45 PM »

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
     *
Logged
Beobachter
Ensign
*
Posts: 45


Balancing? What is that?


View Profile
« Reply #22 on: February 18, 2015, 08: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
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
Logged

Putting together a mod sometime in the distant future.
Tartiflette
Admiral
*****
Posts: 2612


Kickstarter is NOT a magic spring of free money!


View Profile Email
« Reply #23 on: February 18, 2015, 11: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.
Logged

 
Debido
Admiral
*****
Posts: 1183



View Profile
« Reply #24 on: February 19, 2015, 02:19:00 AM »

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
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

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?)
Logged
Beobachter
Ensign
*
Posts: 45


Balancing? What is that?


View Profile
« Reply #25 on: February 19, 2015, 03:16:58 AM »

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.
« Last Edit: February 19, 2015, 03:25:05 AM by Beobachter » Logged

Putting together a mod sometime in the distant future.
Debido
Admiral
*****
Posts: 1183



View Profile
« Reply #26 on: February 19, 2015, 03:30:50 AM »

Quote
TwigLib 0.5.1p

You're a few versions behind buddy.
Logged
Debido
Admiral
*****
Posts: 1183



View Profile
« Reply #27 on: March 29, 2015, 07:57:51 AM »

Download Version 0.6.7a
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
Logged
Mealstrom
Commander
***
Posts: 203



View Profile
« Reply #28 on: November 27, 2015, 03:59:14 PM »

Are you still working on this? I mean, would suck if this is no longer being worked on  Cry
Logged
Debido
Admiral
*****
Posts: 1183



View Profile
« Reply #29 on: November 28, 2015, 12:57:14 AM »

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.
Logged
Pages: 1 [2] 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.20 | SMF © 2006-2011, Simple Machines
Simple Audio Video Embedder
Valid XHTML 1.0! Valid CSS!