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

GoodMorning

Yes. What I am wondering is what the other information might represent. For example, the first 22 bytes are seemingly constant, and it seems unlikely that they would be included of they did not represent something. Given that the various parts of the data which have had their purposes divined were useful or informational ("Ship" in "Ship#" seems to be for clarity) I was asking if the same encoding scheme yielded a meaningful string, or whether the data was for some other purpose.
A narrative is a lightly-marked path to another reality.

Qihao56

Hey Kajax can you please make a command for one of my ships? I dont know programming AT ALL so please?(And when i get my hands on PF:E i'll make a level with that ship)

Giving the ship
-A HEAVILY extended range for her fighters (2x to 4x)(She has 20 airfields)
-A built-in energy generation of about 50/s
-Maybe improve her energy tanks
-Make the fighters cost less energy to operate(If possible)

Thank you very much,
Qihao


-------(Just kidding im making a series for this ship)

kajacx

Well I'm not sure if you can increase the range, but the rest should be doable with some PRPL code.

Also if you want, I can try if module stacking is possible (probably is), so that you can fit even more fighter bases on your ship.
Why do work yourself, when you can write a program that will do the work for you.

GoodMorning

Range is not possible at present, nor is operation cost (yet).

Energy generation can be PRPLed, and you can give the loose equivalent of massive Guppies to store more power. However, these rely on scripts in the map, rather than the ship, so importing the ship to another map with the upgrades is not possible.

Edit: Sorry to dash aspirations, but better to be forewarned.
A narrative is a lightly-marked path to another reality.

Stickman

Quote from: GoodMorning on March 02, 2017, 10:06:57 PM
Range is not possible at present, nor is operation cost (yet).

Probably, operation cost may be done by catching individual fighters and manually altering, say, max energy and current energy. But that won't be a reliable way because, I think, the best criteria we can have is either particular fighter is enemy or not, so any friendly fighter passing over catch zone might be altered.
=====> This is a moderately pointy stick. You need to poke me with it once in three days if you need PRPL from me

Qihao56

Wait is it possible to make custom fighter bases that are practically just fighter bases that are improved?
And if that is possible, why not make torpedo bombers a thing?

GoodMorning

Possible and practical are different things. Feel free, but it will take a number of scripts.

"Torpedo Bombers" I assume to mean an MK7-style heavyweight assault device.
A narrative is a lightly-marked path to another reality.

Qihao56

I do mean a Mk7 style weapon to destroy ship

Also cant i just take the script from the normal fighter bases to just mod them a bit and integrate them into my ship?

kajacx

I dont think default modules are written in PRPL so no, unfortunately you cant just modify existing fighter bases without modding (and even I wouldn't reccomend that).
Why do work yourself, when you can write a program that will do the work for you.

FOXX

Hi Kajacx,

i'm trying to get custom modules from the Ship Editor in the game but i'm stuck.
I made a ship with a Bertha to test.
If i understand good i need to put the data i get from the BerthaAdder into the Custom Mudules Script from PlanetFall.
I've made this Setup but i don't know what the Ship input should be. Does that number refer to the shipslot number?

And when i unpause a PRPL Core appears in the SouthWest corner.
Image
Don't mind the square near the Energy Source.
[close]

Ps -> I have used your Ship Editor in my last Adventure, like it a lot.
Spoiler
The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

kajacx

Quote from: FOXX on March 06, 2017, 11:43:20 AM
i'm trying to get custom modules from the Ship Editor in the game but i'm stuck.

First, let' recap how planetfall's custom script solution works in the first place.

Esentialy, you need 3 PRPL scripts (2 + 1 for each module):

  • ShipModule.prpl: a base/core for custom modules. Contans basic functionality like checking for hull, consuming energy to build etc. This is attached to each custom module.
  • YourModule.prpl: An acctual code for your module. Reads info from ShipModule.prpl like rotation and position. This is also attached to each custom module.
  • Master.prpl: A script that acctually created the PRPL cores for custom modules and adds the PRPL scripts to them. Only one Master.prpl core is needed.

Now, the "YourShipAdder.prpl" script that my program generates only replaces the "Master.prpl" script. You still need to write your "Bertha.prpl" script and include the "ShipModule.prpl" script. I have tried to make Bertha custom module also, but I got bored after I got it to fire at a location every so often. I will add what I have written (it's written in PRPL+, but the compiled PRPL is there as well, of course), the Bertha shells don't do anything except make obnoxious noices, but hey, it's something.

If this doesn't help, send me your Bertha custom module script and I can take a look at it.
Why do work yourself, when you can write a program that will do the work for you.

FOXX

Aha, this explanation takes me a few steps closer.
So the issue is that i miss 1 Script.
I'm going to look at the data and see if i can figure it out.
Thanks for now and i'll let u know.
The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

kajacx

Let me tease you a bit by showing out the next feature.
"Mirror/symetry build mode"
[close]

What you are looking at is a symerty (mirrored) build mode, where placing a module/hull at a position will automaticly place the same module/hull at the correspinding position at the other side of the mirror(s).

There is still quite some work to bude done (like rotating hull pieces properly, integration with larger brushes, rotation symetry, ...), so expect this feature 1 or 2 days from now, I just wanted to post this teaser as a motivation to myslef to finish this quickly.
Why do work yourself, when you can write a program that will do the work for you.

FOXX

For making perfect symmetric ships. Like the idea.
Good luck with that.

Maybe i have another one.
In your Editor if you are making hull if you click and hold the right or left mouse button the screen scrolls/moves.
Maybe change the left mousebutton to add hull if you click and hold. And you can scroll/move with the right mousebutton click and hold.
The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

kajacx

Quote from: FOXX on March 07, 2017, 06:12:23 AM
Maybe i have another one.
In your Editor if you are making hull if you click and hold the right or left mouse button the screen scrolls/moves.
Maybe change the left mousebutton to add hull if you click and hold. And you can scroll/move with the right mousebutton click and hold.

Yea, that feature is long overdue. However, currently the right click is used to remove hull/armor. Maybe crtl+mouse drag to move the camera, since crtl+mouse wheel zooms already?
Why do work yourself, when you can write a program that will do the work for you.