{contributionReview}

Description
===========
In the "Hulls" folder you can find all the graphics used for rendering ships of any kind.

bigcrawl*_strip
===============
These are 128x128 graphic strips for hulls with all look directions and used for the big spiders. Even when adding new ones, the server must know them, to make them work. These can not be animated.

crawl*_strip
============
These are 64x64 graphic strips for hulls with all look directions and used for the big spiders and scorpions. Even when adding new ones, the server must know them, to make them work. These can not be animated.

hull*
=====
Regular hulls are either player ships or enemies. They can exist as single or strip graphic and each graphic is either 64x64, 128x128 or 256x256 pixels big. A single graphic hull is just a basic hull, but if it's a strip, the hull can be animated.

hull* Animation
===============
To animate a hull, by just creating a strip graphic, it will still not work, because you also need to add a metadata file using the same graphic file name, but with the extension ".ini". In that metadata file, you describe exactly how the hull will be animated in game. To make the hull animation work, you need a basic understanding of the INI format.

On the (sectionless) top of the metadata file, you specify global settings.
These are:

- "constrainStartup"
  Defines which frames can be random selected from at client startup.
  You can use multiple frame indexes, by separating them with a comma.
  Default: "(empty)" (Selects a random frame)
  Example: "constrainStartup=4,5,6" (Start with frame 4, 5, or 6)

- "defaultDelay"
  The delay before switching to another frame as floating point number in seconds.
  This is a default setting applied to all frames.
  Default: "0" (No delay, so this frame might never be shown)
  Example: "defaultDelay=0.025" (Switch to another frame after 0.025 seconds)

- "defaultNext"
  The frame index to switch next to, after the delay ran out.
  This is a default setting applied to all frames.
  Default: "0"
  Example: "defaultNext=5" (All frames will by default switch to frame #5)

- "defaultNextAny"
  The frame indexes the client can switch next to, after the delay ran out.
  The client will choose randomly which frame to switch for next.
  You can use multiple frame indexes, by separating them with a comma.
  This is a default setting applied to all frames.
  Default: "(empty)" (Don't do anything)
  Example: "defaultNextAny=6,7,8" (Frames will by default randomly switch to frame #6/7/8)

- "defaultTile"
  The graphic to be used for the current frame.
  This is a default setting applied to all frames.
  Default: "1"
  Example: "defaultTile=3" (All frames will by default show graphic #3)

- "driveX"
  Shifts the drive graphic relative to the center of hull in X axis.
  This must be a positive or negative integer.
  Default: "0"
  Example: "driveX=-5" (Shift drive -5 pixels in the X axis)

- "driveY"
  Shifts the drive graphic relative to the center of hull in Y axis.
  This must be a positive or negative integer.
  Default: "0"
  Example: "driveX=7" (Shift drive 7 pixels in the Y axis)

- "exhaustX"
  Shifts the drive exhaust animation relative to the back of the hull in X axis.
  This must be a positive or negative integer.
  Default: "0"
  Example: "exhaustX=10" (Shift exhaust 10 pixels in the X axis)

- "exhaustY"
  Shifts the drive exhaust animation relative to the back of the hull in Y axis.
  This must be a positive or negative integer.
  Default: "0"
  Example: "exhaustX=-33" (Shift exhaust -33 pixels in the Y axis)

- "frames"
  The total count of animation frames, needed to let the animation loop know the size.
  Default: "0"
  Example: "frames=128" (Hull has 128 frames in total)

- "hideDrive"
  Hide the drive from hull completely.
  Default: "false"
  Example: "hideDrive=true" (Hull will not show its drive)

To specify the animation frames, you just create INI sections with positive integer names in it. The count of sections does not need to match the count of frames in the graphic file, because in each section you have to specify which graphic index has to be shown when animating. That way, you never need to draw duplicate animation frames.
Each section has the following settings:

- "delay"
  The delay before switching to another frame as floating point number in seconds.
  Default: (Defined by "defaultDelay")
  Example: "delay=0.5" (Switch to another frame after a half second)

- "next"
  The frame index to switch next to, after the delay ran out.
  Default: (Defined by "defaultNext")
  Example: "next=17" (Next frame will be #17)

- "nextAny"
  The frame indexes the client can switch next to, after the delay ran out.
  The client will choose randomly which frame to switch for next.
  You can use multiple frame indexes, by separating them with a comma.
  Default: (Defined by "defaultNextAny")
  Example: "nextAny=1,2,3" (Next frame will be any of frame #1/2/3)

- "nextCombatEnter"
  The frame index to switch next to (after delay), when combat has started.
  Cisco: This is an experimental feature!
  Default: "0" (Means, do nothing, frame 0 is special)
  Example: "nextCombatEnter=70" (Next frame will be #70, when combat started)

- "nextCombatLeave"
  The frame index to switch next to (after delay), when combat has ended.
  Cisco: This is an experimental feature!
  Default: "0" (Means, do nothing, frame 0 is special)
  Example: "nextCombatLeave=30" (Next frame will be #30, when combat ended)

- "nextCombatRunning"
  The frame index to switch next to (after delay), while combat is running.
  Cisco: This is an experimental feature!
  Default: "0" (Means, do nothing, frame 0 is special)
  Example: "nextCombatLeave=10" (Next frame will be #10, while in combat)

- "tile"
  The graphic to be used for the current frame.
  Default: (Defined by "defaultTile")
  Example: "tile=11" (Current frame will show graphic #11)

For beginners, it can also help to look into another animated hulls, to figure out how it works. You can also ask any of the developers for help.

Additionally, there is the chat command "/asset reload hull NUMBER" (NUMBER = hull file number) to reload a specific hull in game, without restarting the client.


---
Author: 'Cisco'
Last change: {nodeFileChanged}
Source: Game development
