Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.9.1a is out! (05/10/19); Blog post: Skills and Story Points (07/08/19)

Pages: [1] 2 3

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

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
[0.7.2a] TwigLib TWIG™ 0.6.11 [Superseded in 0.8]
« 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

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.


previous version:
0.6.7 for 0.65.2a-RC2
« Last Edit: April 27, 2017, 03:32:40 AM by Debido »
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TWIG™ Tech (WIP)
« Reply #1 on: October 05, 2014, 04:33:57 AM »

« Last Edit: November 10, 2014, 09:09:19 PM by Debido »
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 2662
  • Kickstarter is NOT a magic spring of free money!
    • View Profile
    • Email
Re: TWIG™ Tech (WIP)
« Reply #2 on: October 05, 2014, 06:03:25 AM »

SOON TM


I'm sooo using this to make ships with destructible armor rather than giant ships....
Logged
 

Callabaddie

  • Ensign
  • *
  • Posts: 15
  • Pen or sword? The shield is mightiest.
    • View Profile
    • Email
Re: TWIG™ Tech (WIP)
« Reply #3 on: October 06, 2014, 01:19:40 AM »

Bloody brilliant!
Logged

Ryxsen1421

  • Captain
  • ****
  • Posts: 274
    • View Profile
    • Facebook
    • Email
Re: TWIG™ Tech (WIP)
« Reply #4 on: October 06, 2014, 01:27:23 AM »

Scy gets the first space armor to be spaced in space. D:
Logged

Bjørn_in_the_Sector

  • Commander
  • ***
  • Posts: 185
  • Have a towel, just need a ship...
    • View Profile
Re: TWIG™ Tech (WIP)
« Reply #5 on: October 06, 2014, 02:20:47 PM »

spaaaaaaaaaaaaaaace! [personality coring intensifies]
Logged
Executive Creative Director of Naysmyth Armouries Mod (Very WIP)

Debido

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

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.
« Last Edit: November 01, 2014, 03:22:18 PM by Debido »
Logged

Tartiflette

  • Admiral
  • *****
  • Posts: 2662
  • Kickstarter is NOT a magic spring of free money!
    • View Profile
    • Email
Re: TWIG™ Tech (WIP)
« Reply #7 on: November 04, 2014, 04:53:32 AM »

SOON-er tm

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

Debido

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

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

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #9 on: November 10, 2014, 08:59:26 PM »



Download Version 0.5.0

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

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #10 on: November 12, 2014, 06:19:40 AM »

Download Version 0.5.1
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.
Logged

Tartiflette

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

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #12 on: November 27, 2014, 01:54:50 PM »


Download Version 0.6.5
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
Logged

ucws

  • Ensign
  • *
  • Posts: 40
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #13 on: December 05, 2014, 09:28:12 AM »

Very useful mod!
Finally I can destroy my ship parts.
Logged

ucws

  • Ensign
  • *
  • Posts: 40
    • View Profile
Re: TwigLib TWIG™ Tech
« Reply #14 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]
Logged
Pages: [1] 2 3