Custom ship editor: build ships up to size 128x128 (v0.3.4)

Started by kajacx, December 20, 2016, 08:08:52 PM

Previous topic - Next topic

kajacx

NOTICE! There is currently a wierd bug with copying ship data from the PF editor via clipboard. It is easily bypassed by pasting the data into a text editor first and then copying them again. I will hopefully be able to fix this soon, sorry for the inconvinience.

UPDATE to v0.3.4: Integration with CmDisplay: displays custom modules in the ship preview when you mouse over a ship slot, just copy the CmDisplay.prpl script.
UPDATE to v0.3.2: Added a custom modules adder script for NPC ships. Aslo, custom module adder scripts can now be automaticly copy-pasted by setting the map names in the module file.
UPDATE to v0.2.2: Fixed issue with large custom modules.
UPDATE to v0.2.1: Custom modules can now be allowed to collide with other modules (by setting doesCollide:false), plus mirror rotation bug fix.
UPDATE to v0.2.0: Ship parts are here! Create and place entire portions of ships! Saveable Ship parts! Yaaay!
Ship parts
[close]

Have you ever wondered how a 52x47 ship would look like in the ship editor? Well, wonder no more!

How it looks in PF editor


The empty spaces are for custom modules
[close]

But wait, isn't the max ship size 35x25? Well, not anymore. I have been working on a custom ship editor that will enable larger ships, different brush sizes for hull editing, custom modules and mirror modes for symetrical ships. This is how it currently looks like:

How it looks in my editor


You can't see the cursor, but I'm placing the top Bertha while the bottom bertha is getting mirrored. That's why it's half-transparent.
[close]

Features:

  • Build ship with maximal size of 128x128.
  • Import/export ships from/to default PF editor back and forth with 3 clicks (and one alt-tab).
  • Place custom modules on your ship like any other module. Automaticly generates a moduleAdder.prpl script, similar to planetfall's master script on save.
  • Use different brush sizes for hull editing.
  • Use mirrors to easily build symetrical ships. Works with both hull and modules.
  • Works on Windows, Mac, and Linux (you need mono on Mac and Linux for saving ships to the .dat file).
  • Handy shortcuts like shift+mouse wheel to change hull type and selected module, or alt+mouse wheel to change the brush size.
  • In-program tutorial controls and on how to import/export ships.
  • An option to make your ship build instantly (without PRPL) or to add the CommandHQ module.
    How does that work?

    Adding the HQ command module to your ship does the following:

    • As long as your ship is in game, your energy sourcer will work (as if your actual HQ was in game), even when your actual HQ isn't in game
    • You will receveive the alarm sound when your ship is attacked
    • The ship will be destroyed if (any of) the HQ command module(s) is destroyed
    • Create, save and use entire portions of the ship as ship parts. Works with mirrors.
    • You can place the HQ command module over other modules, just like in the vanilla PF ship editor (wait, what?)
    Adding HQ command module to your ship will not make it insta-spawn. For that is there is a separate checkbox, independednt of whether or not you have HQ modules on your ship. Checking the autobuild checkbox will make the ship build instantly with full hull and energy, no need for PRPL. You can even upload such auto-building ship to the online shipyard.
    [close]

How it looks in-game:
Spoiler
[close]

Finally, large ships take forever to build. You could use something like
<-shipID CONST_SHIP_CMBUILTAMT <-shipID CONST_SHIP_CMCOST GetShipAttribute 1 sub SetShipAttribute
to insta-build them, however I would discourage that, instead a slight modification could be used to merely speed the cosntruction of the Command module instead of outright instabuilding.

Also I forgot to mention, this project is open source, feel free to view my terrible programming habbits at your leisure.

Finally, the program runs in Java 8, so I hope you have that installed, other that that... enjoy! Suggestions welcomed.
Why do work yourself, when you can write a program that will do the work for you.

Dark Ambition


GoodMorning

Please put the code for that up when you're done.

Also, what's the PRPL+ tab useful for?
A narrative is a lightly-marked path to another reality.

kajacx

The "PRPL+" tab is for my extension of the PRPL language that has local variables, script including and multi-line comments. The compiler already works, I just need to create some basic GUI where your can select you particlefleet folder and display compile errors, it's probably comming this week, as a christmas present to the PF commnity :3
Why do work yourself, when you can write a program that will do the work for you.

GoodMorning

Well, I'd still argue against locals, but I hope that V can use some of your editor code.
A narrative is a lightly-marked path to another reality.

Sorrontis

"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

GoodMorning

On second thoughts, don't put it up, I don't know if the game will properly handle ships that large. And we don't want overlarge ships just for the sake of it. People already build unnecessarily large ones.
A narrative is a lightly-marked path to another reality.

Nicant

CW4 hype!!

kajacx

I have tested the ship from the screenshot in level editor, seemed to work fine, however I agree that needlessly large ships can be a problem, for example they can't even accept energy fast enought to replenish ammo, not to mention they take forever to build.

These issues are fixable with PRPL, moreover the ship from the screenshot is meant to be an ultimate weapon that will defeat a boss in a map that I plan to make some day (spoiler: I will never get around to acctually make it), only consructable in the last stage of the game.

So I will leave the decision wether or not to use my program to the mapmakers, unless these ships cause crashes or massive lag, in which case I will pull it off.

One more idea: consider a massive hollow shield, that can be used as movable city wall, that could be interesing. Banning the program because some people coukd use it to create needlessly large ship isn't good enough reason for me to prevent other people with great ides from having it.
I hope you understand my resoning.
Why do work yourself, when you can write a program that will do the work for you.

GoodMorning

Certainly. I just ask that you move with caution. (Personally, my first response was "gimme gimme", as of Ogun to a very large gun.)
A narrative is a lightly-marked path to another reality.

Sorrontis

Let's not forget that massive ships take a lot of computational power. This is fine for newer rigs, but we have to be careful so that we don't destroy the game for those with lower specd computers.
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

FOXX

I don't know how ships that large work in the game and they must take some time to build but i like this idea very much.
Good luck with your project Kajacx
The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

TonnyT

Dear lord, that seems a bit excessive.
Nevertheless, great work.
Novus Imperium Corporation
CEO: Tony Carlisle

Today our concern must be with the future. For the world is changing. The old era is ending. The old ways will not do.

-President John Fitzgerald Kennedy

Keeper Decagon

Alright, so I couldn't help myself and I had a bit of a play with the editor. I didn't go too mad, but I did make this:

Spoiler


HQ is in there for scale.
[close]

As you can see, I originally had an assorted bunch of ships that slotted together to form a bigger one, the Scaffold, using the standard editor. That left it with some downsides, like unable to move efficiently as one, etc.

Now, I have used this new editor to glue this amalgam of parts together to form a whole, which I'd say looks and works far better than the separate parts did. So yeah, pretty happy with this.

All I can say is, a big thanks to kajacx for making my Scaffold look pretty. :D
"For me, there is no honour or glory. No praise to be had for what I do. I fulfill my purpose for the protection of all... neither of us are going to make it out of here alive." - ?? ??, 145th CE

Zoura3025

I like this. I like this a lot. If this was official dlc, I would buy it. I might download and try it later,
(09:06:07) Zoura3025: But for us diehard fans: "Time is Sanity"