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

Discuss and distribute tools and methods for modding. Moderator - Grognak
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

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

Postby Vhati » Sat Mar 02, 2013 3:10 pm

Weltall Zero wrote:
xdiesp wrote:Thanks that's nice, I will ask you for such a feature after I can complete my work on the utility.


Unless I'm missing something, couldn't you make it so that your utility packs your xml and txt files into a .ftl file, then open it with Superluminal? A .ftl file is just a renamed .zip, after all.
Or to rephrase, is there a reason someone should have to see/modify the random ship in an editor before starting the game?
Sprute
Posts: 4
Joined: Mon Jan 21, 2013 10:27 pm

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

Postby Sprute » Sat Mar 02, 2013 5:06 pm

I found a bug. crashes in specific situation.

situation :

1. open the superluminal for windows x32
2. File - new ship - player ship - confirm
3. click gib editing tool.
4. add gib
5. browser pop up.
6.closing the browser.
7. process superluminal.exe suddenly end.

debug log
java.lang.NullPointerException
at java.lang.String.<init>(Unknown Source)
at com.kartoflane.superluminal.ui.GibDialog$6.widgetSelected(GibDialog.java:177)
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:446)
at com.kartoflane.superluminal.core.Main.main(Main.java:302)
North people will be liberated in one day... we south korean wont let the dictator Kim's tyranny forever...
UltraMantis
Posts: 2141
Joined: Thu Sep 20, 2012 3:17 pm

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

Postby UltraMantis » Sat Mar 02, 2013 5:42 pm

@ speedoflight

In shipname.xml decrease the x offset by 35 pixels. It should fit about right.
And while you're there. Open the ship base image in MS Paint and read weapon mount coordinates, they should be displayed in the bottom left of the screen. You can enter these coords yourserlf in shipname.xml
Next open shipname.txt and increase X offset by 1 or 2, see if that moves the ship & rooms together further to the right of the screen.

All the .xml and .txt values are explained here: http://ftlwiki.com/wiki/Modding_Ships
Just make ONE change at a time untill you feel you understand what the value controls.
Report spam using the handy Report Button Mod.
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

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

Postby kartoFlane » Sat Mar 02, 2013 6:13 pm

@Sprute
Gaah, that was one hell of a stupid oversight. Got it fixed, thanks

@speedoflight
Huh, weird. If you could send me your ship in an .ftl package (exported straight from the editor, no changes made) that could help me pin-point the issue with hull displacement.
As for image names, it should be naming the files by combining the content of "image" text field in ship properties and adding appropriate suffix (_cloak, _shield, etc). It is possible that I'm accidentally overwriting the variable used to store that name somewhere... Gotta look into it.
Superluminal2 - a ship editor for FTL
xdiesp
Posts: 109
Joined: Thu Sep 27, 2012 9:39 pm

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

Postby xdiesp » Sat Mar 02, 2013 9:10 pm

Weltall Zero wrote:
xdiesp wrote:Thanks that's nice, I will ask you for such a feature after I can complete my work on the utility.


Unless I'm missing something, couldn't you make it so that your utility packs your xml and txt files into a .ftl file, then open it with Superluminal? A .ftl file is just a renamed .zip, after all.


That would be great, but I don't know how to make .ftl files. My way of making the utility is to edit a bunch of files with notepad, and .xml appear readable while .ftl ones are a mess inside.
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

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

Postby speedoflight » Sat Mar 02, 2013 11:00 pm

UltraMantis wrote:@ speedoflight

In shipname.xml decrease the x offset by 35 pixels. It should fit about right.
And while you're there. Open the ship base image in MS Paint and read weapon mount coordinates, they should be displayed in the bottom left of the screen. You can enter these coords yourserlf in shipname.xml
Next open shipname.txt and increase X offset by 1 or 2, see if that moves the ship & rooms together further to the right of the screen.

All the .xml and .txt values are explained here: http://ftlwiki.com/wiki/Modding_Ships
Just make ONE change at a time untill you feel you understand what the value controls.


Well, that helped, but i needed to decrease the xoffset about 50 pixels.. after 1 hour i finally got it... i already tried with the x offset but i must changed other values cuz i never got the position i wanted. In the end i had a lot of values changed and i didnt even write em down before i changed anything lol.

kartoFlane, this is ftl file of the ship, lets see if u can discover something.

https://www.dropbox.com/s/grikhunm2p2gn ... iser.ftl?m
My currently mods / wips ->
ImageImage
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

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

Postby kartoFlane » Sat Mar 02, 2013 11:21 pm

@speedoflight
In animations.xml, weapon entries have the following elements:

Code: Select all

<mountPoint x="#" y="#"/>
<firePoint x="#" y="#"/>

mountPoint displaces the weapon by those values off the weapon mount's location (I presume; I'll be testing this tomorrow), and fire point is the location at which missile appears.
Also, mirror property of weapon mounts changes how the weapon image appears in-game - set to false, an enemy weapon will be drawn to the right of the mount's origin point, set to true - to the left.

I'll look into the hull image issue now.

edit: checked the ship in Superluminal, loaded fine, everything aligned correctly... Didn't change anything in the package and loaded it in FTL, and again, everything was aligned correctly... No idea what happened.
Last edited by kartoFlane on Tue Mar 26, 2013 4:46 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 - b26-2-13

Postby Weltall Zero » Sun Mar 03, 2013 2:18 am

xdiesp wrote:
Weltall Zero wrote:
xdiesp wrote:Thanks that's nice, I will ask you for such a feature after I can complete my work on the utility.


Unless I'm missing something, couldn't you make it so that your utility packs your xml and txt files into a .ftl file, then open it with Superluminal? A .ftl file is just a renamed .zip, after all.


That would be great, but I don't know how to make .ftl files. My way of making the utility is to edit a bunch of files with notepad, and .xml appear readable while .ftl ones are a mess inside.


You can do something as simple as a .bat that zips them all up and then renames the resulting .zip. Just check your .zip utility's command line.

I got an exception that crashed the editor:

java.lang.NullPointerException
at com.kartoflane.superluminal.ui.PropertiesWindow.open(PropertiesWindow.java:178)
at com.kartoflane.superluminal.elements.FTLRoom.mouseDoubleClick(FTLRoom.java:490)
at com.kartoflane.superluminal.core.MouseInputAdapter.mouseDoubleClick(MouseInputAdapter.java:232)
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:446)
at com.kartoflane.superluminal.core.Main.main(Main.java:302)

This can be replicated simply by double clicking a weapon mount point.
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

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

Postby speedoflight » Sun Mar 03, 2013 3:25 am

kartoFlane wrote:edit: checked the ship in Superluminal, loaded fine, everything aligned correctly... Didn't change anything in the package and loaded it in FTL, and again, everything was aligned correctly... No idea what happened.


Thats weird, i tried a lot of times, i even created the same ship from the beginning and i coudnt get it to show aligned in-game...

Anyways, i already fixed everything, but its incredible how writing manually the numbers can give u so terrible headaches :lol: , specially if someone like me doesnt know how the numbers works... but i think the negative numbers is wat is confusing me, since im not used to work with em (not in other games, at least)
My currently mods / wips ->
ImageImage
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

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

Postby kartoFlane » Sun Mar 03, 2013 12:02 pm

I actually happen to have a bat file that does exactly that.

@Weltall Zero
Whoa. This is really weird. The error is actually related to rooms, how you got it with mounts is beyond me. And I can't seem to be able to reproduce it... What exactly were you doing?
That said, I've already fixed it, but still, I can't comprehend how it happened in the first place...

@speedoflight
Well, hopefully I'll be able to find the cause in the future
Superluminal2 - a ship editor for FTL