Battleships Forever
Ship Maker CE
by Jack Coady, Sean "th15" Chan, and Game_boy
Edited by : Arcalane, ChaosTheory, Kaelis & Mtheminja  (BoVinE redid this menu and gets credit too)
Get Battleships Forever from (http://www.wyrdysm.com)

Instructions
Introduction
The Ship Maker allows you to create ships for Battleships Forever and use them in the Sandbox mode. This is not a competitive game mode nor is it meant to be really "playable". It's a place to let your imagination run amok.

Building Ships
A ship is made out of a central core, which is the heart of a ship, and four types of components. These components are Sections, Turrets, Modules and Doodads. Sections are parts of the structure and form the hull of the ship. Turrets are weapons mounted on sections. Modules are special turrets that provide special abilities, also mounted on sections. Doodads are graphical effects.

To add a component, simply click on the corresponding image of it button on the left side bar.

Parents
All components of a ship must be connected to the core of the ship through a section. This is very important because if a section is destroyed, any other section that was connected to the core through the destroyed section will also be destroyed. It is advised to parent the components in a logical manner similar to trunks, branches, twigs and leaves on a tree.

The component which is currently selected (outlined in blue) will be the parent of the next component you place. Other wise any new components made will be parented to the core by default.

There is an option to reparent children of a section to another section - Right click on a target section and pick 'Reparent children' to reparent all children from selected section to section under mouse.

Depth
The components of a ship are visually organized in a manner that shows a distinction between parts that are on top and parts below them. The depth of a component determines whether it is on top or below other components. A larger number for depth is considered below a depth that is a smaller number, the highest number being 1 for a section that will always be on top. This is an important category that gives an otherwise flat ship a sense of volume.

Weapons and modules are always shown above sections and doodads by default. Doodads are always shown above their parent section, but are otherwise hidden or cover other sections based on the depth of their parent section by default.

However, depthed weapons/modules (pressing W with them selected) behave just like doodads as far as depth is concerned - they render on top of their parent section, but below eveyrything thats above their parent section. Weapons/modules parented to the core cannot be depthed.

Color
There are shortcut color buttons on the sidebar, which behave much like color keys.

First three buttons are for teamcolors, with the ability to change them, they work just like in BSF in that aspect. Next 9 buttons are for the 9 custom colors.

To change the color of selected object (or set it to team color), press the buttons.

If you ctrl+right click on a button, you will be presented with four options:
Fill - Assigns the color to all sections that have the same color as currently selected section
Sample - Color picker, samples the color from currently selected section
C Mode - Toggles through assign and cycle C modes. In cycle mode, C key behaves normally. In assign mode, C key will set the color of selected object to the color that is currently selected as default insertion color (the one picked with ctrl+click)
Save colors - Saves colors to smconfig.ini, excluding team colors (by default the .ini is not modified, you have to specifically pick this option to save your colors)

Misc
No-glow and no-shimmer settings for sections - There are separate edit fields for disabling glow and shimmer for sections. Shimmer is a slight change in color brightness for all sections, normally barely noticeable, but becomes an issue when trying to perfectly match turret bases with weapon sprites. Theres alos a 'Shimmer' setting in BSF ini for globally disabling shimmer for all sections.

Setting for depthed bridge rendering - There is an smconfig.ini setting for rendering bridge sprite above core, but below everything else (so just like in BSF), 'renderbridge'. 1 for old rendering method, 0 for the new one.

Setting for default SM background - Theres a setting 'background' for loading a custom background on SM startup. Path must be absolute (C:\Program Files\Battleships Forever\background.bmp, for example).

Controls, Shortcuts and Hotkeys

	 General
		Ctrl + N: Clears the screen and creates a new ship
O: Load ship blueprint
Shift + O: Load encrypted ship blueprint
S: Saves ship, as .shp and .sb4
Ctrl + S: Saves ship and launches ship into Sandbox mode immediately
Shift + S: Saves ship, as .sb4 only and skips saving .shp

Left Mouse: Select component to drag
Left Mouse while dragging Components: Release component, but keep it selected
Shift while dragging Components: Precise dragging (offers finer control)
Right Mouse: Context sensitive menu (you must select the object you right click on it for some options to appear)
Shift + Arrows: Nudge selected component by 1 pixel for precise placement
Ctrl + Shift + Arrows: Nudge selected component and everything parented to it by 1 pixel for precise placement (group shift)
Insert: Insert numerical x and y coordinates for selected component
[ or ]: Change transparency of components

Space: Insert section at mouse position 
/ (forward slash): Insert doodad at mouse position 
Ctrl-C: Clone component under mouse position with same settings (uses the currently selected object as parent)
Delete: Delete selected component

M: Mirrors your ship along it's central axis
Ctrl + M: Remirror, deletes the entire lower half of the ship and mirrors everything again
Shift + M: Clear Mirror status, so that mirror can be used again for components that were mirrored
T: Assign target for Aegis Deflector or Booster module (module must be selected)

	 Function
F1: ...
F2: Switch to Add menu bar (for adding new components)
F3: Switch to Edit menu bar (for changing properties of components)
F4: Switch to Effect menu bar (for changing visual effects of components)
F5: Toggle Effect Editing mode
F6: Nothing
F7: Nothing
F8: Nothing
F9: Take screenshot of selected area (Left click to confirm area, right click to cancel)
Ctrl + F9: Capture screenshot of entire window
Shift + F9: Capture screenshot of a number of frames (F9 to about frame capturing)
F10: Toggle 30 FPS Limit
F11: Toggle Preview mode [Preview how will rotation, fading and doodads look like when ingame]
F12: Show/Hide Graphical User Interface [Hides everything but the ship itself]
End: Toggle between Normal or Fine Mov/Rot Step mode

Normal and Fine move/rotate mode
By default, objects will be moved/rotated by the step defined in smconfig.ini by rotnormalstep (default 5) and movnormalstep (default 1). If you toggle fine mov/rot mode, then the components will be move/rotate by steps defined by rotfinestep and movfinestep.

Effect editing mode
In effect mode, some keyboard keys change so that its easier to edit effects.
	[ and ] - change effect alpha
	PgUp and PgUp - cycle through section effects
	Shift + C - change effect blending mode
	Shift + arrow keys - change effect x and y offset
	I and K /+Shift - change effect x and y scale
	W and S - change Fade speed, hold ctrl for bigger increments
	E and D - change Hi limit, hold ctrl to change Hi delay
	R and F - change Lo limit, hold ctrl to change Lo delay 

		Screenshots and capturing frames
		By default, SM saves screenshots in png format to a separate directory 'SMScreenshots'.
		Also by default, it lets you pick a rectangular area to capture instead of capturing the whole window.

There is a new option to capture a set number of frames. Press shift+F9 to use it. As with normal screenshot, you will be able to pick a rectangular area (right click to abort), then you will be presented with a dialog that will let you specify how many frames you want to capture, after which there will be a dialog for frameskip (0 for no skip). Once you press ok on the second dialog, capturing will begin. You can abort it by pressing F9 while its running. Mind you, capturing frames is slow, especially with large capture areas and/or with big ships. Each frame will be output as .png into 'SMFrames' directory.

	View
Home: Center view on the core
Middle Mouse: Centre view on mouse
Backspace: Reset zoom
Mouse Wheel Up/Down or Pg Up/Pg Dn: Zoom In/Out
Up/Down/Left/Right Arrows: Scroll screen
T/F/G/H: Scroll background for alignment (Core must be selected)
P: Show parenting/driver lines
V: Show weapon arcs

Hiding sections
You can hide sections to increase performance and possibly help with selection in dense areas.

For the hide/unhide options to work, core must not be selected. To hide section under mouse (or selected section, if theres no section under mouse), press H. To temporarily unhide all sections, press U, press again to hide them again. To unhide all sections, press shift+U.

To hide sections in a rectangular area defined by mouse, press ctrl+H where you want the area start, then press lmb where you want the area to end. Ctrl+U is for rectangular unhide.

You can also hold Y and press left/right mouse button to hide/unhide sections in an area around mouse. While Y is pressed, a circle will be drawn to show how big the area is. You can change the radius in smconfig.ini, 'mousehradius' setting.

Do not use group flip or group rotate with hidden sections!

	Color
Left Mouse on Color Button: Change color of selected component
Ctrl + Left Mouse on Color Button: Set the color the which new sections will start with
Right Mouse on Color Button: Set color of Shortcut Color Button via Custom Color Dialog
Numpad or Numberline keys (5,6,7,8,9,0,-,=): Change color of selected component
Ctrl + Numpad or Ctrl + Numberline keys (5,6,7,8,9,0,-,=): Set color of Shortcut Color Button via Custom Color Dialog
Ctrl + Right Mouse: Brings up menu for Color Palette (Fill, Sample, Cycle and Save Palette)
C: Changes color of selected component to default colors (cycles to next default color)
' (apostrophe): Set color of selected component via Custom Color Dialog

	Depth
Shift + mousewheel: Change depth of section 
Numpad / or Ctrl + W: Set depth of section via Set Depth Dialog
W: Set depth of selected section below parented section (for weapons, toggles depthed)
Q/A: Bring component forward/Send component back (for weapons and modules, scale horizontally)
Shift + Q/A: Bring component to front/Send component to back (for weapons and modules, scale vertically)
	There is a toggle in Tools menu for default insertion depth (bottom or below parent)

	Scaling, Flipping and Rotation
I/K: Horizontal scale up/down of components (for weapons, increase/decrease Arc)
Shift + I/K: Vertical scale up/down of components (for weapons, increase/decrease Arc Range)
J or L: Rotate component
Shift + J/L: Flip component vertically/horizontally (does not work for weapons or modules)
	J or L while the core is selected: Flip core 
	Shift + J/L while the core is selected: Flip whole ship 
, (comma) or V + Left Mouse:  Flip component horizontally(does not work for weapons or modules)
. (dot) or V + Right Mouse:  Flip component vertically (does not work for weapons or modules)
B + mousewheel: Scale component horizontally (does not work for weapons or modules)
N + mousewheel: Scale component vertically (does not work for weapons or modules)
V + mousewheel: Normal rotate 15 degrees for component (does not work for weapons or modules)
X + mousewheel: Fine rotate 5 degress for component (does not work for weapons or modules)
	For V/X rotate steps, there is a setting in smconfig.ini, called rotxstep and roystep respectively

	Interface and Menu
		Right Click on selection arrows: Scroll through component selection by ten at a time
Ctrl + Scroll Wheel: Scroll through section selection
Numpad + and -: Scroll through section selection, hold ctrl to scroll ten at time
Z: Activate Section Picker
` (apostrophe): Toggles Numberline keys 1,2,3,4 to Groups or Insert Mode

Groups Mode
1: Switch to Section Group 1
2: Switch to Section Group 2
3: Switch to Section Group 3
4: Switch to Section Group 4

Insert Mode
1: Create Section
2: Create Weapon
3: Create Module
4: Create Doodad
Ctrl + 1/2/3/4: Scroll forward through the respective component list
Shift + 1/2/3/4: Scroll backward through the respective component list
Ctrl + Shift + 1/2/3/4: Replace the selected component (if they are the same type) to the type displayed.
		This is useful for changing component types after they have been placed.

Section groups
All sections in SM are distributed between four groups, which can be arranged any way you like. There is also a section picker available, to help with choosing sections.

1, 2, 3 and 4 keys are used to change currently active groups, but only when those keys are set to 'group' mode. To change 1234 keys mode, press tilde ( ~ ) or go into Tools/'1234 keys mode'. There is a '1234mode' setting in smconfig.ini that governs what mode should be set as default one when SM starts, 0 for normal (insert), 1 for group.

When you change active groups, the set of sections available for insertion will change to reflect that. Section button arrows and section mousewheel/key scroll will now scroll through that set of sections. The section button on the sidebar will also change (it remembers the position of last selected section from relevant group).

You can save and open section groups using relevant options in Tools menu. This will save a separate sprite ini. When you open a sprite ini, all sections that are currently on the grid will stay as they are. Only the groups will change.

You can change what doodads are loaded by editing the ini directly as well.

By default, sm loads smsprites.ini (included with the download). 

Section picker
To activate section picker, press Z. Press Z again to deactivate it. Section picker will show all sections from current group. If there are more section in current group than the section picker can show, you can scroll through them with mousewheel while the mouse is over the section picker, or by moving the mouse to top/bottom edge. To insert a section, simply click it.

You can import custom sections to the end of current group by dragging and dropping a file (png or gif) onto the section picker. 

Section group arrange
To manage section groups inside SM (you can do that by directly editing the inis, too), go into Tools/Group Arrange. The normal SM gui will be replaced by all four sections groups shown like sections pickers. They are scrolled like section picker as well.

You can select sections by clicking them. Ctrl+click selects multiple, shift+click selects block. Delete removes selected sections from the group. You can move selected sections in their group or between groups by simply dragging them. A yellow line will indicate to what position they will be moved.

You can import custom sections into a specific group and specific position by dragging and dropping files into place while group arrange is active. Imported sections will be inserted directly after the section which was under mouse when they were dropped.

Rotsections
In order for a section to being following the rotationg parameters, the 'Rotating' field must be changed from 0 to 1.

Linear Movement
Sections with linear movement enabled will move between their origin (starting point, where they're placed in SM) and their move target. You can either change the move target by using appropriate edit fields (x and y coordinates and/or distance and direction), or you can press T to get a visual representation of the target point and manipulate it with mouse and keyboard arrows (shift+mouse move/fine move apply). Press left mouse button or again T to confirm, press right mouse button to abort.
Other parameters are similar to rotation/effect fade, and can be found in Ed2 tab.

Turretsections
Turretsections are just like rotsections (including children rotating along with their parent), but instead of rotating by themselves, they are driven by a weapon.

To set a driver for selected section, right click on a weapon and pick 'Set Driver'. To clear the driver, right click on a section and pick 'Clear Driver'. Orange arrows will indicate drivers.

For the turretsections to work properly, their drivers cannot be parented to them. So if you want a proper turret, its best to move the driver to be at the same coordinates as turretsection, and hide underneath the turretsection (with weapon depthing) or make it invisible (0 alpha), give it alot hp, and disable shooting (there is an edit field for that). 

Weapon Linking
Allows you to link weapons, so that children have the same angle as their link parent, and shoot at the same time (and only then) with optional delay (Link delay edit field). The link parent will behave as a normal weapon. When the link parent is destroyed, link children get back to normal weapon behavior. There can be only one link parent for a weapon, but one weapon can have multiple link children.

To pick a link parent for selected weapon, right click on the weapon you want to be the link parent and select Set Link. Select Clear Link to clear the link (its link parent) from the weapon under mouse. If you want weapons on a turretsection that work like barrels, just link them to the driver. Children weapons will fire whenever the parent fires and face the same direction as the parent regardless of the children weapons' allowing it or not.

Direct Control mode
In DC mode, you can control how your ship moves and how its weapons shoot (taking all their parameters like arc range or reload into account) with keyboard and keys.

For ship movement, arrow keys, wsad keys, and mouse are used. There are 4 DC modes:

Mode 1 - Ship rotates to face mouse, ws / up and down move ship forward (where its facing) and backward, and / left right strafe the ship to its (relative to the ship) left/right
Mode 2 - Ship rotates to face mouse, wsad / up down left right move the ship in relevant direction relative to the screen
Mode 3 - Ship does not rotate to face mouse, ws / up down move ship forward/backward, ad strafe ship to its left/right, left and right rotate ship
Mode 4 - Ship does not rotate to face mouse, wsad / up down left right move the ship in relevant direction relative to the screen AND rotate it to face that direction

To enter DC mode, select a ship and press ctrl+C. To toggle through every mode keep pressing ctrl+C. To immediately exit out of DC mode (without having to toggle through them) press C.

There is also a setting in SM in ship preferences to disable DC on that specific ship.

If you want to control ships weapons, you have to assign them to DC groups in SM via appropriate edit field. Each group corresponds to certain keyboard key or mouse button which will trigger weapons belonging to those groups. Weapons assigned to a DC group will rotate to face the mouse when the ship they belong to is in DC mode, outside of DC mode they will behave like normal weapons. 

Custom sprite import
You can import your own sprites for use as sections, doodads, weapons or bullet sprites. These sprites must be in the form of .png or .gif files, and need to be located in Custom sprites directory residing in the program directory. Their names should be short (around 12 characters for sections and doodads, excluding file extension). Every single sprite must have a unique name. Section, doodad and weapon sprites all need a 1pix black border, which will be used as transparency color. All sprites will be imported with their origin set to ceil(width/2), ceil(height/2), where the top left pixel is 0,0. The default gray fill color for sections is 47,47,47 (R, G, B), and the white for outline is just pure 255,255,255 white.

Note that all custom sprite paths for current ship are saved with the sb4 and shp. If you move a sprite out of the directory it was in when youve built the ship, there will be problems with loading that ship in BSF/SM. The only way to change paths in a saved sb4 is to open it up in a text editing app and change them manually (theyre relative to Custom sprites directory). Paths saved in shp cannot be changed, youll need to resave the ship.

To import a section or doodad and insert it directly onto the grid in SM, just drag and drop the files onto the SM window. If you drag a gif, you will be presented with an option to make it either a section or a doodad. For other section import options, refer to 'Section Picker and Dection Groups' previously mentioned.

To set a custom sprite for a weapon or its bullets, use the appropriate edit field. You will be presented with open file dialog, press cancel to go back to default sprites. Note that you wont be able to see how bullet sprites look like until you run the game and load the ship with modified weapon.

Due to changes required for custom sprite import, template strings with sections, doodads and weapons that have custom sprite no longer work flawlessly (the sprite name part is dependent on the current session of SM). This includes ships that were using template strings for 'hacked' section/doodad sprites (sections with stock doodad sprites or doodads with stock section sprites should work, though). You may also need to resave ships made with older versions of SMCE.