Knuckle Cracker

Particle Fleet => Map Makers, Ship Builders, and Coders => Topic started by: Ringo on May 30, 2018, 09:02:21 PM

Title: Help getting scripts for custom tech in a map
Post by: Ringo on May 30, 2018, 09:02:21 PM


So i am trying to make a custom map nothing fancy but a custom map none the least.

I got all the strandard tech there but i can't understand how to get custom stuff like the Proton torpedo (https://knucklecracker.com/forums/index.php?topic=27588.0)ARC Custom Module: Proton Torpedo for example into it or into a ship i want to design.


I have read Larn to make maps (https://knucklecracker.com/forums/index.php?topic=26681.0)  but can't load the videos there youtube issues atm.

I have read: Custom mod thread (https://knucklecracker.com/forums/index.php?topic=21624.0) and Libary (https://knucklecracker.com/forums/index.php?topic=26754.0).


Also can i put them in my custom ship editor for later use or is it only that map?

Title: Re: Help getting scripts for custom tech in a map
Post by: FOXX on May 31, 2018, 07:24:10 AM
Hi Ringo,

there are some steps you have to do to get a Custom Module working.
Firt is the ship you want the Module on it should look like this
Ship
(https://i.imgur.com/bFvdBPv.jpg)
[close]

This is for a 5x5 module (most modules are 3x3).
The place of the Module should be all (normal) hull as there is where the module comes.

3 scripts are needed for the Custom Module
1 - The Shipmodule.prpl from the Custom mod thread (https://knucklecracker.com/forums/index.php?topic=21624.0)
      you can download it from there.
2 - the actual Custom Module scripts. These vary from each module. On the Custom Module thread you can find those scripts.
     For a lot of Custom Module scripts you can look HERE (https://knucklecracker.com/forums/index.php?topic=22561.msg167491#msg167491) for my
     Custom Module ships with all files needed for that Module.
3 - The Master script. This script is the only one placed into the Map. You can download a Ship from me and Copy that Master Script for your ship.

             INFO

1 - The Shipmodule is ok as it is. You don't have to change this script.

2 -The Custom Module script looks like this:
CM Script 1
(https://i.imgur.com/hajsEC0.jpg)
[close]
In these Scripts (this one is for the Howitzer) the most important is the Image slots. (here in line 4, 8 and 19)
CM Script 2
(https://i.imgur.com/HLhqjf5.jpg)
[close]
And here in Line 155.
So this Module needs 4 Images for Displaying and the Image slots has to be the same as the slotnames in the Scripts.

3 - The Master script holds information about the Shipname and the Module.
     This is different for each ship. Example from the Howitzer:
Master Script
(https://i.imgur.com/jHaeH3X.jpg)
[close]
Things to change or look at:
Line 12 -> Change Shipname to your Shipname (line 14 is a Trace and does not effect the Module)
Line 20/21 -> Height and Width of the Module (in case of the Ship on the Image this should be changed to 5x5)
Line 22/23 -> The Position of the Custom Module (the SouthWest Corner of the Module as explained in the Custom mod thread (https://knucklecracker.com/forums/index.php?topic=21624.0))
Line 24/25 -> The Position of the Command Module (this has to be the Center of the CM)
Line 26 -> The BuildCost of the Module
Line 28 -> The Name of the Script of the Custom Module.

If you have all of this done then you can add the Module to your Map like this:
1 - Add all Scripts into the Script folder with the Map you want the Ship(s) in.
(C:\Users\YOURNAME\Documents\My Games\particlefleet\editor\MAPNAME)
2 - Add Images to the Map. [Images are Named according to the Image Sloth Name they go to]
3 - Make an Invisible PRPL Core outside the Map and Attach Master.prpl to the Core.
4 - Add the Ship to the Map
6 - Run Game -> Build your Ship from the ShipList) [Most Custom Modules take 30 Energy to Build so make sure you have enough of Energy to save time]
(or you can use "B" in the Editor for Instant Build)

If you have done everything correctly your Custom Module works now.
Good Luck.

Greets
FOXX
Title: Re: Help getting scripts for custom tech in a map
Post by: Ringo on June 16, 2018, 04:33:59 AM
Thank you
Title: Re: Help getting scripts for custom tech in a map
Post by: FOXX on June 17, 2018, 08:38:37 AM
Thumbs Up :)
Title: Re: Help getting scripts for custom tech in a map
Post by: bluebolt on June 17, 2018, 05:31:01 PM
Aw, I completely missed a thread for support for one of my modules. If you're still experiencing problems, I can lend some assistance... sometimes the image slots are a bit hard to find.