Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: [0.7.2a] TwigLib TWIG™ 0.6.11 [Superseded in 0.8]  (Read 44267 times)

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #15 on: December 11, 2014, 08:43:21 PM »

Hi ucws, they should all have different ShipID.
Logged

Jay2Jay

  • Lieutenant
  • **
  • Posts: 60
    • View Profile
    • Email
Re: TwigLib TWIG™ Tech
« Reply #16 on: February 09, 2015, 08:35:40 AM »

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: 2651
  • Kickstarter is NOT a magic spring of free money!
    • View Profile
    • Email
Re: TwigLib TWIG™ Tech
« Reply #17 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.
Logged
 

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #18 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.
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #19 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)
« Last Edit: February 17, 2015, 03:44:59 AM by Debido »
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #20 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) 

Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #21 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
     *
Logged

Beobachter

  • Ensign
  • *
  • Posts: 45
  • Balancing? What is that?
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #22 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]
Logged
Putting together a mod sometime in the distant future.

Tartiflette

  • Admiral
  • *****
  • Posts: 2651
  • Kickstarter is NOT a magic spring of free money!
    • View Profile
    • Email
Re: TwigLib TWIG™ Tech
« Reply #23 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.
Logged
 

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #24 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?)
Logged

Beobachter

  • Ensign
  • *
  • Posts: 45
  • Balancing? What is that?
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #25 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.
« Last Edit: February 18, 2015, 07:25:05 PM by Beobachter »
Logged
Putting together a mod sometime in the distant future.

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #26 on: February 18, 2015, 07:30:50 PM »

Quote
TwigLib 0.5.1p

You're a few versions behind buddy.
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech 0.6.7a for [0.65.2a-RC2]
« Reply #27 on: March 29, 2015, 12: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
Re: TwigLib TWIG™ Tech 0.6.7a for [0.65.2a-RC2]
« Reply #28 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  :'(
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech 0.6.7a for [0.65.2a-RC2]
« Reply #29 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.
Logged
Pages: 1 [2] 3