Kendras' mods for Silent Hunter 3
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Le deal à ne pas rater :
Clé licence Windows 10 professionnel 32/64 bits – Français
1.98 €
Voir le deal

Aller en bas
Messages : 175
Date d'inscription : 23/07/2018

Basics and theory Empty Basics and theory

Lun 31 Déc - 11:15
I'm going to explain how I understand the damage system of SH3, or in other words how the different units (ships, airplanes and land units) can be destroyed.

The whole damage system depends on the following files :

- Zones.cfg in the data folder
- ---.zon in the units' folder
- Shells.zon and Torpedo.zon in the library folder
Messages : 175
Date d'inscription : 23/07/2018

Basics and theory Empty Re: Basics and theory

Mer 2 Jan - 15:25
A well-posed question is already half-answered.

So, first, let be clear about the vocabulary ...

= = = = = = = = = = =

  - in absolute, whatever thing which can be placed in SH3 world with the mission editor (ships, airplanes, dolphins, coastal defenses, minefields, antisub nets, air bases...).
  - for our study, a visible 3D object which represents ... which can be attacked and defeated (eg : a rock is not a unit, but a destroyable lighthouse is a unit (because a passive unit will be recognize by the player as "defeated" only if it is "smashed")).

OBJECT : 3D part of a unit. It can be the "main part" of the unit (for example the complete hull of a ship), or "subparts" (for example : afunnel, a mast, etc.). A 3D model is characterised with a number, written in a small square in S3D.

Basics and theory E94FuEN

Fig. 1 - Unit's .dat file : 1 : main part ; 2 : subpart ; 3 : characteristic number of the 3D model

BOX : virtual rectangular parallelepiped linked to an OBJECT ....... and which is configured to have the properties of a specific ZONE TYPE.

ZONE TYPE : ensemble of properties (detailed/defined in Zones.cfg) which are applying to the boxes linked to this zone type. Each property is a specific value for the mandatory (and optional if any) parameters ; cf. next post.

box or zone type ?? :

PARTICLE EFFECT :  ........  (examples : smoke, fire, bubbles(?) ...)


VECTOR OF DAMAGE (VD) : whatever device which can cause damages (meaning taking away some hitpoints from units and boxes) : it can be a shell, a torpedo, a rocket, etc.

HIT POINTS (HP)  (life points)

DAMAGE POINTS (DP) : maximal amount of HP that a VD can take away from units and boxes.

EXPLOSIVE AREA (EA) : spherical area in which a VD will release its DP when exploding.

  # schema #


IMPACT : a UNIT (or a BOX) is "impacted" when a VD is exploding after having collided with this unit (or box).

HIT : a BOX is "hit" if one of its part is located in an EA (note : a box can be hit without being damaged).

DAMAGED : a BOX or a UNIT is "damaged" while loosing some HP, or if it has lost some HP.


DEFEATED (out of combat) : a UNIT is "defeated" (and not "destroyed") if it has no more HP, or if it is too deep in the water.

DESTROYED : a BOX is "destroyed" if it has no more HP.

SMASHED : an OBJECT is "smashed" (and not "destroyed") if it is physically destroyed : it is thrown in the air or it collapses, and then it disappears. When an object is smashed, all the sub-objects linked to it are also smashed.


A.L. : armor level of a unit or a box (the A.L. value of the unit's boxes can be provided by the zone type linked to the boxes, or by the unit's .zon file).

# schema #

M.A.P. : maximal armor penetration value of a VD.

Dernière édition par Admin le Mar 19 Jan - 5:06, édité 7 fois
Messages : 175
Date d'inscription : 23/07/2018

Basics and theory Empty Zones.cfg

Mer 2 Jan - 15:28
The Zones.cfg file contains all the zone types with their parameters.

Each specific zone type has mandatory parameters (they must be completed) and optional parameters (meaning that the line can be deleted if not needed, marked in blue in the following text) :

CategoryEngines Room ; Fuel Bunkers ; Keel ; Fore Ammo Bunker ; Aft Ammo Bunkernot sure ....
Multipliernumbernot sure ...
FlotabilitynumberTests are needed to understand exactly how this is working ....
DestructibleYes ; No
Effect1name of the particle effect, number between 0 and 100 (%)The specified particle generator will be spawned when the box's HP are equal or inferior to the percentage specified
Armor Levelnumber
Critic Flotationnumber between 0 and 1(?)?
CriticalYes ; NoProbably : if a critical box is destroyed, then the unit itself is defeated
Critical Chancenumber between 0 and 1(?)?
FloodingTimenumber (seconds ?)
CargoTypeNone ; Custom ; Fuel ; AmmoFuel or ammo explosion when the box is destroyed, which will damage the units and the boxes which are in the EA
Crash Depthnumber (meters)Probably : when the box is under the specified depth, it is destroyed

Also, there are very important lines at the end of the file.

Dernière édition par Admin le Mar 19 Jan - 5:04, édité 11 fois
Messages : 175
Date d'inscription : 23/07/2018

Basics and theory Empty UNIT.zon

Mer 2 Jan - 15:30
Each unit's .zon file contains :

  - the general data of the unit
  - the damage boxes and/or the collision spheres for the unit and its subparts.

1. General data

- Contained in the node called "ColisionableObject". This node must be added in order that a VD is able to impact the unit.

- the number of HP : each type of shell fired against an unit will inflict a certain amont of damage to it. In fact, the shell will "take" a certain number of HP to the unit AND to the damage boxe(s) which is (are) hit by the shell. When all the unit's HP are loss, the unit is defeated, resulting in the immediate destruction of all the damage boxes (the explosive damage boxes (ammo or fuel) will explode) of the unit.

- the armor level : probably, a VD will inflict less damage if the ship and/or the damage boxe has an armor level higher than the max armor penetration value of the VD... From what difference the VD will inflict no damage ?

- the crash depth : when the unit reaches this depth, some HP are loss (the total number of HP of the ship decreases, not the HP of the damage boxes, except if they have also reached their own crash depth).

2. Damage boxes and collision spheres

- the damage boxes : they represent the hull and the internal rooms of a unit. Each box is linked to a chosen zone type.

- the collision spheres : they allow the unit to collide with other units and with the land (sea bed and shore) ; in this case, the unit and its damage boxes are damaged, depending on the unit's speed and other factors (not clear for now).

Dernière édition par Admin le Jeu 10 Jan - 13:43, édité 1 fois
Messages : 175
Date d'inscription : 23/07/2018

Basics and theory Empty The impact

Mar 8 Jan - 19:49

1) When does an impact occur ?

a) With a 3D model's number = 4

- A VD will impact an object even if there isn't any damage box on its trajectory. If there isn't any box on the VD's trajectory, it sometimes happens that a shell passes throw the object.

- A VD won't impact a box which is on its trajectory if this box is attached to an object but located outside of the 3D limits of this object.

b) With a 3D model's number = 6

- A VD will pass throw an object if there isn't any damage box on its trajectory.

- A VD will impact a box attached to an object if this box is on its trajectory, and even if this box is located outside of the 3D limits of the object.

- The impact point is exactly situated at the intersection of the VD's trajectory and the first face of the box that the VD will encounter.

- If there are two or more damage boxes linked to the model, it appears that only the first one can be hit by a VD.

2) What does happen during an impact ?

a) A spherical (3D) explosive area is created, centered on the impact point.  [......]

Basics and theory QRQZoOo

Fig. 2 - Explosive area

b) The game determines a value (RDP) for the actual DP carried by the VD, which is a random number between min EF and max EF.

c) The game's engine will then proceed to a quick calculation in order to determine if these RDP will be "given" to the damage box (and/or the unit), meaning that the current HP amount of the box and/or the unit will be subtracted by RDP. Note that the game chooses only between 2 solutions : all RDP are given, or none.

So the game will calculate a "random" AP (RAP) value for the VD, with this formula :

RAP = (AP * Z) + (RDP / PT)

Z = random number between 1-ALF and 1+ALF
ALF = armor level factor
PT = penetration threshold
AP = armor penetration of the VD

If RAP is superior or equal to the AL of the box/unit, then all the RDP are given to it within the limits of the explosive area.
Contenu sponsorisé

Basics and theory Empty Re: Basics and theory

Revenir en haut
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum