PRPL Request

Started by TripleKings, February 20, 2018, 02:03:22 PM

Previous topic - Next topic

TripleKings

I am trying to make a custom module that provides the ship it is on 5 energy every tick. I followed the advice given by planetfall here. Despite that, I was unable to get anything working. Due to my utter lack of skill in PRPL, I feel like I am forced to ask: Can someone make the scripts for me, then tell me what to do with them?
When life gives you lemons, squeeze them in your enemies' eyes!

GoodMorning

This ought to work...

"Master" does the work of scanning for ships to attach this module to.
"ShipModule" is the common template for making custom modules build.
"ReactorModule" provides the functionality.

First, copy these into the "scripts" folder for your map.
To use them, place a PRPL Core, and attach "Master".
Currently, it's set up to attach to any ship named "Cheap". Edit "Master" to suit your ship, as described in the thread you linked.

It should work automagically from there. You will need to add an image in the Custom0 slot or the module will be invisible.

Note: I haven't tested this, but it's mostly a copy/paste from an existing module.
The module will not build if your ship is too small to have the relevant hull. The positioning your module on a ship also happens in "Master", and is described in the thread you linked.

Hope this helps. If not, post back here and one of us will help in more detail.
A narrative is a lightly-marked path to another reality.

TripleKings

Thank you. It works wonderfully, but it seems the module rendered beneath the ship. A gray silhouette appears, but not the unit itself. What do I do?
When life gives you lemons, squeeze them in your enemies' eyes!

theachevah

Quote from: TripleKings on February 20, 2018, 06:27:19 PM
Thank you. It works wonderfully, but it seems the module rendered beneath the ship. A gray silhouette appears, but not the unit itself. What do I do?

that is the module building.

just wait a bit and it will build.

just like regular modules.
What is a man? A miserable pile of secrets! But enough talk, HAVE AT YOU!

TripleKings

It finishes building, leaving the silhouette.
When life gives you lemons, squeeze them in your enemies' eyes!

FOXX

line 25 in the script should be ->

<-Exist 1 eq if
   Self "main" 255 255 255 127 @SetImageColour
   return
endif

i believe.

gn
FOXX
The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

TripleKings

Yes, that was it. Thank you, everyone, for your help.
When life gives you lemons, squeeze them in your enemies' eyes!

GoodMorning

That's fine. I'm interested to see what you do with it.
A narrative is a lightly-marked path to another reality.