SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 11-26-11, 09:14 PM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

ColisionableObject controller:

ArmorLevel - The armor level in cm [0..100]
Hit_Points - The amount of hitpoints this ship can take
CrashDepth - The maximum depth this ship survives
CrashSpeed - The number of hitpoints to be accumulated in 1 sec when ship under crash depth
Rebound - The rebound coefficient [0..1] to be used when colliding with other objects

These are global parameters for the ship, the armor level can be overridden by the settings in each box, and it's used in conjunction with this structure:
AmmoDamageInfo - AmmoDamageInfo User Data.
MinEF - The min hit points this ammunition worths
MaxEF - The max hit points this ammunition worths
Armor Level - The armor level it penetrates
MinRadius - The minimum radius of splash damage. The ammunition takes all its hitpoints until this distance
MaxRadius - The maximum radius of splash damage. The ammunition takes no hitpoints beyond this distance. If 0 no splash

So when the ammo hits a ship it substracts a number of hitpoints from the surrounding boxes, between minef and maxef, according to the distance to the impact, and also calculating the armor penetration factor (don't know how it's calculated), if the value of armor level in the box is -1 then the global armor level is taken, same for the hitpoints (the global value is defined in the matching zone in zones.cfg).

Now the boxes in the zon file :

Boxes:
Type - The type of zone
ArmorLevel - The armor level of zone: -1 means it has armor of LinkTo Other object linked to zone or the global object itself.

Where Type is a reference to the number of a zone defined in zones.cfg, ArmorLevel is the armor value unique to this box, LinkTo is the ID of an object in the ship that you want destroyed when this box hitpoints reach 0, ie you have a ship with two masts and a cable between them, the cable is a child of mast1, so if mast1 is destroyed then it's child's (in this case the cable) are destroyed as well, but if mast2 is destroyed then the cable remains giving an odd effect, so you link the box of mast two the cable using it's id and when mast2 is destroyed so is the cable.

Leaving us with zones.cfg. It has three parts:
a [Zones List] it's where the different zones are defined, a number and a name, the number is the cross reference between this file and the boxes in each ship .zon.
b the zones definition section is where you define each zone properties ie:
[AmmoBunkersAbove]
Category=Fore Ammo Bunker
Multiplier=1.000000
Flotability=0.000000
HitPoints=50
Destructible=No
Armor Level=-1
Critic Flotation=0.300000
Critical=No
Critical Chance=0.05
Effect1=#dc_bubbles, 50
FloodingTime=59.999996
CargoType=Ammo
Crash Depth=6

The shell or torpedo 'doing the damage' has to be able to overcome the AP of the zone in order to cause damage. i.e.: the AmmoDammageInfo controller's ArmorLevel has to be >= the unit's zone that it hit to cause damage

Last edited by TheDarkWraith; 11-26-11 at 09:26 PM.
TheDarkWraith is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:13 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 1995- 2026 Subsim®
"Subsim" is a registered trademark, all rights reserved.