PDA

View Full Version : Malfunctions for SH3 Commander with damage report


LGN1
12-01-09, 03:08 PM
Hi,

here is an idea to implement malfunctions without touching too many critical files and avoiding hex offsets. It uses the commands_*.cfg file to disable the item. Since the number of a command is usually not changed by mods, the method is quite mod independent. In addition, it also allows to have some feedback or damage report about the broken item (in the version below this works by ordering Full stop).

Examples below are a broken bold decoy launcher, a broken attack periscope, a broken snorkel, and a failure to crash dive. If you order periscope depth/snorkel depth you get a warning if the periscope/snorkel is broken. Also, if you order 'All stop' you get a damage report telling you about a broken item (since only one item is listed, there is a small chance that not all damage is shown. The chances for this are quite small and if it happens your damage has not been detected before :) In general, the most severe item is always shown).

Best, LGN1

PS: I am working at the moment on a complete overhaul of the malfunctions and sabotage effects for SH3 Cmdr. By using the presented idea I hope it is much more compatible with other mods than the present version. Both, the camera.dat and the sensors.dat/sim file are not used.


;----------Bold decoy failure begin-----------------------------------
[0:data\Cfg\Commands_en.cfg]
;Bold decoy is not working
;Chance: 10%
ApplyToPeriod=19390101|19450508
ChooseFrom=10
RndMidPat=1

0_Cmd200|MnID= ; Empty MnID
0_Cmd200|Key0= ; Empty command
;No warning. You only know after trying.


[0:data\Cfg\Commands_de.cfg]
ApplyToPeriod=19390101|19450508
ChooseFrom=10
RndMidPat=1

0_Cmd200|MnID= ; Empty MnID
0_Cmd200|Key0= ; Empty command
;No warning. You only know after trying.
;----------Bold decoy failure end-------------------------------------
;
;
;----------Attack periscope failure begin-----------------------------
[1:data\Cfg\Commands_en.cfg]
;Lock the periscope, F3 key not working
;Chance: 7%
ApplyToPeriod=19390101|19450508
ChooseFrom=14
RndMidPat=1

0_Cmd16|Key0= ; Empty command
0_Cmd16|MnID= ; Empty MnID
0_Cmd120|Key0= ; Empty command
0_Cmd121|Key0= ; Empty command
;0_Cmd194|Str=1036
;0_Cmd171|Str=1020
;Un-comment the lines above and add the text
;1036=Periscope depth!|CAUTION: Attack scope out of order!
;1020=All stop!|Damage report: Attack scope out of order!
;to your data\Menu\en_menu.txt to be warned when ordering periscope depth
;or stopping the engines.


[1:data\Cfg\Commands_de.cfg]
ApplyToPeriod=19390101|19450508
ChooseFrom=14
RndMidPat=1

0_Cmd16|Key0= ; Empty command
0_Cmd16|MnID= ; Empty MnID
0_Cmd120|Key0= ; Empty command
0_Cmd121|Key0= ; Empty command
;0_Cmd194|Str=1036
;0_Cmd171|Str=1020
;Un-comment the lines above and add the text
;1036=Sehrohrtiefe!|Wahrschau: Angriffssehrohr defekt!
;1020=Alle Maschinen stopp!|Schadensreport: Angriffssehrohr defekt!
;to your data\Menu\de_menu.txt to be warned when ordering periscope depth
;or stopping the engines.
;----------Attack periscope failure end-------------------------------
;
;
;----------Snorkel failure feature begin------------------------------
[2:data\Cfg\Commands_en.cfg]
;Lock the snorkel.
;If it is raised one can lower it via the engineer, but not raise again.
;Chance: 8%
ApplyToPeriod=19390101|19450508
ChooseFrom=12
RndMidPat=1

0_Cmd156|MnID= ; Empty MnID
0_Cmd158|Key0= ; Empty command
;0_Cmd195|Str=1037
;0_Cmd171|Str=1021
;Un-comment the lines above and add the text
;1037=Snorkel depth!|CAUTION: Snorkel out of order!
;1021=All stop!|Damage report: Snorkel out of order!
;to your data\Menu\en_menu.txt to be warned when ordering snorkel depth
;or stopping the engines.


[2:data\Cfg\Commands_de.cfg]
ApplyToPeriod=19390101|19450508
ChooseFrom=12
RndMidPat=1

0_Cmd156|MnID= ; Empty MnID
0_Cmd158|Key0= ; Empty command
;0_Cmd195|Str=1037
;0_Cmd171|Str=1021
;Un-comment the lines above and add the text
;1037=Schnorcheltiefe!|Wahrschau: Schnorchel defekt!
;1021=Alle Maschinen stopp!|Schadensreport: Schnorchel defekt!
;to your data\Menu\de_menu.txt to be warned when ordering snorkel depth
;or stopping the engines.
;----------Snorkel failure feature end--------------------------------
;
;
;----------Crash dive failure feature begin---------------------------
[3:data\Cfg\Commands_en.cfg]
;Crash dive not possible.
;Chance: 7%
ApplyToPeriod=19390101|19450508
ChooseFrom=15
RndMidPat=1

0_Cmd201|MnID= ; Empty MnID
0_Cmd201|Key0= ; Empty command
;0_Cmd171|Str=1022
;Un-comment the lines above and add the text
;1022=All stop!|Damage report: No crash dive possible!
;to your data\Menu\en_menu.txt to be warned when stopping the engines.


[3:data\Cfg\Commands_de.cfg]
ApplyToPeriod=19390101|19450508
ChooseFrom=15
RndMidPat=1

0_Cmd201|MnID= ; Empty MnID
0_Cmd201|Key0= ; Empty command
;0_Cmd171|Str=1022
;Un-comment the lines above and add the text
;1022=Alle Maschinen stopp!|Schadensreport: Alarmtauchen nicht möglich!
;to your data\Menu\de_menu.txt to be warned when stopping the engines.
;----------Crash dive failure feature end-----------------------------

Uber Gruber
12-01-09, 04:17 PM
Great idea! And good to see SH3 Commander being used to its potential.
:up:

Magic1111
12-02-09, 09:34 AM
Yes, great Idea ! :up: I will test it.......:ping:

Best regards,
Magic

EDIT: @ LGN1: Do I need to copy and paste the above lines from your Post #1 to the file SH3 Commander\Cfg\Randomised events.cfg ?

h.sie
12-02-09, 11:12 AM
great idea. unfortunately not from me....

LGN1
12-02-09, 11:49 AM
Yes, great Idea ! :up: I will test it.......:ping:

Best regards,
Magic

EDIT: @ LGN1: Do I need to copy and paste the above lines from your Post #1 to the file SH3 Commander\Cfg\Randomised events.cfg ?

Hi Magic1111,

yes, copy and paste the lines to your Randomised events.cfg file. If you want to have the 'damage report' then uncomment the mentioned lines and add the other lines to your data\Menu\de_menu.txt file (or en_menu.txt depending on your language settings).


@all: Thanks for the nice words. SH3 Commander is really powerful! One can implement thousands of such things :up: For instance, one could also add TDC failures, flak failures, deck gun problems,...

Cheers, LGN1

Magic1111
12-02-09, 05:24 PM
Hi Magic1111,

yes, copy and paste the lines to your Randomised events.cfg file. If you want to have the 'damage report' then uncomment the mentioned lines and add the other lines to your data\Menu\de_menu.txt file (or en_menu.txt depending on your language settings).


@all: Thanks for the nice words. SH3 Commander is really powerful! One can implement thousands of such things :up: For instance, one could also add TDC failures, flak failures, deck gun problems,...

Cheers, LGN1

Okay, many thanks for your reply, I´ll do so !

Best regards,
Magic

Weiss Pinguin
12-03-09, 12:59 AM
Just to be clear, by 'un-comment' do you mean remove the colons that come before certain lines?

LGN1
12-03-09, 01:50 PM
Just to be clear, by 'un-comment' do you mean remove the colons that come before certain lines?

yes, remove the semi(?)-colons ;

Lines starting with ; are comments.

Best, LGN1

Weiss Pinguin
12-03-09, 04:43 PM
Yes, semi-colons, that's what I meant. :smug: Adding this in now, hopefully my computer won't go down with the BSoD again...