Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Really hope the “ship skins” system could help modular ship design.  (Read 3295 times)

ucws

  • Ensign
  • *
  • Posts: 40
    • View Profile

If "ship skins" system can change bounds polygon and ship performance.
It will be very useful system for some modular ships.
Really looking forward to this system. :D
« Last Edit: October 18, 2014, 08:15:53 PM by ucws »
Logged

DM818

  • Commander
  • ***
  • Posts: 134
    • View Profile
Re: Really hope the “ship skins” system could help modular ship design.
« Reply #1 on: October 18, 2014, 08:18:56 PM »

That image seems to have the base hulls swapped. 

I am not sure how much sense modular hulls makes lore wise considering it is all done in autofactories which are capable of constructing (all?) ships with just a blueprint.
Logged

CrashToDesktop

  • Admiral
  • *****
  • Posts: 3876
  • Quartermaster
    • View Profile
Re: Really hope the “ship skins” system could help modular ship design.
« Reply #2 on: October 18, 2014, 08:25:44 PM »

That image seems to have the base hulls swapped. 

I am not sure how much sense modular hulls makes lore wise considering it is all done in autofactories which are capable of constructing (all?) ships with just a blueprint.

Mods don't necessarily have to fall within the realm of Starsector lore. ;)
Logged
Quote from: Trylobot
I am officially an epoch.
Quote from: Thaago
Note: please sacrifice your goats responsibly, look up the proper pronunciation of Alex's name. We wouldn't want some other project receiving mystic power.

kazi

  • Admiral
  • *****
  • Posts: 714
    • View Profile
Re: Really hope the “ship skins” system could help modular ship design.
« Reply #3 on: October 18, 2014, 10:17:52 PM »

I think you can change everything but the bounds polygon. Sorry. :P
Logged

Debido

  • Admiral
  • *****
  • Posts: 1183
    • View Profile
Re: Really hope the “ship skins” system could help modular ship design.
« Reply #4 on: October 18, 2014, 11:37:32 PM »

Quote
A skin can:
Set a new sprite/name/description
Remove and/or modify weapon slots
Remove engine slots
Add/remove built-in hullmods and weapons

You cannot directly change the bounds of a ship through skins, however through a simple script you can alter the bounds of a ship as it enters combat, and only needs to be done once. Need to wait for 0.65 to fix a bug the clearing of the bounds first though.

You can also add weapon slots as noted above. So what you might want to do is this:
1. Create your base ship
2. Create your your modules as separate 'decorative weapons'
3. On each skin add their respective 'decorative module' module as built-in weapon
4. Add additional weapon slots as needed in the skin definition
5. On each decorative module create an EveryFrameWeaponEffectPlugin
5a. This plugin can derive what the *new* bounds are supposed to be for the ship based upon the name of the weapon for instance, or the hull/skin name
5b. Once the correct bounds are chosen, the old ones are cleared and the new ones are applied, this is done only once.

An option B would be to just have the new merged/new sprite attached to the skin, but still use an invisible weapon with the EveryFrameWeaponEffectPlugin that changes the bounds of your ship in the first frame of combat. It would work either way.

So is what you're asking for entirely possible with Skins? Absolutely!

I could probably get this script working fairly quickly as I've been working on something using the same methodology, but yeah, bugs in the BoundsAPI.Clear() preventing it from working right now in 0.6.2.

I could probably knock out the script today, but yeah I'll add it on my to-do list for 0.65 and make it publicly available. So yeah, start planning for this and making sprites and assets if you want to do it this way. Though honestly I'm not sure what is the real difference between simply making another ship and making a skin with a bounds changing weapon script.
Logged

ucws

  • Ensign
  • *
  • Posts: 40
    • View Profile
Re: Really hope the “ship skins” system could help modular ship design.
« Reply #5 on: October 19, 2014, 06:49:40 AM »

Thanks for explanation.
Option A need multiple plugin?B just one?
I've already made these ships?so Option B will easier?
All I need is the Plugin that changes the bounds, or changes the whole ship...
Logged

ucws

  • Ensign
  • *
  • Posts: 40
    • View Profile
Re: Really hope the “ship skins” system could help modular ship design.
« Reply #6 on: October 19, 2014, 06:52:14 AM »

I think you can change everything but the bounds polygon. Sorry. :P

Bad news but in a surprise... :-[
Logged