Operation: Clonebay

Discuss and distribute tools and methods for modding. Moderator - Grognak
User avatar
5thHorseman
Posts: 1669
Joined: Sat Mar 02, 2013 2:29 am
Location: On the bridge of The Potential
Contact:

Re: Operation: Clonebay

Postby 5thHorseman » Wed Mar 18, 2015 7:44 pm

preflex wrote:-snip "haunted" idea-

I hope to use this exact scenario as one of the examples for the documentation, when it's ready.


I hope to use this exact scenario to update the Black Opal some day. Seriously I'd put that ship in exactly as-is with the Haunted augment instead of the reworked Engi Medi-bots. Well and maybe an O2 room and Humans instead of Ghosts as crew. And... No. I'll stop there. Let's just say I want that.

Also, I should really update that ship to AE. It was almost a year ago that I said I would "most assuredly" do it.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
User avatar
stylesrj
Posts: 3644
Joined: Tue Jul 08, 2014 7:54 am
Location: The Shrike
Contact:

Re: Operation: Clonebay

Postby stylesrj » Thu Mar 19, 2015 11:37 am

Sounds interesting. Can things like multiple fights in the same beacon occur (so you defeat one pirate, loot it and then you battle a second pirate who shows up and loot that too. Or encounter like 5 of them, one after the other until you either run away or defeat them all for massive gains!).

Or will it stay a bit more true to FTL spirit and not screw you over like that and just allow things like custom ships and races (which is what most people want... that and hijacking enemy ships)
preflex
Posts: 20
Joined: Sun Mar 01, 2015 2:19 pm

Re: Operation: Clonebay

Postby preflex » Thu Mar 19, 2015 3:14 pm

w00t! It works now on my Raspberry Pi model B running Raspbian Jessie! It's a little sluggish, but I think, in the long run, it will be playable. Gotta' watch memory usage. On the rpi2, it should be smokin', but I haven't had a chance to test on one yet. Ships are drawing a lot better too. Mostly just need to use the masks properly, and do the doors. Teleporters and clonebay are sorta' complicated to draw. What it's doing right now isn't exactly correct. Source on github is up-to-date.

5thHorseman wrote:
I hope to use this exact scenario to update the Black Opal some day.


Nice ship! Do you mind if I use it as an example for converting existing mods for use with this?

stylesrj wrote:Sounds interesting. Can things like multiple fights in the same beacon occur (so you defeat one pirate, loot it and then you battle a second pirate who shows up and loot that too. Or encounter like 5 of them, one after the other until you either run away or defeat them all for massive gains!).

Or will it stay a bit more true to FTL spirit and not screw you over like that and just allow things like custom ships and races (which is what most people want... that and hijacking enemy ships)


Multiple fights in the same beacon? I'm not sure why this isn't already possible in vanilla FTL. While I haven't thought about it much, it should be able to have another ship event as the result of destroying/depopulating a ship. I don't see why Clonebay wouldn't be able to support this. I'll be doing a lot more work on events over the next few days, so I'll be able to give a clearer answer soon.

I'm not sure how staying true to the FTL spirit involves not screwing you over. FTL is all about screwing you over. That said, I plan to (mostly) only do vanilla FTL rules by default, with any big, game-changing enhancements as settings. I'll try to include some of the most obvious/popular ideas, but I don't want to be a dictator. That's why I'm including scripting. If a mod makes changes you don't like, don't use that mod (or take apart the mod, and only use the parts you like).

As I see it, restricting modders to only being able to add ships and races would be screwing them over, and is not the spirit of Clonebay.

Image

Anyhow, enough chit-chat for today. Time spent over here is time spent not coding!
User avatar
stylesrj
Posts: 3644
Joined: Tue Jul 08, 2014 7:54 am
Location: The Shrike
Contact:

Re: Operation: Clonebay

Postby stylesrj » Thu Mar 19, 2015 6:21 pm

Multiple fights in the same beacon? I'm not sure why this isn't already possible in vanilla FTL. While I haven't thought about it much, it should be able to have another ship event as the result of destroying/depopulating a ship. I don't see why Clonebay wouldn't be able to support this. I'll be doing a lot more work on events over the next few days, so I'll be able to give a clearer answer soon.


Maybe because what happens if you depopulate a ship? How do you get rid of it short of jumping away? But then again it's probably a hardcoded thing.

-----------------------

I know FTL is all about screwing you over, but I mean that FTL isn't about screwing you over by providing too many fights at the same beacon.
Actually that's just as bad as going from a fight in one hazard zone to another fight in another and then after leaving that second one, jumps 3 and 4 and 5 are also hazard zones. So by the time you're limping to a store, you've got 300 unspent Scrap.

Which now I ask if this is possible:

Boarding events that have an end. So after defeating the enemy intruders, you get an event that says "Hey more intruders! Enjoy!" or even "You've defeated the intruders. Wanna go blow up their station?" which then may lead to a pirate ship battle all at the same beacon.

And inevitably a question leads to more questions:

Midbattle, you realise everything's not going well. Your boarding team is cloning back, half the ship is breached and on fire from some annoying missile strikes and you have no evasion. If this keeps up, you're going to die.
Could a button be added to wave the white flag? Surrender cargo and hopefully be left with your life (then after they take it, you patch up the ship, get the team together and launch a sneak attack and get your cargo back!)
User avatar
5thHorseman
Posts: 1669
Joined: Sat Mar 02, 2013 2:29 am
Location: On the bridge of The Potential
Contact:

Re: Operation: Clonebay

Postby 5thHorseman » Thu Mar 19, 2015 7:26 pm

preflex wrote:Nice ship! Do you mind if I use it as an example for converting existing mods for use with this?

Not at all. Assuming I get around to it after you get around to it, then by all means :D

preflex wrote:Multiple fights in the same beacon? I'm not sure why this isn't already possible in vanilla FTL.

I personally suspect this was more of a balance thing. First off, the "multiple hazards" scenario is *rare*, and it sucks really bad to just have 2 of them most of the time. Secondly, the entire game is balanced by the advancement of the Rebel Fleet. Having too many multiple encounters in the same system with no fleet advancement could be balance breaking. Even allowing the flee to advance could be balance breaking because you're opting between jumpng to a star that could be empty, or a battle you know will net you some scrap.
My Videos - MY MOD HUB
Simo-V - The Potential - Automated Scout - "Low O2" Icons
The Black Opal - The Asteroid - The Enforcer - The Pyro

"Every silver lining has a cloud..."
preflex
Posts: 20
Joined: Sun Mar 01, 2015 2:19 pm

Re: Operation: Clonebay

Postby preflex » Thu Mar 19, 2015 7:36 pm

Backported! Should work on any Python 3.x with Pygame!

That means it should now run out-of-the-box (with the patched gamepack) on Raspbian Wheezy (but I haven't tested yet), since recent Wheezy images include python3-pygame by default (Since Dec. 2014, I think).

It should also work on Windows now. I'll be doing some testing soon. Then, I'll edit the 1st post with clearer instructions and some updates. Getting close to v0.1. (I might skip drawing doors for 0.1, and worry about them when I start working on crew moving around).

Also, some progress on events, and drawing the main game scene so far today.

Everything has been pushed to github.

EDIT: Ok. I've had enough of Windows for today ...
It launches
It loads the patched xml and text files for the ships
Then it chokes on some of the other XML files (starting with dlcSounds, for me. Python is weird, so it might be different for you)

Code: Select all

UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 149552: character maps to <undefined>

Not sure what the issue is. Difference between newlines on *nix and win? Patches not applying right?

Here's how to crash:
Tested on Microsoft Windows 7
Note: If you're afraid of the command line, Clonebay isn't ready for you yet.
Note: If you're not afraid of the command line, Clonebay still isn't any fun, unless you think programming is fun.
Note for me: file = open(filename, encoding="utf8")
1. Install Dependencies
1a. Install Python v3.2.5 32-bit
Get it here:
https://www.python.org/ftp/python/3.2.5 ... -3.2.5.msi
Note: Python 3.2.5 is the latest binary release of Python that will work with downloadable pygame packages
If you want/need to use Newer python, you will have to compile pygame yourself.

1b. Install Pygame 1.9.2a0 for Win32 and Python 3.2
Get it here:
http://pygame.org/ftp/pygame-1.9.2a0.win32-py3.2.msi

1c. Get Git
Download from this page:
http://git-scm.com/download/win
Install it:
Selecting "Use Git from the Windows Command Prompt" seems reasonable to me.
Selecting "Checkout Windows-style, commit Unix-style line endings" is probably for the best. (Or it also might be why it's crashing.)


2. Download Clonebay
open up a Windows command prompt:
(I have only tested this in the root directory of drive C:. If you put this somewhere else (as you should), you're on your own.)

Code: Select all

cd c:\
git clone https://www.github.com/Preflex/Clonebay


3. Download Patches

Code: Select all

git clone https://www.github.com/Preflex/Clonebay_Gamepack

TODO: MOVE THE PATCHES!

4. Unpack FTL game files resource.dat, data.dat
I used FTL UnPacker
viewtopic.php?f=4&t=2788
Requires Java
http://java.com/en/download/

5. Build gamepack.
copy all the files you extracted from data.dat (*.xml *.txt) into c:\Clonebay\Clonebay\Game\gamepacks\FTL\data\
copy all the directories (audio, img, font) into c:\Clonebay\Clonebay\Game\gamepacks\FTL\

6. Patch Data

open up git bash from the start menu.

Code: Select all

cp /c/Clonebay_Gamepack/data.patch /c/Clonebay/Clonebay/Game/gamepacks/FTL/data
cd /c/Clonebay/Clonebay/Game/gamepacks/FTL/data
patch -Rp0 < data.patch


7. Make a couple edits:
For some reason python seems to hate my src.$FILE paths.
Fix them in each of the .py files
in Launch.py, and each of the src/*.py files (except xmltodict and pathlib) remove "src." from any of the imports at the top.

8. Crash Clonebay!

Code: Select all

cd c:\Clonebay\Clonebay\Game
c:\Python32\python.exe Launch.py
Last edited by preflex on Fri Mar 20, 2015 1:18 am, edited 5 times in total.
preflex
Posts: 20
Joined: Sun Mar 01, 2015 2:19 pm

Re: Operation: Clonebay

Postby preflex » Thu Mar 19, 2015 9:10 pm

stylesrj wrote:Which now I ask if this is possible:

Boarding events that have an end. So after defeating the enemy intruders, you get an event that says "Hey more intruders! Enjoy!" or even "You've defeated the intruders. Wanna go blow up their station?" which then may lead to a pirate ship battle all at the same beacon.


Ok, I understand you now.

1. I won't change the way the FTL gamepack works. I won't be modifying the events. If you only play with the FTL gamepack, that won't happen. Eventually, you won't have to load the FTL gamepack if you don't want to.

2. Modders will be able to do this kind of stuff if they want. If an existing mod does crazy stuff in FTL, it will still do crazy stuff in Clonebay. I'm not an enforcer, I'm an enabler. If mods do stuff you don't like, you can choose not to play the mod, or modify the mod. Modifying mods will be moderately easier with Clonebay.

3. The Clonebay gamepack, a separate, but related project (a looooong way off ...), may eventually include this kind of stuff if it's done in a balanced way. You won't have to load the Clonebay gamepack if you don't want to.

Furthermore, (but not really related to your question)
4. Eventually, with the right collection of mods, you might not even technically need any base gamepack at all, if the data and resources provided by those mods are enough to play the game. i.e. the kind of stuff provided in sectorData.xml, events.xml, a player ship, an enemy ship, and any blueprints, images, or sounds that would be requested by those items.

This is how I actually plan to build the clonebay gamepack: Find the best mods and (if licensed appropriately) incorporate them in a way so that they can work without the FTL base files. Captain's edition looks attractive, it has lots of great stuff and a Creative Commons license. It's mostly a matter of fixing KeyErrors by either finding existing content to plug the hole, or writing replacement content. However, I do not intend to start on this task until the FTL gamepack is playable.
User avatar
Sleeper Service
Posts: 2305
Joined: Sun Mar 24, 2013 8:49 pm

Re: Operation: Clonebay

Postby Sleeper Service » Fri Mar 20, 2015 11:01 am

Interesting project. You might be a little late to the party though. I also feel like a lot of people are already deterred by the need to download a mod manager, therefore I think the more steps are necessary to get your modded game working the smaller your userbase will get.

You obviously won't be allowed to redistribute the vanilla gamepack. I guess clonebay could be told where your vanilla install is located and use its data as a basis? CE could serve as a standalone game-pack, but taking away vanilla is like taking away the tree the CE treehouse is build around. CE adds about the amount of events the base game has I think, but it makes only up for about 50% the ships and it only adds very few music tracks and soundeffects. This is integral stuff to make the game playable and if clonebay should work without vanilla assets then you'll need that stuff to come from elsewhere. The amount of work that would take would essentially reach that of making a standalone game and would result in a game that is fundamentally different from FTL anyway. I mean you are making an engine here, right? And you need to recreate a ton of assets to make it "legal" as a standalone, but as modable as desired by the constantly dwindling FTL community. Why not do away with the whole FTL stuff and make a standalone game? Just a thought, you can do whatever you want of course. :D But even if clonebay comes life in half a year or so there would still be the need to actively encourage people to actually mod the game and use the standalone thing instead of the vanilla deal.
User avatar
TheFallenAngel359
Posts: 111
Joined: Fri Feb 13, 2015 8:22 pm

Re: Operation: Clonebay

Postby TheFallenAngel359 » Fri Mar 20, 2015 5:35 pm

I've always wanted to add new systems to the game, such as a "Cargo Bay" system that could be used to transport goods for trading purposes (a la CE). Would this be possible through Clonebay? I don't see why not, but it may be a programming limit.
Image
preflex
Posts: 20
Joined: Sun Mar 01, 2015 2:19 pm

Re: Operation: Clonebay

Postby preflex » Fri Mar 20, 2015 5:41 pm

Last night, I did some initial work on Fremantle support. That's going to be really hard. No pygame for Python3, and no libsdl1.2-dev to compile it. Then, there's all the concerns regarding the 800x480 display. It's gonna' be a tight fit. I'll need to make the enemy ship view dockable, and reorganize the UI, but hey, that's why i'm making Layouts!

Also, I've been experimenting with pickle, to handle gamesaves, and speed up loading time. It's pretty sweet.

Sleeper Service wrote:Interesting project.


Hi. I'm glad you dropped in to chat. Thanks!

You might be a little late to the party though.


And that's a good thing, too! The FTL community has already documented a lot of the information I need to figure out.

I also feel like a lot of people are already deterred by the need to download a mod manager, therefore I think the more steps are necessary to get your modded game working the smaller your userbase will get.


I agree. At the moment, it's a major pain in the ass. You need to use command-line tools just to install it. Windows/Mac users generally *hate* the command line. I think py2exe should handle windows packaging pretty well, but I'll need to look into it.

In the long-term, there will be no need for a separate manager. Clonebay will keep track of all the mods available to it, and allow you to select which ones are applied when you click "New Game". I'll probably build the FTL importer into it too. IIRC, there's a python-based unpacker somewhere. I do not want to bring in Java dependencies.

You obviously won't be allowed to redistribute the vanilla gamepack. I guess clonebay could be told where your vanilla install is located and use its data as a basis? CE could serve as a standalone game-pack, but taking away vanilla is like taking away the tree the CE treehouse is build around. CE adds about the amount of events the base game has I think, but it makes only up for about 50% the ships and it only adds very few music tracks and soundeffects. This is integral stuff to make the game playable and if clonebay should work without vanilla assets then you'll need that stuff to come from elsewhere. The amount of work that would take would essentially reach that of making a standalone game and would result in a game that is fundamentally different from FTL anyway.


Yes, it is a Sisyphean task. Short-term plans for the Clonebay Gamepack are just to get something together that will let you jump around without it crashing because it couldn't find something it needed. Probably just a handful of assets to start. A really nice, fleshed-out version would take a very long time, I would expect.

If you're running on obscure hardware, you might want to know that the software works, before you spend the money to get Subset's proprietary data. In this way, the Clonebay Gamepack will also function as a 'demo' version.

I mean you are making an engine here, right? And you need to recreate a ton of assets to make it "legal" as a standalone, but as modable as desired by the constantly dwindling FTL community. Why not do away with the whole FTL stuff and make a standalone game?


Because, If I do that, I still won't be able to play FTL on my Raspberry Pi, or my n900, or my Archlinux tablet, or (a looooong time from now) Android. This is some pretty niche stuff. Support for stuff like Windows and MacOS, where FTL already runs just fine, is mostly an afterthought: merely a result of Python's wide compatibility. I'm scratching my own itch, but in the process may also soothe some of yours.

Of course, one of the reasons I am rewriting FTL is to gain insight for building my own game. FTL is clearly-defined, and already has lots of great assets, so for now, I can just focus on the programming and watch a great game take shape right before my eyes. It has already been, and will continue to be a valuable learning experience. Hopefully, my work on Clonebay will gain me a good enough reputation with the FTL community, that some of you would consider supporting me in my own endeavours.

Just a thought, you can do whatever you want of course. :D But even if clonebay comes life in half a year or so there would still be the need to actively encourage people to actually mod the game and use the standalone thing instead of the vanilla deal.


If it's the only option to play FTL on your platform (Raspberry Pi, etc.) it won't require a lot of encouragement beyond a notice that exists. Some rpi gamers will be pretty stoked. (No, HumbleBundle's asm.js thing doesn't cut it)

But a cool thing about free software, is that it can show up anywhere. If it winds up in the Debian repositories, (and therefore, by extension, Ubuntu, Mint, etc.) people who have never heard of FTL will play it for decades to come. If so, it will have good company, with clones like FreeCiv, OpenTTD, OpenArena, ScummVM, OpenRA (Well, I don't think that's in Debian yet), and countless others.

Thanks for your feedback!

Who is online

Users browsing this forum: No registered users and 53 guests