[Save Manager] FTL Homeworld AE -v3.1

Distribute and discuss mods that are functional. Moderator - Grognak
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: [Program] FTL SpaceDock

Postby Vhati » Sun Jul 28, 2013 10:43 pm

iceburg333 wrote:I'm having trouble figuring out how to construct my dummy save so that it's not null. I am looking into better understanding hashmaps. My current theory is that the parser is reading the kestrel blueprint and expecting more doors than their are, so I'm going to try to reverse engineer it to have the doors it expects... :geek:

Check out SavedGameHangarPanel.java in the editor.

It's got a method called createShip(ShipBlueprint shipBlueprint, boolean auto), which fills everything based on a desired blueprint.

You'll need to copy and edit it though, to make it accept an arbitrary gameState to alter, and to remove the warning popup that only makes sense inside my app.
User avatar
kartoFlane
Posts: 1488
Joined: Mon Jan 14, 2013 10:20 pm

Re: [Program] FTL Homeworld

Postby kartoFlane » Sun Jul 28, 2013 10:58 pm

Wouldn't it be easier to just dump an ArrayList<String> of blueprint names to a file instead? Since you only need to store what items the player has stored (unless you also want to store spare fuel, missiles and drones -- even then, it only requires a slight modification)

It'll also help avoid the awkward situation where some players will try to play the homeworld.sav
Superluminal2 - a ship editor for FTL
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: [Program] FTL Homeworld

Postby Vhati » Sun Jul 28, 2013 11:05 pm

kartoFlane wrote:Wouldn't it be easier to just dump an ArrayList<String> of blueprint names to a file instead? Since you only need to store what items the player has stored (unless you also want to store spare fuel, missiles and drones -- even then, it only requires a slight modification)

I almost suggested that, then deleted my post when I re-read the goal.

iceburg333 wrote:My idea is that a ship can store unlimited drones, crew, weapons, augments, scrap, etc

Cargo is a simple list of string ids, and a text file would be trivial for that.
Serializing a variety of stuff would mean making up a new file format. *shrug*

kartoFlane wrote:It'll also help avoid the awkward situation where some players will try to play the homeworld.sav

That name could be specifically excluded from the GUI, or it could be named something that wouldn't appear anyway, like homeworld_cargo.dat.
Last edited by Vhati on Sun Jul 28, 2013 11:13 pm, edited 1 time in total.
roza4567
Posts: 6
Joined: Sun Jul 28, 2013 11:00 pm

Re: [Program] FTL Homeworld

Postby roza4567 » Sun Jul 28, 2013 11:11 pm

just quickly, I downloaded this and profile editor and got both configs. I selected the directory for homeoworld and now it doesn't work :S. I double click the jar and it just doesn't start. I got the latest java, and the required programs and have selected the right files/directories. What is happening? I want to use it :(
iceburg333
Posts: 67
Joined: Tue Jun 25, 2013 8:52 pm

Re: [Program] FTL Homeworld

Postby iceburg333 » Mon Jul 29, 2013 1:17 am

BAH! I've been spamming refresh as I've worked and not seen any new posts. I didn't notice the 5th page in the corner. Gosh! lol. I'll update this post as I go through....

roza4567 wrote:just quickly, I downloaded this and profile editor and got both configs. I selected the directory for homeoworld and now it doesn't work :S. I double click the jar and it just doesn't start. I got the latest java, and the required programs and have selected the right files/directories. What is happening? I want to use it :(

Hi Roza! I'm new at this too, so I'm not good at troubleshooting. Did you download 1.2? Are you using windows? Try deleting the homeworld cfg file and trying again.

Vhati/ KartoFlane:
Vhati wrote:Check out SavedGameHangarPanel.java in the editor.

That's exactly what I needed! I should have thought to look there *facepalm*. I'm going to get right on trying to implement that...

I like my idea of a dummy ship, and I've got Spacedock to not recognize it as a valid file. I considered using something like KartoFlane's blueprint idea (though my idea was less smart), but then I realized that using a ship model would allow me to easily trade between ships, and not have to write a new parser.
"(unless you also want to store spare fuel, missiles and drones -- even then, it only requires a slight modification)" - Would be storing all of that. Take a look at this picture:
(in case it cuts off, here's the link to facebook)
Image
The Trading With combo box will list your other ships, and as well as the spacedock cargo bay.
Does that make sense/ would it be better to use xml/why?
Image
roza4567
Posts: 6
Joined: Sun Jul 28, 2013 11:00 pm

Re: [Program] FTL Homeworld

Postby roza4567 » Mon Jul 29, 2013 1:24 am

Hi Roza! I'm new at this too, so I'm not good at troubleshooting. Did you download 1.2? Are you using windows? Try deleting the homeworld cfg file and trying again.

yes I have done that. twice. and i did download 1.2. I'll try it again though. maybe a hidden conflict with profile editor and FTL homeworld since the both "share" the same save file? and lol, i was spamming refresh waiting for a reply. BTW when will the next update come? maybe you should release a beta version for mod devs? the cargo bay is an epic idea
iceburg333
Posts: 67
Joined: Tue Jun 25, 2013 8:52 pm

Re: [Program] FTL Homeworld

Postby iceburg333 » Mon Jul 29, 2013 1:51 am

roza4567 wrote:
Hi Roza! I'm new at this too, so I'm not good at troubleshooting. Did you download 1.2? Are you using windows? Try deleting the homeworld cfg file and trying again.

yes I have done that. twice. and i did download 1.2. I'll try it again though. maybe a hidden conflict with profile editor and FTL homeworld since the both "share" the same save file? and lol, i was spamming refresh waiting for a reply. BTW when will the next update come? maybe you should release a beta version for mod devs? the cargo bay is an epic idea

I'm sorry! I'm still learning, so I can't answer with much confidence. One thing that I've tried is to run it through a bat file. Are you familiar with that? Use a text editor and copy these lines in:

Code: Select all

java -jar FTLHomeworld.jar
pause

Then name it start.bat and put it in the folder with FTL Homeworld.jar. Bat's can't seem to do spaces (or I don't know how), so rename the jar to match what you wrote in the bat ("FTLHomeworld.jar"). Then doubleclick the bat and see if it gives you any errors. If so copy them so I can have a look. :)

-------
Vhati and KartoFlane:
Thank you! I got the ship constructor working by using the creatship. It's really crude/messy still but it seems to work perfectly/functionally. :D (I need to update how it updates the cfg, but otherwise the important part works. Thanks!
I'm going to test it/ improve on the cargobay UI. Here's my working code FTLHomeworld.java on github, lines 279 and 532.
Thanks!

roza4567 wrote:BTW when will the next update come? maybe you should release a beta version for mod devs? the cargo bay is an epic idea
Thanks! I really like how it looks, but at this point that's all there is too it! I need it to read the tradeship's data (shouldn't be hard) and then make it so they can update each other (more time). Until then there's no point releasing a beta because it would be 0% functional. However, I have been working on this for some time, and just have been hiding the cargobay tab, (so the wip cargobay tab is actually in 1.2) so if I need to update the main before this is done I can continue to do that. :D
Image
roza4567
Posts: 6
Joined: Sun Jul 28, 2013 11:00 pm

Re: [Program] FTL Homeworld

Postby roza4567 » Mon Jul 29, 2013 2:00 am

I'm sorry! I'm still learning, so I can't answer with much confidence. One thing that I've tried is to run it through a bat file. Are you familiar with that? Use a text editor and copy these lines in:

apologies but copy into what file?
iceburg333
Posts: 67
Joined: Tue Jun 25, 2013 8:52 pm

Re: [Program] FTL Homeworld

Postby iceburg333 » Mon Jul 29, 2013 2:02 am

roza4567 wrote:
I'm sorry! I'm still learning, so I can't answer with much confidence. One thing that I've tried is to run it through a bat file. Are you familiar with that? Use a text editor and copy these lines in:

apologies but copy into what file?

Haha, no problem at all. You need to make a new text file. So open notepad, copy those lines into notepad, and then save notepad as "start.bat" and then move the .bat file to wherever the jar file is, and double click the bat file. :D
roza4567
Posts: 6
Joined: Sun Jul 28, 2013 11:00 pm

Re: [Program] FTL Homeworld

Postby roza4567 » Mon Jul 29, 2013 2:04 am

java -jar FTLHomeworld.jar
pause
Pasted it, but it just comes up with an error:
java -jar FTLHomeworld.jar
pause is not recognised as an external command