raymond6751
08-26-13, 09:51 AM
I have what I believe is a good idea for a mod. I could take the time to learn Python or C++ programming which are already known
by many of our current modders. I could take the time to research the game data files to find the settings needed to be modified,
but that research has already been done by our excellent modding community. It seems best to save time and lay out my concept
so that we can jump ahead in time and have something sooner. Here are my concepts for the mod.
In real life no sub left port with all systems 100% functioning and many minor and major faults happened at sea that had nothing to
do with enemy action. My idea is to run a program or script each time the game is started. Each system on board that can
malfuntion or work at reduced effectiveness will have, in our program, a current setting, a growing percentage chance of failure, a
fixed or random change to that chance of failure (for next check), and will be tested using that percentage against a randomly
generated number. If no failure occurs the chance of failure is increased by a small random number. There would also be a random
chance for repairs that could be based on crew experience and/or morale.
Crew morale can be affected in small amount for each fault or for the number of faults that have happened on the patrol. Repairing
things could increase crew experience.
Systems already set up in game for damage and repair can be set in motion by changing the damage value for the equipment, as if
done in combat. I think that would be nice but have to happen during play. My events happen prior to loading the game, altering
things such as those found in the config files:
MaxSpeed=16.0;17.2
MaxSpeedSubmerged=8.0
[Salvo]
1=1,3,2,4
2=1,2,4
[Properties]
PeriscopeDepth=12.0
SnorkelDepth=14.0;10.0
CrashDepth=151;70;meters
MaxDepth=200;500;meters
DiveDepth=100;40;meters
SurfaceDepth=4.5;meters
[EngineProperties]
AllStop=0.00
AheadSlow=0.25
AheadOneThird=0.57
AheadStandard=0.80
AheadFull=0.94
AheadFlank=1.00
BackSlow=-0.26
BackStandard=-0.40
BackFull=-0.53
BackEmergency=-0.66
These and other settings can be altered to reflect malfunctioning systems. For instance, engine faults may reduce maximum speed
to less than maximum default. Depth keeping fault could make Periscope Depth 13 meters instead of 12. Minor changes that affect
the ship performance until corrected. A full salvo might fire 3 instead of 4 shots, with one tube not launching.
At first run through, all systems are 100% (game default), on leaving port. That changes by small amounts for each working system
aboard. In the beginning of a patrol there is little chance of failure, but still a chance. As the mission goes along the percentage
chance numbers are increased slightly each time the game is loaded. Eventually, things will begin to happen. Systems that have a
numeric value, such as speed or range, can be altered by a random amount. My damage concept records equipment gripes.
The repair of systems can have a random chance of success, a number of attempts (one per game load), a max number of attempts
before success, and suitable text messages that will inform the Captain of the situation. Such messages will be in the Message
Box/log. If that last is not possible as separate text file can be written and displayed before the game is loaded up.
The text messages are key to the mod. At load up the player will see, aside from the usual messages, a list of any equipment gripes
or repairs made since last load. He then knows the state of his ship.
During play the gripes are not repaired. My idea runs just before loading the game config files, which means it runs before loading
the game itself. The data files are modified (originals backed up upon install and first run) so that we are 1> altering the startup
state of the systems to our numbers, and 2> modifying the saved game file to the extent of adding our messages to the message
box and/or log file. (Careers only)
The mod program .exe or script runs first and then the game is loaded. This can be accomplished by use of a batch file, from the
days of MS-DOS. I have been using one for a while to first load a personal log file in notepad and then load the game. The batch file
resides in the same folder as the game exe file. The shortcut to run the game actually runs the batch file. Here is what that looks
like.
>>>> contents of my sh5.bat file <<<<<<<<<
Captain's Log for SH5
rem @echo off
start "U-44 Captains Log" notepad.exe "sh5log.txt"
rem pause
start "" sh5
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
The sh5log.txt file is also in the game folder and was in use before TDW made his log updating in the UI mod.
I hope that someone will be able to get this concept working. I know it will add to the realism of the game. I just don't have the
expertise to do it in a timely fashion. HELP! :06: :hmmm:
by many of our current modders. I could take the time to research the game data files to find the settings needed to be modified,
but that research has already been done by our excellent modding community. It seems best to save time and lay out my concept
so that we can jump ahead in time and have something sooner. Here are my concepts for the mod.
In real life no sub left port with all systems 100% functioning and many minor and major faults happened at sea that had nothing to
do with enemy action. My idea is to run a program or script each time the game is started. Each system on board that can
malfuntion or work at reduced effectiveness will have, in our program, a current setting, a growing percentage chance of failure, a
fixed or random change to that chance of failure (for next check), and will be tested using that percentage against a randomly
generated number. If no failure occurs the chance of failure is increased by a small random number. There would also be a random
chance for repairs that could be based on crew experience and/or morale.
Crew morale can be affected in small amount for each fault or for the number of faults that have happened on the patrol. Repairing
things could increase crew experience.
Systems already set up in game for damage and repair can be set in motion by changing the damage value for the equipment, as if
done in combat. I think that would be nice but have to happen during play. My events happen prior to loading the game, altering
things such as those found in the config files:
MaxSpeed=16.0;17.2
MaxSpeedSubmerged=8.0
[Salvo]
1=1,3,2,4
2=1,2,4
[Properties]
PeriscopeDepth=12.0
SnorkelDepth=14.0;10.0
CrashDepth=151;70;meters
MaxDepth=200;500;meters
DiveDepth=100;40;meters
SurfaceDepth=4.5;meters
[EngineProperties]
AllStop=0.00
AheadSlow=0.25
AheadOneThird=0.57
AheadStandard=0.80
AheadFull=0.94
AheadFlank=1.00
BackSlow=-0.26
BackStandard=-0.40
BackFull=-0.53
BackEmergency=-0.66
These and other settings can be altered to reflect malfunctioning systems. For instance, engine faults may reduce maximum speed
to less than maximum default. Depth keeping fault could make Periscope Depth 13 meters instead of 12. Minor changes that affect
the ship performance until corrected. A full salvo might fire 3 instead of 4 shots, with one tube not launching.
At first run through, all systems are 100% (game default), on leaving port. That changes by small amounts for each working system
aboard. In the beginning of a patrol there is little chance of failure, but still a chance. As the mission goes along the percentage
chance numbers are increased slightly each time the game is loaded. Eventually, things will begin to happen. Systems that have a
numeric value, such as speed or range, can be altered by a random amount. My damage concept records equipment gripes.
The repair of systems can have a random chance of success, a number of attempts (one per game load), a max number of attempts
before success, and suitable text messages that will inform the Captain of the situation. Such messages will be in the Message
Box/log. If that last is not possible as separate text file can be written and displayed before the game is loaded up.
The text messages are key to the mod. At load up the player will see, aside from the usual messages, a list of any equipment gripes
or repairs made since last load. He then knows the state of his ship.
During play the gripes are not repaired. My idea runs just before loading the game config files, which means it runs before loading
the game itself. The data files are modified (originals backed up upon install and first run) so that we are 1> altering the startup
state of the systems to our numbers, and 2> modifying the saved game file to the extent of adding our messages to the message
box and/or log file. (Careers only)
The mod program .exe or script runs first and then the game is loaded. This can be accomplished by use of a batch file, from the
days of MS-DOS. I have been using one for a while to first load a personal log file in notepad and then load the game. The batch file
resides in the same folder as the game exe file. The shortcut to run the game actually runs the batch file. Here is what that looks
like.
>>>> contents of my sh5.bat file <<<<<<<<<
Captain's Log for SH5
rem @echo off
start "U-44 Captains Log" notepad.exe "sh5log.txt"
rem pause
start "" sh5
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
The sh5log.txt file is also in the game folder and was in use before TDW made his log updating in the UI mod.
I hope that someone will be able to get this concept working. I know it will add to the realism of the game. I just don't have the
expertise to do it in a timely fashion. HELP! :06: :hmmm: