[Tool] Superluminal 2.2.1 - FTL Ship Editor

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
kartoFlane
Posts: 1470
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tool] Superluminal2 beta 7

Postby kartoFlane » Wed May 28, 2014 2:46 pm

@RAD
Well, that's definitely pretty weird. I'll see if I can figure it out later.

RAD-82 wrote:That wasn't the case before AE, otherwise Escort Duty never would've worked then. The original was really messed up with negative offsets, but it worked. Perhaps it was just rooms themselves that didn't support negative positions before, regardless of the ships actual offset.

Maybe an example will help.

Code: Select all

X_OFFSET
-1
ROOM
0    # ID
1    # X location
0    # Y location
2    # width
2    # height

This works fine, because when you add X_OFFSET and the room's X location, it's not negative:
(-1) + 1 = 0
The same goes for positive offset + negative room location.

However, if the value of X location were 0, the game would crash, because the result of the above "equation" is now negative:
(-1) + 0 = -1

What Escort Duty was doing, is it had negative X/Y offset, but then all of its rooms/doors had been moved forward, so that the end result for each one of them is not negative.

I remember that this works this way quite clearly, because I had to change the ship-loading code in the original editor just so that it could load the Escort Duty...

dpqkhanh wrote:Can you edit a inherent .ftl file? :roll:

What do you mean by an "inherent .ftl file"?
If you want to edit the mod, you can just change the file's extension from .ftl to .zip, and then unpack it, and repack it again once you've made your changes.

5thHorseman wrote:HOW ON EARTH did this thread survive 7 days and so many pages without me seeing it? I know I've been a little busy but holy cow.

Nice work there. Can't wait to sink my teeth into this one.

Thanks, and nice to see you so excited about it, Horseman :lol:
Superluminal2 - a ship editor for FTL
User avatar
5thHorseman
Posts: 1672
Joined: Sat Mar 02, 2013 2:29 am
Location: On the bridge of The Potential
Contact:

Re: [Tool] Superluminal2 beta 7

Postby 5thHorseman » Wed May 28, 2014 2:57 pm

I'm already playing with the tool (nice. I like many of the design changes you made from the old SL) and encountered my first bug. I *think* I have "The Potential 2" ready to save and when I try to save it as an FTL file, the editor saves nothing and spits out the following into the error log:

Code: Select all

10:50:18.357 [main] TRACE com.kartoflane.superluminal2.ui.EditorWindow - Saving ship as D:\ftl\modmanager\mods\Potential.ftl
10:50:18.360 [main] ERROR com.kartoflane.superluminal2.ui.EditorWindow - An error occured while saving the ship: java.lang.NullPointerException
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.generateLayoutXML(ShipSaveUtils.java:588)
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.saveShip(ShipSaveUtils.java:147)
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.saveShipFTL(ShipSaveUtils.java:62)
   at com.kartoflane.superluminal2.ui.EditorWindow.saveShip(EditorWindow.java:879)
   at com.kartoflane.superluminal2.ui.EditorWindow.access$1100(EditorWindow.java:71)
   at com.kartoflane.superluminal2.ui.EditorWindow$12.widgetSelected(EditorWindow.java:614)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
   at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
   at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
   at com.kartoflane.superluminal2.Superluminal.main(Superluminal.java:264)

10:51:55.973 [main] TRACE com.kartoflane.superluminal2.ui.EditorWindow - Saving ship as D:\ftl\modmanager\mods\potential_ae.ftl
10:51:55.976 [main] ERROR com.kartoflane.superluminal2.ui.EditorWindow - An error occured while saving the ship: java.lang.NullPointerException
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.generateLayoutXML(ShipSaveUtils.java:588)
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.saveShip(ShipSaveUtils.java:147)
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.saveShipFTL(ShipSaveUtils.java:62)
   at com.kartoflane.superluminal2.ui.EditorWindow.saveShip(EditorWindow.java:879)
   at com.kartoflane.superluminal2.ui.EditorWindow.access$1100(EditorWindow.java:71)
   at com.kartoflane.superluminal2.ui.EditorWindow$12.widgetSelected(EditorWindow.java:614)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
   at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
   at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
   at com.kartoflane.superluminal2.Superluminal.main(Superluminal.java:264)


I get a similar error when saving as a resource folder. I'd give you the ship file but... well... I can't save it :)
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
RAD-82
Posts: 781
Joined: Sat Nov 09, 2013 12:16 am
Location: Not where a person needs to be...

Re: [Tool] Superluminal2 beta 7

Postby RAD-82 » Wed May 28, 2014 3:16 pm

kartoFlane wrote:What Escort Duty was doing, is it had negative X/Y offset, but then all of its rooms/doors had been moved forward, so that the end result for each one of them is not negative.

Except the end result was not that each one of them was not negative. I marked the (0,0) of a hanger screenshot from one of VanguardOfValor's videos with red lines. There are three rooms that are negative, and it worked back then. As I said in a previous post, it was -40 pixels, and the AE update no longer allows it.

Why am I even discussing this? It's not like this is going to affect the editor in any way, since it should already avoid this issue. :P
Image
Junkyard has FTL mods, mostly ships and a few other things.
User avatar
kartoFlane
Posts: 1470
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tool] Superluminal2 beta 7

Postby kartoFlane » Wed May 28, 2014 3:46 pm

5thHorseman wrote:I'm already playing with the tool (nice. I like many of the design changes you made from the old SL) and encountered my first bug.

I've already fixed that bug, just haven't released the update yet :) For now, you can work around it by replacing all weapon mounts with new ones.

RAD-82 wrote:Except the end result was not that each one of them was not negative. I marked the (0,0) of a hanger screenshot from one of VanguardOfValor's videos with red lines. There are three rooms that are negative, and it worked back then. As I said in a previous post, it was -40 pixels, and the AE update no longer allows it.

Look at the Escort Duty's layout.txt file -- it has HORIZONTAL offset of -40 -- that's why the entire ship is shifted by 40 pixels to the left ;) Therefore the rooms appear to have negative location, when in fact they do not.

RAD-82 wrote:Why am I even discussing this? It's not like this is going to affect the editor in any way, since it should already avoid this issue. :P

Well, if the problem is related to the HORIZONTAL offset being negative, then it very well might actually affect it.

Nice work on the ship's update, anyhow :)
Superluminal2 - a ship editor for FTL
User avatar
RAD-82
Posts: 781
Joined: Sat Nov 09, 2013 12:16 am
Location: Not where a person needs to be...

Re: [Tool] Superluminal2 beta 7

Postby RAD-82 » Wed May 28, 2014 6:47 pm

kartoFlane wrote:HORIZONTAL

Okay, by specifically mentioning HORIZONTAL, I see where I was making a bad argument. I still don't understand how HORIZONTAL can do something that X_OFFSET can't when they look like they do the same thing on different scales. :|

It occurred to me that this issue that Escort Duty was having might be the same issue the radiation events in CE are having, since they use a separate room off the screen. Perhaps the rooms on those ships are too far apart from each other.
Image
Junkyard has FTL mods, mostly ships and a few other things.
User avatar
5thHorseman
Posts: 1672
Joined: Sat Mar 02, 2013 2:29 am
Location: On the bridge of The Potential
Contact:

Re: [Tool] Superluminal2 beta 7

Postby 5thHorseman » Wed May 28, 2014 10:35 pm

I've noticed that every tool in SL that opens files goes to whatever directory you used last regardless of what tool you used. Any chance that the user could set what directory each thing opens files in, or just remember for that specific tool what directory you got files from? For example, when I load a ship I pick my "ftls" directory. When I load interior images, SL defaults to that "ftls" directory and I have to navigate to my "interiors" directory. When I then save the file, it's in "interiors" and I have to navigate BACK to my "ftls" directory.

It'd be nice if the save/load tool remembered where I like to save and load ships, and the interior images button remembered where I like to load interior images from.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
NewAgeOfPower
Posts: 288
Joined: Wed Jan 02, 2013 1:52 am
Location: ICN Excavalon

Re: [Tool] Superluminal2 beta 7

Postby NewAgeOfPower » Fri May 30, 2014 2:12 am

Hey Karto, I detest Paypal, so open a Google wallet and I'll give you a small tip.
Requiem. The first in the Ascension trilogy. Current version: 0.6 BETA.

Get your Ascension Faction siggys here!
Image
Image
Image
Image
TheNewbie
Posts: 138
Joined: Thu Mar 28, 2013 9:56 am
Location: In HELL!

Re: [Tool] Superluminal2 beta 7

Postby TheNewbie » Fri May 30, 2014 6:14 am

Hello kartoFlane! Due to an error, I am not able finish one of the ships I am making. I would be thankfull if you gave me an insight on the problem:

Code: Select all

DEBUG Superluminal - Superluminal v2.0.0 beta7
DEBUG Superluminal - Windows 7 6.1
DEBUG Superluminal - Java HotSpot(TM) Client VM, 1.7.0_60, x86
DEBUG Superluminal - SWT v4335

TRACE Superluminal - Loading properties from config file...
TRACE Superluminal - No FTL dats path previously set.
DEBUG Superluminal - FTL dats path was not located automatically. Prompting user
 for location.
INFO  Superluminal - FTL dats located at: E:\Users\(Username Marked Out)\Desktop\FTL Faster Tha
n Light 2\resources
TRACE Superluminal - Loading dat archives...
TRACE Superluminal - Loading database...
WARN  DatabaseEntry - DatabaseCore: could not load weapon: CRYSTAL_1: could not
find animation 'crystal_shard'.
TRACE DatabaseEntry - DatabaseCore was loaded successfully.
INFO  Superluminal - Checking for updates...
INFO  Superluminal - Program is up to date.
INFO  Superluminal - Running...
TRACE EditorWindow - Saving ship as E:\Users\(Username Marked Out)\Desktop\The Excalibur.ftl
ERROR EditorWindow - An error occured while saving the ship: java.lang.NullPoint
erException
        at com.kartoflane.superluminal2.utils.ShipSaveUtils.generateLayoutXML(Sh
ipSaveUtils.java:588)
        at com.kartoflane.superluminal2.utils.ShipSaveUtils.saveShip(ShipSaveUti
ls.java:147)
        at com.kartoflane.superluminal2.utils.ShipSaveUtils.saveShipFTL(ShipSave
Utils.java:62)
        at com.kartoflane.superluminal2.ui.EditorWindow.saveShip(EditorWindow.ja
va:879)
        at com.kartoflane.superluminal2.ui.EditorWindow.access$1100(EditorWindow
.java:71)
        at com.kartoflane.superluminal2.ui.EditorWindow$12.widgetSelected(Editor
Window.java:614)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
        at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
        at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
        at com.kartoflane.superluminal2.Superluminal.main(Superluminal.java:264)
When I try to save my ship, it says: "An error has occured while saving the ship: null Check log for details"

When I go to the log:

Code: Select all

20:53:26.424 [main] DEBUG com.kartoflane.superluminal2.Superluminal - Superluminal v2.0.0 beta7
20:53:26.424 [main] DEBUG com.kartoflane.superluminal2.Superluminal - Windows 7 6.1
20:53:26.424 [main] DEBUG com.kartoflane.superluminal2.Superluminal - Java HotSpot(TM) Client VM, 1.7.0_60, x86
20:53:26.424 [main] DEBUG com.kartoflane.superluminal2.Superluminal - SWT v4335
20:53:26.471 [main] TRACE com.kartoflane.superluminal2.Superluminal - Loading properties from config file...
20:53:26.518 [main] TRACE com.kartoflane.superluminal2.Superluminal - No FTL dats path previously set.
20:53:26.658 [main] DEBUG com.kartoflane.superluminal2.Superluminal - FTL dats path was not located automatically. Prompting user for location.
20:53:36.393 [main] INFO  com.kartoflane.superluminal2.Superluminal - FTL dats located at: E:\Users\(Unknown)\Desktop\FTL Faster Than Light 2\resources
20:53:36.393 [main] TRACE com.kartoflane.superluminal2.Superluminal - Loading dat archives...
20:53:36.518 [main] TRACE com.kartoflane.superluminal2.Superluminal - Loading database...
20:53:36.736 [Thread-2] WARN  com.kartoflane.superluminal2.core.DatabaseEntry - DatabaseCore: could not load weapon: CRYSTAL_1: could not find animation 'crystal_shard'.
20:53:37.095 [Thread-2] TRACE com.kartoflane.superluminal2.core.DatabaseEntry - DatabaseCore was loaded successfully.
20:53:37.111 [main] INFO  com.kartoflane.superluminal2.Superluminal - Checking for updates...
20:53:40.964 [main] INFO  com.kartoflane.superluminal2.Superluminal - Program is up to date.
20:53:40.964 [main] INFO  com.kartoflane.superluminal2.Superluminal - Running...
20:57:10.332 [main] TRACE com.kartoflane.superluminal2.ui.EditorWindow - Saving ship as E:\Users\(Unknown)\Desktop\Excal.ftl
20:57:10.378 [main] ERROR com.kartoflane.superluminal2.ui.EditorWindow - An error occured while saving the ship: java.lang.NullPointerException
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.generateLayoutXML(ShipSaveUtils.java:588)
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.saveShip(ShipSaveUtils.java:147)
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.saveShipFTL(ShipSaveUtils.java:62)
   at com.kartoflane.superluminal2.ui.EditorWindow.saveShip(EditorWindow.java:879)
   at com.kartoflane.superluminal2.ui.EditorWindow.access$1100(EditorWindow.java:71)
   at com.kartoflane.superluminal2.ui.EditorWindow$12.widgetSelected(EditorWindow.java:614)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
   at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
   at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
   at com.kartoflane.superluminal2.Superluminal.main(Superluminal.java:264)

20:59:07.475 [main] TRACE com.kartoflane.superluminal2.ui.EditorWindow - Saving ship as E:\Users\Kostas\Desktop\Excal.ftl
20:59:07.475 [main] ERROR com.kartoflane.superluminal2.ui.EditorWindow - An error occured while saving the ship: java.lang.NullPointerException
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.generateLayoutXML(ShipSaveUtils.java:588)
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.saveShip(ShipSaveUtils.java:147)
   at com.kartoflane.superluminal2.utils.ShipSaveUtils.saveShipFTL(ShipSaveUtils.java:62)
   at com.kartoflane.superluminal2.ui.EditorWindow.saveShip(EditorWindow.java:879)
   at com.kartoflane.superluminal2.ui.EditorWindow.access$1100(EditorWindow.java:71)
   at com.kartoflane.superluminal2.ui.EditorWindow$11.widgetSelected(EditorWindow.java:596)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
   at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
   at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
   at com.kartoflane.superluminal2.Superluminal.main(Superluminal.java:264)
User avatar
kartoFlane
Posts: 1470
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tool] Superluminal2 beta 8

Postby kartoFlane » Fri May 30, 2014 3:16 pm

Figured I should probably release an update to get rid of the issue with ship saving. Sorry, but there's nothing really exciting to see here -- mostly just bug fixes. I did do some preliminary work on gibs, though -- you can view them via the Gib Tool (you have to hide all the other stuff first -- keys 1 through 8 by default), but changes made to them are not being saved yet.

Download: [ Superluminal 2.0.0 beta8 ]

Changelog:

Code: Select all

2.0.0 beta8:
- The update dialog now displays a brief list of changes that have been made since the version you're using
- Fixed a bug with ship loading that would not link mounts to gibs correctly, causing problems when you tried to save the ship
- Weapon/drone/augment selection dialogs now will also scroll to show the last selected item
- Added the ability to change enemy ships' boarding AI, now only gets exported for enemy ships
- Fixed a bug that would not allow to confirm "No Drone List" in drone selection dialog
- Fixed systems not disappearing when hiding rooms
- Done some preliminary work on gibs - can be viewed and moved around with Gib Tool (you have to hide all the other elements first - keys 1 through 8 by default). Gibs are not exported yet.


RAD-82 wrote: I still don't understand how HORIZONTAL can do something that X_OFFSET can't when they look like they do the same thing on different scales. :|

My guess is that HORIZONTAL moves the entire ship origin point, whereas X_OFFSET only controls the distance from it *shrug*

5thHorseman wrote:It'd be nice if the save/load tool remembered where I like to save and load ships, and the interior images button remembered where I like to load interior images from.

Yup, I'll get that in eventually ;)

NewAgeOfPower wrote:Hey Karto, I detest Paypal, so open a Google wallet and I'll give you a small tip.

I live in Europe, and as far as I know, the wallet only works for people based in the US... :?

TheNewbie wrote:Hello kartoFlane! Due to an error, I am not able finish one of the ships I am making. I would be thankfull if you gave me an insight on the problem:

That's the same issue Horseman had -- it's fixed in the new version :)
Superluminal2 - a ship editor for FTL
FtDLulz
Posts: 38
Joined: Mon May 05, 2014 9:42 pm

Re: [Tool] Superluminal2 beta 8

Postby FtDLulz » Fri May 30, 2014 8:10 pm

Why do some ships, such as REBEL_SKINNY_ELITE, have duplicate mounts? These mounts don't have a slide direction and are slightly offset from the proper mounts. Are they added by Superluminal?

Edit: Nevermind, apparently in the XML they're 'artillery testing points'.

Edit 2: Drone count does not seem to actually update, it resets itself to 2.
Also, when I go ingame, the enemy ship hull is invisible. Thirdly, when setting a enemy ship's weapon list to 'WEAPONS_FREE', it spawns with no weapons. I'm assuming that's because there's only three weapons in the list and the weapon count is 4 for the enemy ship, but I could be wrong.

Edit 3: Just tested with a list with four weapons, still didn't show any. Set it to WEAPONS_JELLY and it worked.

Who is online

Users browsing this forum: No registered users and 16 guests