= Big Ships =
[[PageOutline(2-3,CONTENT,pullout)]]
{{{
#!html
NOTE: Not all features mentioned in this article are implemented yet.
|
}}}
A !BigShip (aka !ModularSpaceShip) is a spacecraft consisting of multiple parts, which can be destroyed individually. The destruction of parts can alter the behaviour of the vessel, for example by weakening shields, engines or disabling weapons.
[http://www.orxonox.net/ticket/356 Ticket #356: Big Ships][[br]]
[http://www.orxonox.net/ticket/418 Ticket #418: Big Ships implementation]
[[br]]
== Implementation ==
All you need to create such a !ModularSpaceShip is the model of a spacecraft which is cut into different pieces, so that the parts can be implemented as individual !StaticEntities.
To assign an attached !StaticEntity to a !ShipPart, give it the same name as the !ShipPart you want it to belong to (c.f. example below). (Note: Multiple !StaticEntities can be assigned to the same ShipPart.)
{{{
}}}
Now hits received on !StaticEntities assigned to a !ShipPart will forward their damage to the corresponding !ShipPart instead of to the main !SpaceShip. Every !ShipPart has multiple parameters to customize its behaviour, which can be defined in the XML files:
||health||Same as for a normal Pawn||
||initialhealth||Same as for a normal Pawn||
||maxhealth||Same as for a normal Pawn||
||damageabsorption||Value ranging from 0 to 1. Defines how much of the damage received is absorbed by the part, while the rest is forwarded to the main Spaceship.[[br]]This can be used e.g. to create "physical" shields which get destroyed after getting too damaged (high absorption value)||
||explosionposition||Position where an explosion should appear upon destruction||
If you want the destruction of !ShipParts to alter the vessels behaviour, add PartDestructionEvent to the !ShipParts.
[[br]]
== Example ==
Currently the HeavyCruiser ship created in the HS13 PPS provides a model for such a large spaceship.[[br]]
In a demonstration level ("Modular Ships - Test 1") the vessel can be flown, and all its parts are individually destructible and alter the ships behaviour.
!HeavyCruiser is composed of (at least) 9 parts:
||'''Part'''||'''attached to'''||'''description'''||'''Event on destruction'''||
||body||N/A||Main part of the ship.||Death||
||frontL/R||body||Front extensions of the ship.||Loss of the weapon mounted on the part.||
||partL/R||body||Boxes on the sides to the front of the ship.||Boost regenerates slower. Speed, acceleration and boost of the body's engine are weakened.||
||sidearmL/R||body||Large sidearms of the ship.||Loss of the engine mounted on the part. Less controllability of the ship. (As well as destruction of sidearmL/Rfront)||
||sidearmL/Rfront||sidearmL/R||Front ends of the sidearms.||Engines mounted on sidearms don't provide any more boost.||
||turrets||body||(optional) Rapid firing autonomous turrets, defending the ship against nearby opponents.||
Look at the [http://www.orxonox.net/browser/code/branches/presentationFS14/data/levels/templates/HeavyCruiser.oxt#L3 HeavyCruiser.oxt] template to see an implementation of this!
[[br]]
== Development ==
[[br]]
=== TODO ===
* Implement turrets to be attached as !ShipParts
[[br]]
=== Problems ===
* N/A
[[br]]
== More Ideas ==
* !BigShips could use an own HUD, to show individual parts health.
* Systems of the !BigShip could be controlled, e.g. power can be manually directed to engines, shields or weapons.