Ship Editing

Discuss and distribute tools and methods for modding. Moderator - Grognak
shark
Posts: 169
Joined: Thu Nov 08, 2012 10:11 am

Re: Ship Editing

Post by shark »

thashepherd wrote:Well, shark, your answer was better than mine - something tells me you're already tearing up stack overflow :)
http://stackoverflow.com/users/1101692/shark :) it's not like its 15 or 150k. but its a start.

@Flypaste:
please post complete code blocks; it will be easier to explain the whole thing to you on a concrete example than pull things out of context.

for all i know that health line says the ship has no medbay.
as far as vertical displacement:

if you put -100 in x, the image will be 100 pixels to the left; thus you will shift it's "center point" a 100px to the right. Essentially you want your picture to be somewhat centered on the screen so you will need to put something there.

let's say you have a ship that is 300px tall and 1200px wide. You would want that to look like

Code: Select all

<img x="-500" y="-150" w="1200 h="300"
and then fine-tune it from there. do note that even though you can always measure weapon mounts from an image and they will use those coordinates; the x and y we mentioned is simply another level of adjustment when it comes to drawing that on the screen.
Roses are #FF0000
Violets are #0000FF
All of our mods
are belong to you.
Flypaste
Posts: 44
Joined: Wed Nov 21, 2012 4:04 am

Re: Ship Editing

Post by Flypaste »

It has a medbay. The health, i think is the ship hull strength, but i dont know for sure. Also, thanks lots for the help with the imagry.
alextfish
Posts: 184
Joined: Sun Sep 30, 2012 2:24 pm

Re: Ship Editing

Post by alextfish »

Health is indeed hull strength. The way I usually spot it is if I use FTLEdit to create a ship layout from scratch, and forget to specify health, it shows as exploding *in the hangar*.

For player ships you should usually leave health=30 like in all the default ships.
Many years ago I created the FTL Starcraft mod: 18 new challenging ships to fly through the FTL universe!, and wrote a tutorial on creating your own FTL ships. They haven't been updated for AE though.
Flypaste
Posts: 44
Joined: Wed Nov 21, 2012 4:04 am

Re: Ship Editing

Post by Flypaste »

I'm adding the AI ships, zoltan and slug. I will be doing 15 HP for the scouts, 20 for the bombers or assault craft, havent decided, and 25 for the one that i dont pick 20 for.

EDIT

Been screwing around some more with it, and my game exploded, would like to know if someone could help me. I havent done the proper positioning for the ship hull image (also havent set a floorplan, i do NOT know if its required) in the game, so if somoene could for me, that would be lovely as well as figuring out why the game exploded. (not the ship in the hanger; the game wont start up)

http://www.mediafire.com/?xasrb539u522srg

NOTE: I am loading it using the mod manager and it is in the proper .ftl format. I just thought uploading it in a ZIP would be easier to manage.
shark
Posts: 169
Joined: Thu Nov 08, 2012 10:11 am

Re: Ship Editing

Post by shark »

You need to have a mental thread of all the things you changed and the order you changed them in... so when your game explodes, unless you have a very good critical judgement and guess what's the problem right off the bat - your best bet is to start undoing changes one by one until you pinpoint the one that made it go off.

Because let's face it, it's either that or reverting to the last backup. Who makes backups you say? Me neither :)

The game really doesn't provide much info I think. So, start commenting out parts of your .append file, it should be easy to hit the error causing one if you try with a binary search ;)
Roses are #FF0000
Violets are #0000FF
All of our mods
are belong to you.
thashepherd
Posts: 194
Joined: Fri Nov 16, 2012 11:45 pm

Re: Ship Editing

Post by thashepherd »

shark wrote:You need to have a mental thread of all the things you changed and the order you changed them in... so when your game explodes, unless you have a very good critical judgement and guess what's the problem right off the bat - your best bet is to start undoing changes one by one until you pinpoint the one that made it go off.

Because let's face it, it's either that or reverting to the last backup. Who makes backups you say? Me neither :)

The game really doesn't provide much info I think. So, start commenting out parts of your .append file, it should be easy to hit the error causing one if you try with a binary search ;)
Heh. That's why I use Git - gives me a good idea of what I messed with since the last time it worked.

IIRC you need a floorplan, but you'll get the Black Square instead of failure to start if you're missing one. Failure to start usually means an error in your XML syntax.

Lately, I've been discovering even more interesting errors. CTD-on-game-start, CTD-on-clicking-'JUMP'-button. That was a fun debug sesh :)
You are the weak, and I am the tyranny of evil men - but I'm trying, I'm trying real hard to be the shepherd.

"Wow, that Kieve guy is one angsty nerd eh."
Sonata - "Best use of Common Lisp in an indie space roguelike!"
shark
Posts: 169
Joined: Thu Nov 08, 2012 10:11 am

Re: Ship Editing

Post by shark »

*shivers* git...

I just take snapshots a-la "rename to .bak1" :D even svn would be somewhat overkill imo. this game doesn't deserve such sophisticated approach :D
Roses are #FF0000
Violets are #0000FF
All of our mods
are belong to you.
boa13
Posts: 808
Joined: Mon Sep 17, 2012 11:42 pm

Re: Ship Editing

Post by boa13 »

You can do very advanced things with git (or svn), and it can be frighteningly complex at first sight, but for simple things, it remains rather simple. ;)
Forum janitor — If you spot spam, PM me the URL and/or the username of the spammer.
I have powers, moderator powers. I am not keen on using them, but will do so if needed.
thashepherd
Posts: 194
Joined: Fri Nov 16, 2012 11:45 pm

Re: Ship Editing

Post by thashepherd »

shark wrote:*shivers* git...

I just take snapshots a-la "rename to .bak1" :D even svn would be somewhat overkill imo. this game doesn't deserve such sophisticated approach :D
I am VERY surprised to hear that from you. It's saved my ass a few times already - well worth it from a time/speed perspective alone.

EDIT: Sonata is ~152mb. The sophisticated approach is quite necessary.
You are the weak, and I am the tyranny of evil men - but I'm trying, I'm trying real hard to be the shepherd.

"Wow, that Kieve guy is one angsty nerd eh."
Sonata - "Best use of Common Lisp in an indie space roguelike!"
shark
Posts: 169
Joined: Thu Nov 08, 2012 10:11 am

Re: Ship Editing

Post by shark »

thashepherd wrote:
shark wrote:*shivers* git...

I just take snapshots a-la "rename to .bak1" :D even svn would be somewhat overkill imo. this game doesn't deserve such sophisticated approach :D
I am VERY surprised to hear that from you. It's saved my ass a few times already - well worth it from a time/speed perspective alone.
I've been doing this for 10 years, i can keep a decent undo stack in my head; after all, it comes from a fact that I know exactly why i'm diving in ;) every time i got a crash i debugged it within 10 minutes by undoing suspicious things i did before the last test. mods are inherently test-driven imo.
thashepherd wrote: EDIT: Sonata is ~152mb. The sophisticated approach is quite necessary.
150megs of which are artistic assets that won't rapidly change once they're done. I really see no reason to version them other than for completeness of the trunk (this is a sort of file that you will always want just one version of - the latest one) :) let's be fair here, we have at best 10 000 lines of code total we can change in this game. you don't really incrementally patch sounds, or branch the flavor of a sound - you just make it and upload it...

on the other hand, if you work in a team a repository starts making much more sense as a syncing tool rather than being a backup solution.
Roses are #FF0000
Violets are #0000FF
All of our mods
are belong to you.
Post Reply