[Tool] FTL Ship Editor: Superluminal [NOT UPDATED TO AE]

Discuss and distribute tools and methods for modding. Moderator - Grognak
President Larry
Posts: 21
Joined: Sun Jan 20, 2013 6:40 am

Re: [Tool] FTL Ship Editor: Superluminal - b18-2-13

Postby President Larry » Sat Feb 23, 2013 9:24 pm

@kartoFlane

THanks
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: [Tool] FTL Ship Editor: Superluminal - b18-2-13

Postby speedoflight » Sat Feb 23, 2013 10:53 pm

kartoFlane wrote:Again, to fix the problem with "Error: default resources list not found in the package", look here. Download the attached file, unpack it and put it into the folder containing superluminal.jar, that'll fix it.

As for the crashes, I don't know... Just tested it, gave the shield system a custom interior with no associated glow, and the game did not crash. Though in truth, I have completely forgotten glow images, will fix that for the next update.
Maybe you could send me the .ftl package that causes the problem, perhaps I'll be able to find the cause.

@electricz0ltan
I doubt that's the issue, it has to be something else, but without more information I won't be able to pinpoint what.



The problem was not a crash, the problem was that the room with the custom interior graphic appears dark in shadows... anyway i coudnt get the custom interior graphic to work with the attached glow.. i just changed it to a default one.. so i did not investigate further..
My currently mods / wips ->
ImageImage
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tool] FTL Ship Editor: Superluminal - b23-2-13

Postby kartoFlane » Sat Feb 23, 2013 11:17 pm

@speedoflight
Huh. Weird. Maybe it was something with transparency after all.
Anyway, I'm sure you've noticed this, but the graphics have to be named accordingly: if you have a room interior image named test.png, then the glow images should be named test_glow1.png, test_glow2.png and test_glow3.png. Also, in your ship's blueprint, the system that is to use this custom graphic, has to have it's img property set to test.

By the way, a new update is ready:
Changelog:
  • Fixed - Augments list not loading properly
  • Fixed - Fixed shield graphic getting displaced when loading more images, or reloading projects
  • Fixed - Fixed shield graphic not having its position updated when rooms were added / removed / resized / moved
  • Fixed - Fixed the "default resources list missing" bug.
  • Fixed - Dozens of tweaks and small fixes I've forgotten about.
  • Added - (finally) Gibs editor - accessible from the tools kit by clicking on the right-most button, or pressing 'G'.
  • Added - Loading ships from .ftl packages (several issues still to be resolved)

Current issues:
  • So far it's only possible to load a ship from .ftl package if it's the only ship in the package, in the future I will add the possibility to choose the ship to load.
  • The ships are loaded properly, but the editor isn't loading custom weapons, drones or augments from inside the package yet. So that data will be missing and appropriate errors will be displayed, everything else should load properly, however. If you want the editor to be able to load your custom stuff, you have to add its components to the data and resouce directories used by the editor.
  • Ships that have negative offset values in shipname.txt are not loaded properly yet. For now, you'll have to either reposition the rooms inside the editor, or change the values in shipname.txt so that the offset values are zero or positive.

How to use the gib editor:
  • Left clicking selects the top-most gib and allows to move it around.
  • Precision mode, nudging and arbitrary position all work.
  • Right mouse button has the exact same functionality as left button, but it doesn't change selection - this allows you to choose a gib from the list, and then edit it using the right mouse button (useful if a gib is obsured by another, bigger gib)
  • While in gib editor, you can assign weapon mounts to gibs - right clicking on a mount will bring up a menu where you can select a gib for the mount to use (this is used during the ship's destruction animation, the weapon mounts will float along with the gib they were attached to)
  • Double clicking on a gib (either in the editor or on the list) will bring up its properties menu where you can set up its min/max linear and angular velocities, and direction in which it moves during the animation - the green circle represents this direction.
  • You can change the gibs layering using the list's Move Up and Move Down buttons. Gib closest to the top of the list is the topmost gib (duh).

Dropbox download directory: Superluminal 23-2-13
Last edited by kartoFlane on Tue Feb 26, 2013 12:03 pm, edited 1 time in total.
Superluminal2 - a ship editor for FTL
Weltall Zero
Posts: 37
Joined: Tue Dec 25, 2012 2:13 pm

Re: [Tool] FTL Ship Editor: Superluminal - b23-2-13

Postby Weltall Zero » Sun Feb 24, 2013 1:43 am

Amazing editor! Thanks a lot for all the time invested in developing this, I've been waiting for an editor as good as this!

I'm getting a few exceptions, however. When trying to select a weapon, I get:

java.lang.NullPointerException
at com.kartoflane.superluminal.elements.FTLMount.setImage(FTLMount.java:93)
at com.kartoflane.superluminal.core.ShipIO.loadWeaponImages(ShipIO.java:1216)
at com.kartoflane.superluminal.ui.ShipPropertiesWindow$2.widgetSelected(ShipPropertiesWindow.java:1210)
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.superluminal.ui.ShipPropertiesWindow.open(ShipPropertiesWindow.java:287)
at com.kartoflane.superluminal.core.Main$16.widgetSelected(Main.java:1317)
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.superluminal.core.Main.open(Main.java:387)
at com.kartoflane.superluminal.core.Main.main(Main.java:270)

Also, there is no way to select starting system power or even if they are preinstalled or not, is there? I'm currently editing that by hand on the blueprints.xml.append file.
electricz0ltan
Posts: 9
Joined: Sat Feb 16, 2013 4:00 pm

Re: [Tool] FTL Ship Editor: Superluminal - b23-2-13

Postby electricz0ltan » Sun Feb 24, 2013 2:31 am

@kartoflane
I attached the .shp file.
Can you take a look and see whats wrong? I've compared it to the vanilla ships, nataryeahbuddy's F22 Raptor and hellcatv's Imperial Star Destroyer. I don't seem to see much differences. :?
Image
If you see something suspicious, please report it to you local Zoltan Police Station. All issues will be dealt with immediately
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tool] FTL Ship Editor: Superluminal - b23-2-13

Postby kartoFlane » Sun Feb 24, 2013 2:51 am

@Weltall
Huh. It's working fine for me. What weapon are you trying to choose? If it's a custom weapon, then there might be some issues, I haven't tested for that.
Anyway, this error appears when the image file is not found; this would suggest that you are either missing a file, or that something was wrongly linked either in blueprints.xml or animations.xml.
If it is a custom weapon, try double checking whether you have not made some kind of mistake (in that case, try to follow the vanilla blueprints' format exactly, even if there's a single wrongly placed space, the editor might not load the blueprint properly).
Edit: starting power; not exactly sure what you mean by that. If you want to change a system's starting level or whether its preinstalled or not, you can do this by double-clicking on a room that has this system; a window will appear and you'll be able to change the values there. The power systems are drawing the first time they're installed cannot be adjusted on a per-ship basis.
For enemy ships, you can set their system's power property by changing the power scale, and max property by changing the level scale (kinda confusing, will have to revise that)

@electricz0ltan
You'll have to send me the ship exported to an .ftl; the .shp format does not contain the images used by your ship, only paths leading to them, so if I don't have the images in the exact same places, I won't be able to load your project.
Last edited by kartoFlane on Sun Feb 24, 2013 3:27 am, edited 1 time in total.
Superluminal2 - a ship editor for FTL
electricz0ltan
Posts: 9
Joined: Sat Feb 16, 2013 4:00 pm

Re: [Tool] FTL Ship Editor: Superluminal - b23-2-13

Postby electricz0ltan » Sun Feb 24, 2013 2:58 am

Ok.
I hope this is the right one
Image
If you see something suspicious, please report it to you local Zoltan Police Station. All issues will be dealt with immediately
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tool] FTL Ship Editor: Superluminal - b23-2-13

Postby kartoFlane » Sun Feb 24, 2013 3:18 am

I think it's probably due to the fact that your ship has its img property set to "Federation Light Interceptor", but then the package contains no images, and when the games tries to load them, it flips out.
This is a bug, some weird flaw in how I planned out the logic for the exporting function... For now, checking the "don't check if already present" box in the export window should fix it. Try doing that and loading the ship.
Superluminal2 - a ship editor for FTL
President Larry
Posts: 21
Joined: Sun Jan 20, 2013 6:40 am

Re: [Tool] FTL Ship Editor: Superluminal - b23-2-13

Postby President Larry » Sun Feb 24, 2013 5:19 am

OK, a few problems that I'd REALLY liked resolved, I've been struggling to use this and its starting to piss me off.

1. .ftl files don't work with grognaks, it crashes when I try to use the ship

2. I get this error whenever I try to choose the directories: Error: load declarations - blueprints.xml file not found
Error: load declarations - autoBlueprints.xml file not found

I have a theory that I'm not unpacking data and resources files right, so I also *might* need help with that. Sorry to ask so much, I understand if it just doesn't work for me.
Weltall Zero
Posts: 37
Joined: Tue Dec 25, 2012 2:13 pm

Re: [Tool] FTL Ship Editor: Superluminal - b23-2-13

Postby Weltall Zero » Sun Feb 24, 2013 9:58 am

kartoFlane wrote:@Weltall
Huh. It's working fine for me. What weapon are you trying to choose?


Any weapon on the list, it happens with all of them.

Edit: I just solved it; the path to my resources folder was wrong. This was because, before your last update, it made no difference whether it was right or wrong in regards to loading an existing, in-game ship. Now that I've corrected it, I've been able to load default ships with their graphics as well. :)

The one thing that makes it slightly confusing is the fact that for the data.dat unpacked folder, you have to select its /data subfolder, while in the resources case, you need to select the root folder. I think you should maybe perform a check that everything expected is in the selected folders, and pop up a dialog if it's not (if you could even point ot what was expected and not found, it'd be even better). The way I would do it is, first, asking for data.dat's root folder, not the /data subfolder (for orthogonality). Then, on selection, check that the /data subfolder (in data.dat's case), and /img, /fonts and /audio subfolders (for resources.dat) are in there.

kartoFlane wrote:Edit: starting power; not exactly sure what you mean by that. If you want to change a system's starting level or whether its preinstalled or not, you can do this by double-clicking on a room that has this system; a window will appear and you'll be able to change the values there.


Awesome, that's exactly it. :D I stupidly missed it even though it's right there in the tooltip. Thanks a lot!

One thing, I've had a peek at your code, and I have a couple of suggestions. I hope this is not felt as rude; feel free to ignore them in any case.

1) You have a pretty elaborate piece of code for loading/saving settings from the .ini. I would point you towards the Preferences standard java class, which makes saving, loading, partial loading and default setting file creation really easy and robust.

2) There are quite a few uncaught null pointer exceptions in the program that make the entire thing crash and close, which is a bit unfriendly. One of this is the aforementioned weapon loading when there's no valid path to the weapon image file. The thing is that you already have exception handling for IOException and such, so I would recommend one of two things: ) Initialize all path string variables to "" rather than null; that way, they'll throw "file not found" exceptions when trying to address a file with them.
b) Simply capture NPE and treat it the same way you do with the others.

Again, amazing work, you don't know how much this means for me and the FTL community at large. I expect this editor to bring a big increase in the number of user-created ships in the future. :)

Edit: OK, there IS another issue I forgot. For some reason, the Cloak graphic is getting stretched, even though it is a perfect match of my hull graphic (same dimensions, etc.). Any clue why that might be?

Edit2: Actually, that a problem with the floor image as well. I made one using a capture from the editor as the basis, and it was actually stretched when I imported it on the editor. Interestingly, the stretch ratio seems to be the same as the cloak image.