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

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

Re: [Tool] FTL Ship Editor: Superluminal - 5-3-13b

Postby kartoFlane » Fri Mar 08, 2013 6:11 am

@Weltall Zero
Thank you - that's very flattering, actually :)
And good luck with the mods -- hell, I'm even working on one myself right now. Hope you won't lose the steam anytime soon ;)

@speedoflight
What exactly are you clicking? Check the debug.log and post it here, I can't reproduce the error.
As for the coordinates, there could be, though it seems a bit counterproductive to me... Though it shouldn't be too much of a hassle for me to implement a switch to display coordinates in anchor-relative numbers (arbitrary position input boxes notwithstanding, that might not be as straightforward). That, or add another set.

As for moving the ship in hangar, just reduce the offset - i.e., move the anchor closer to the ship. While holding down shift, left-click on the anchor box - you'll be able to reposition it without moving the entire ship.
Generally, the anchor is one grid cell below the FTL's window frame -- uhh, look here - this is part of a screenshot from Superluminal overlaid on top of FTL's hangar. The anchor's position is always the same - approx. 1 grid cell from the top and 9 from the left. The offset is the value that is added to anchor's position to decide the starting point of the ship. In the Kestrel's case, the offset is (0,2).

Hope this helps :)
Superluminal2 - a ship editor for FTL
Weltall Zero
Posts: 37
Joined: Tue Dec 25, 2012 2:13 pm

Re: [Tool] FTL Ship Editor: Superluminal - 5-3-13b

Postby Weltall Zero » Sat Mar 09, 2013 1:57 pm

kartoFlane wrote:@Weltall Zero
Thank you - that's very flattering, actually :)

Just telling it as I feel it. I'm telling everyone I know that plays FTL about Superluminal, too. :)

kartoFlane wrote:As for moving the ship in hangar, just reduce the offset - i.e., move the anchor closer to the ship. While holding down shift, left-click on the anchor box - you'll be able to reposition it without moving the entire ship.
Generally, the anchor is one grid cell below the FTL's window frame -- uhh, look here - this is part of a screenshot from Superluminal overlaid on top of FTL's hangar. The anchor's position is always the same - approx. 1 grid cell from the top and 9 from the left. The offset is the value that is added to anchor's position to decide the starting point of the ship. In the Kestrel's case, the offset is (0,2).

I was thinking about this for a bit. It seems to me there is an optimal anchor point, which leaves the ship centered. Vertically it seems to be about five/six squares above the center of the ship (so, if the ship is 11 or 12 squares vertically, the optimal offset would be 0; at 9 or 10, it would be 1, and so on; my calculation might be a bit off, I should try each value). I'm sure there's a similar formula for horizontal offset too.
I was thinking that perhaps Superluminal could implement a "calculate optimal offset" function? It would be very simple, just measure the ship's dimensions and position the anchor accordingly. What do you think?

Edit: I actually went ahead and measured all playable ships' dimensions and offsets, sorting and tabulating them. Here they are:

Horizontal:
[width]->[X offset] [ship name]
8->5 Man-O-War
9->3 Torus
9->3 Vortex
9->4 Bulwark
9->4 Shivan
11->3 Basilisk
12->2 Noether
12->2 Stormwalker
12->2 DA-SR 12
12->3 Gila Monster
13->1 Adjudicator
13->1 Nisos
13->2 Nesasio
14->0 Carnellian
14->1 Redtail
15->0 Bravais
15->0 Kestrel
15->1 Osprey

Vertical:
[height]->[Y offset] [ship name]
6->2 Noether
6->2 Kestrel
6->2 Bulwark
6->2 Nesasio
7->1 Adjudicator
7->2 Redtail
7->2 Torus
7->2 Vortex
7->2 Shivan
7->2 DA-SR 12
8->1 Man-O-War
8->1 Osprey
8->2 Bravais
8->2 Carnellian
9->1 Nisos
10->0 Stormwalker
10->0 Gila Monster
10->0 Basilisk

The formula seems to be pretty close to the following:
X offset = (16-width)/2
Y offset = (10-height)/2
There is some variation outside these formulae, which can be accounted because of aesthetic reasons (ex. the Man-O-War has most of its mass shifted rightwards because of its trailing "tentacles"), making the two variants of a ship align hull-wise, or simply because of rounding differently.
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: [Tool] FTL Ship Editor: Superluminal - 5-3-13b

Postby speedoflight » Sun Mar 10, 2013 8:14 pm

kartoFlane wrote:@Weltall Zero
Thank you - that's very flattering, actually :)
And good luck with the mods -- hell, I'm even working on one myself right now. Hope you won't lose the steam anytime soon ;)

@speedoflight
What exactly are you clicking? Check the debug.log and post it here, I can't reproduce the error.
As for the coordinates, there could be, though it seems a bit counterproductive to me... Though it shouldn't be too much of a hassle for me to implement a switch to display coordinates in anchor-relative numbers (arbitrary position input boxes notwithstanding, that might not be as straightforward). That, or add another set.

As for moving the ship in hangar, just reduce the offset - i.e., move the anchor closer to the ship. While holding down shift, left-click on the anchor box - you'll be able to reposition it without moving the entire ship.
Generally, the anchor is one grid cell below the FTL's window frame -- uhh, look here - this is part of a screenshot from Superluminal overlaid on top of FTL's hangar. The anchor's position is always the same - approx. 1 grid cell from the top and 9 from the left. The offset is the value that is added to anchor's position to decide the starting point of the ship. In the Kestrel's case, the offset is (0,2).

Hope this helps :)


The debug.log doesnt show anything at all.. thats the first thing i looked into.. but with no luck.

And yes, it will be very useful to change the coordinate system, so i can be for sure that the point 10,20 is the real 10,20. Maybe this is a stupid observation, but almost in my case it will be very very useful.

And sorry for not posting before, i have more experience now with the offsets, and now i know how everything works :lol:

And thanks for the image, that helped, so something great to change in the editor will be that the offset starts in 0,0 and not in 9,1 so we can easily and fast change coordinates without worrying to make maths :) , now, i dont have so much trouble, but like me, people who starts will be crying of headaches if they dont know exactly how everything works.

WetallZero, that will be a great idea. Now, for example, i just did a ship that is big and in the hangar the top and the bottom are not visible lol. But in the start, the ship was placed too far from the top, and i needed to test 5 times before i finally got the ship right in the middle, so u can "almost" see the whole room section. Well, if u could activate an option (just the editor to let u activate or not the function) that makes the maths to place the ship just in the middle will be really great. Only for the vertical offset, since the horizontal offset depends on the ship itself and must be changed manually.
My currently mods / wips ->
ImageImage
User avatar
kartoFlane
Posts: 1479
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tool] FTL Ship Editor: Superluminal - 5-3-13b

Postby kartoFlane » Sun Mar 10, 2013 10:18 pm

I've already implemented the "calculate optimal offset" function, it's working pretty nicely. I've actually gotten it to almost the exact same formula as Weltall Zero did, before I've seen his post, so it seems we've got that right.

As for the (9,1) offset, there's nothing I can do - this is set up by FTL internally. It's impossible to modify it. Anchor will always start at that point, no matter where you place it inside the editor, or what you do to the ship. Anchor's position inside the editor has no influence on anything whatsoever. It's simply for your working comfort to move the ship around.

Also, please tell me what you were doing that caused the crash, so that I can fix it :)
Superluminal2 - a ship editor for FTL
speedoflight
Posts: 660
Joined: Mon Feb 18, 2013 11:08 am

Re: [Tool] FTL Ship Editor: Superluminal - 5-3-13b

Postby speedoflight » Mon Mar 11, 2013 12:19 am

Well, i think the function "calculate optimal offset" is enough, since the most important position of the ship is always the vertical one or the one that use to cause more problems.

About the crash.. i dont think was doing something special, i was just had a ship loaded with floor, hull, shield and cloak images, and i just wanted to reset the vertical offset (i was just testing). So, if im not wrong, to reset the vertical offset u must double click with the right mouse button on the anchor, right? well, i do that, and the editor crashes.

I dunno if its something to do with the image size (it was a little bigger than usual but not too much anyways).
My currently mods / wips ->
ImageImage
User avatar
kartoFlane
Posts: 1479
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tool] FTL Ship Editor: Superluminal - 5-3-13b

Postby kartoFlane » Mon Mar 11, 2013 2:06 am

Huh. Weird. There's literally nothing in the vertical offset's reset function that could cause a crash in the situation you described... Oh, well *shrugs*

As for the optimal offset, it's only calculating the grid offset, it does not take the pixel-vertical offset into account. I suppose it'd be more useful if it included that as well?
Superluminal2 - a ship editor for FTL
Husky
Posts: 14
Joined: Sat Mar 09, 2013 8:50 pm

Re: [Tool] FTL Ship Editor: Superluminal - 5-3-13b

Postby Husky » Mon Mar 11, 2013 5:38 am

how do i save the gibs into the ship so i can edit the rooms?



<made a ship in the editor then i clicked on edit but my gibs wont show :( >

also can i add more then 4 weapons?
User avatar
kartoFlane
Posts: 1479
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Tool] FTL Ship Editor: Superluminal - 5-3-13b

Postby kartoFlane » Mon Mar 11, 2013 11:42 am

Simply switch to another tool, for example the selection tool [Q], you'll be able to edit rooms again. Gibs will then reappear once you click on gib tool [G] (of course, only if you've already added some, or have loaded a ship that has gibs)

And nope, you can't add more than four weapons (in the editor) - adding more than that causes the UI to overlap, bug and generally look rather horrible.
Superluminal2 - a ship editor for FTL
Weltall Zero
Posts: 37
Joined: Tue Dec 25, 2012 2:13 pm

Re: [Tool] FTL Ship Editor: Superluminal - 5-3-13b

Postby Weltall Zero » Mon Mar 11, 2013 9:52 pm

kartoFlane wrote:I've already implemented the "calculate optimal offset" function, it's working pretty nicely. I've actually gotten it to almost the exact same formula as Weltall Zero did, before I've seen his post, so it seems we've got that right.


That's awesome. :) Even if I was a bit late, I'm glad my data/formulae helped double-check yours.

Also, you definitely should make Superluminal's link on your signature bigger and probably the first thing in it, it's something to be hugely proud of. Don't be so modest! :D "Best FTL ship editor ever" would be more accurate, but I guess that would be a bit over the top for yourself.

Hey, I know, I'll change MY signature.
Husky
Posts: 14
Joined: Sat Mar 09, 2013 8:50 pm

Re: [Tool] FTL Ship Editor: Superluminal - 5-3-13b

Postby Husky » Mon Mar 11, 2013 10:41 pm

the gui picture for the room needs a fix :l <a comand room or driver room the seat was way back next toe a corner whitch made no sence> and it's kinda hard to make the room without the gibs showing :(

Besides that Thank you for the very good ship editor and thanks again for the helpful gib thing :3
it's the best ship editor from the other confusing 1 :3

Who is online

Users browsing this forum: No registered users and 47 guests