Partagez
Aller en bas
Admin
Admin
Messages : 121
Date d'inscription : 23/07/2018
Voir le profil de l'utilisateurhttp://kendras-sh3-modding.forumactif.com

Basics and theory

le 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
Admin
Admin
Messages : 121
Date d'inscription : 23/07/2018
Voir le profil de l'utilisateurhttp://kendras-sh3-modding.forumactif.com

Re: Basics and theory

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

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



V O C A B U L A R Y
= = = = = = = = = = =


UNIT :
  - 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.



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 ?? :
  destroyable
  explosive

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.

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 Jeu 10 Jan - 13:49, édité 6 fois
Admin
Admin
Messages : 121
Date d'inscription : 23/07/2018
Voir le profil de l'utilisateurhttp://kendras-sh3-modding.forumactif.com

Zones.cfg

le 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) :

ParameterValuesMeaning
CategoryEngines Room ; Fuel Bunkers ; Keel ; Fore Ammo Bunker ; Aft Ammo Bunkernot sure ....
Multipliernumbernot sure ...
FlotabilitynumberTests are needed to understand exactly how this is working ....
HitPointsnumber
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


Dernière édition par Admin le Mar 15 Jan - 23:41, édité 6 fois
Admin
Admin
Messages : 121
Date d'inscription : 23/07/2018
Voir le profil de l'utilisateurhttp://kendras-sh3-modding.forumactif.com

UNIT.zon

le 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
Admin
Admin
Messages : 121
Date d'inscription : 23/07/2018
Voir le profil de l'utilisateurhttp://kendras-sh3-modding.forumactif.com

The impact

le Mar 8 Jan - 19:49
THE IMPACT

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.


2) What does happen during an impact ?

An explosive area is created, centered on the impact point.  [......]



Fig. 2 - Explosive area :
Contenu sponsorisé

Re: Basics and theory

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