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

Reply
 
Thread Tools Display Modes
Old 11-26-11, 01:35 AM   #1
sona1111
Watch
 
Join Date: Oct 2008
Posts: 24
Downloads: 14
Uploads: 0
Default looking for some help with damage modding

This may be an out of date question, but i am a newbie looking for some info for modding this game- even with google searches it seems not many tutorials have been written.

anyway what i am doing is modding Silverwolf's amazing titan superfortress. I want to give it the ability to take damage. This is something i am only doing for myself and i will not release it unless silverwolf gives explicit permission.

Anyway in its original state the ship is awesome but will not be damaged whatsoever except for the radio antenna and flak gun. My first project before the individual object damage is getting the rooms to flood and sink like a normal sub (well not normal, much slower because its the titan, lol) Anyway i found that the "collisionable object" armor was 90 so i lowered it to 20 (will balance these things later) that didnt help so i realized all the collision spheres actually had 90 armor each on them! 5 years later they all had -1 armor (which i assume makes it the same armor as the base, so 20 ???) Also i took the front torpedo room and expanded it out over the entire front half of the ship and above and to the sides - theirs no way that zone is avoiding damage! Well it helped but it still does not work. Now i only take hull damage (no damage to the front torpedo room even with it expanded). once the hull it at 100% then i start flooding and getting damaged everywhere at the same time like the classic "massive ending explosion" on player created ships.

so thats what i did, now i am stumped. If anyone knows how to fix this, thanks. I really want it basically just like a regular sub but that can take more damage. for example, after 40 depth charges, maybe one room should start flooding.

anyway thanks for reading!
sona1111 is offline   Reply With Quote
Old 11-26-11, 07:41 PM   #2
chrysanthos
Grey Wolf
 
Join Date: Jan 2011
Location: greece
Posts: 820
Downloads: 488
Uploads: 0
Default

i feel you i am just doing the same thing with kongo battleship....since i am alone here because some wise guys complaining about me that i disturb some old threads,,,,,oh anyway keep practicing and dont worry someone will help...for now i am experimeting with this ship i almost make every compartment has armor 45.....but the damage cannot be fixed
chrysanthos is offline   Reply With Quote
Old 11-26-11, 09:14 PM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
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
Old 11-27-11, 02:05 AM   #4
sona1111
Watch
 
Join Date: Oct 2008
Posts: 24
Downloads: 14
Uploads: 0
Default

alright thanks.

I messed around a whole lot more. I sized each compartment properly now. (i still need to do the small objects) Zones.cfg is the confusing part i guess if you want to edit it you really need to create a whole bunch more individual zone numbers/types for the ship so it does not effect others?

anyway after a while i finally found the problem. The ship will not flood even with "1" damage on a bulkhead unless i dive the sub. its like the center is positioned too high somehow that the "surfaced" footage is not "in the water" enough. I am sure their is a variable somewhere to fix this, anyone know where?

also even though i edited only the zones, another problem came up where sometimes half of the deck guns will not fire. This is annoying but i doubt anyone will help. If you have had and fixed this problem please inform me thanks.
sona1111 is offline   Reply With Quote
Old 11-27-11, 03:06 AM   #5
peabody
Admiral
 
Join Date: Jan 2008
Location: New York State, USA
Posts: 2,390
Downloads: 126
Uploads: 7
Default

Quote:
Originally Posted by TheDarkWraith View Post

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
That last part is what I had a problem with back when I was building ships (yrs ago). People wanted them playable and it was kind of cool but when I did a BB, I could not figure out how you could possibly damage it without using planes with a bomb.
Since you are playing with a surface ship then torpedoes don't enter the picture. And using a playable BB attacking convoys, you would normally be attacked by Destroyers, usually with about a 5 inch gun. But the BB I was working with had an armor level of 85, but even a 16 inch AP shell has an armor piercing level of 65. MaxEF of 125 so it may do some damage but the DD with the 5 inch shell would never do any damage the way it looked to me because it only has an armor piercing level of 30. And if I changed the settings then every single shell would do damage and you wouldn't last very long since you would be fighting alone against several DDs.
So unless I am missing something, it was one of the reasons I did not continue with attempting to learn the damage mode. And I also moved on to other things.
Peabody
__________________

System Spec: Gigabyte GA-965P-DS3, PentiumD Dual Core Presler 945 3.4Ghz, Gigabyte Geforce 7600GS, 2-1GB Corsair XMS2 800Mhz in Dual Channel, 2-WD 250 SATA 3Gb/s, Onboard Realtek HD 7.1 Audio, DVD ROM, DVD burner, Hiper 580 Watt Power supply, WinXP SP2.

peabody is offline   Reply With Quote
Old 12-04-11, 02:06 AM   #6
sona1111
Watch
 
Join Date: Oct 2008
Posts: 24
Downloads: 14
Uploads: 0
Default

sorry to bump this and thank you very much for the help before.

basically i am having a great time except for one thing. (their are other small problems too, but the zones are going well enough that all parts of the ship, except the deck guns, can be damaged correctly)

This problem is that, even with the bulkhead fully destroyed ("1" damage) Flooding will not start unless i dive the sub. I have tried changing the zones every which way i can, but i do not think it has to do with their position after all. I have a hunch its one of the values in the SIM or VAL file, but so far no luck. Has anyone else had this problem? The flooding starts at about 44 feet for me when i am about 30 feet at the surface. It anyone can help me, that would be great.

thanks for reading.
sona1111 is offline   Reply With Quote
Old 12-05-11, 08:05 PM   #7
sona1111
Watch
 
Join Date: Oct 2008
Posts: 24
Downloads: 14
Uploads: 0
Default

bump
sona1111 is offline   Reply With Quote
Reply

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 09:49 AM.


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