View Full Version : [IDEA] Rethinking malfunctions + sabotage.
rudewarrior
02-24-13, 06:02 PM
Hi everyone,
I have been thinking about how the malfunctions + sabotage (M+S) feature for SH3 Commander is implemented. When I leave port, I save and exit the game right after the first weather change. The reason is that I run two mods that need to run externally to the game and they both import information into SH3, namely my own "JFO!" Mod and SH3 Gen. So that got me thinking a little bit. :hmmm:
I was looking through the Randomised events.cfg [sic] file for SH3 Commander and I was looking at how it is structured. I noticed for some of the M+S features, that they are randomized in mid-patrol, and some are not. I did some searching in the forum, and it appears that it was decided that some of the things that could go wrong would be severe enough to cause a return to port, and some things could just be dealt with, i.e. they are things that would happen as typical issues on patrol, and could be fixed. They would typically be fixed using resources on the boat and time, and this would theoretically be simulated by saving and reloading the game. Hopefully, the randomization would "make the problem go away." However, it could be randomized such that it would be worse.
On the whole, I like the simulation and it has some good ideas.:up:
But I'm wondering if the format can be used to add something else to the game. :06:
What I am thinking about, if possible, is setting up the .cfg file to act in conjunction with an idea. That idea would be that the Kaleun would perform a shakedown at the beginning of the patrol to determine whether or not the boat was seaworthy and make a decision about returning to port.
The shakedown procedure could be written out for players to follow. It could also include some indicator that lets them know if the level of problem they are experiencing is bad or not. At this point they would have to make a command decision. Do I go back to port or do I continue on with what I have? What it if gets worse? Will it get better?
I'm still fleshing this out as an idea. However, I'm thinking about one aspect of how it works, and I'm curious if anyone has an answer for me.
Say I have an entry that sets the time for reload on the flak guns. For this entry if I set RndMidPat=1 it means that it will randomize the condition in the middle of the patrol.
What exactly does RndMidPat=0 mean? Does it mean that if the condition occurs, it stays with you throughout the patrol, or only until the first in-patrol reload?
Let's assume it does apply throughout the patrol. If I have two entries in the file for the flak guns, one with RndMidPat=0 and RndMidPat=1, which one takes precedence? Can this even be done?
If I have the answers to these, I might be able to flesh this out. I may have to run these experiments myself, but if anyone has answers, that would help a lot.
Thanx in advance.:up:
La vache
02-25-13, 09:09 AM
Hallo rudewarrior
What exactly does RndMidPat=0 mean? Does it mean that if the condition occurs, it stays with you throughout the patrol, or only until the first in-patrol reload?RndMidPat=0
Damage only at the beginning of the Patrol. After you save and load game, these are repaired.
I've also missing a damage report, or query from LI.
Let's assume it does apply throughout the patrol. If I have two entries in the file for the flak guns, one with RndMidPat=0 and RndMidPat=1, which one takes precedence? Can this even be done?I can not say if this works.
But they can RndMidPat=1 and ChooseFrom=2
ChooseFrom=2
RndMidPat=1
0_xxxxx=value; with failure.
This is a chance of 50% damage or repair.
You can ChooseFrom higher value and more entries on your taste.
greeting
La vache
Hi rudewarrior,
here is an important post from JScones about how SH3 Commander works:
When you press "Launch SH3!", SH3Cmdr performs the following steps in this order (for the sake of brevity, let's just assume that an existing career is being launched):
1. Removes previously installed files
2. Reads SH3Cmdr settings/options
3. Determines whether career will be retired (if option selected)
4. Determines next patrol start date
5. Copies into SH3 any Flotilla folder files
6. Copies into SH3 any U-boat folder files
7. Copies into SH3 any Date folder files
8. Copies into SH3 any Random folder files
9. Determines whether crewman will be retired (if option selected)
10. Writes Text Settings to **_menu.txt
11. Writes Menu variable text to **_menu.txt
12. Writes Days in Base value to Basic.cfg
13. Writes Crew fatigue model to Basic.cfg (if option selected)
14. Writes correct U-boat availability dates to Basic.cfg (if option selected)
15. Writes deck gun settings to GUNS_SUB.sim (if option selected)
16. Writes water density setting to scene.dat (if option selected)
17. Writes wave height setting to scene.dat (if option selected)
18. Writes random tonnage variations
19. Writes random crush depth
20. Writes random events
21. Writes static settings
22. Randomises Gramaphone tracks (if option selected)
23. Launches SH3!!!!
This allows you to understand which settings can over-write other settings (e.g., entries in 'static settings.cfg' overwrite entries in 'randomised events.cfg')!
During a patrol the 'RndMidPat=0' entry will be just ignored. Only the 'RndMidPat=1' for the flak gun will be considered.
In general, you can have several entries for the same file / same parameter in randomised_events. However, these are applied successively, i.e., the last entry can over-write the previous ones.
Regards, LGN1
rudewarrior
02-25-13, 05:36 PM
Hi guys,
I'm starting to think my idea as conceived isn't going to work from some of the further research I've been doing on the boards.
One of the posts I came across said:
The RndMidPat=1 means if you get a loaded file upon startup it is deemed "repairable" should you save/exit/relaunch. Commander will roll the dice again you may get nothing, you may get something else.
A RndMidPat=0 means that should you get a file, that "particular" malfunction is good for the duration of the patrol. NO matter when it is issued
Now, lets say you launch commander upon beginning a patrol. You draw a Mal file with RndMidPat=1, you play awhile then save/exit/relaunch. Upon relaunching, commander rolls the dice fresh-you may get nothing, you may get a different Mal file or there's a "hugely remote" possibility that you may get the same one back again.
On the second re-launch If Commander deals you a Mal file with RndMidPat=1
that also is repairable. However, if commander issues you a Mal file with RndMidPat=0 you are stuck with it for the length of the patrol.
A "0" file can be issued at any time commander launches, same as a "1" file.
The impression I get from this is that the difference between RndMidPat=0 and RndMidPat=1 is that the 0 condition results in a permanent issue for your boat and the 1 condition results in a temporary issue that can have a status change upon reload. But each can be issued at any time during the patrol. But I have to confess, this really doesn't seem to make sense. :doh:
But another issue is the rollback option. It seems that if you automatically rollback upon exit, then there is actually no difference between the 0 and 1 condition. :o
I can't find anything that indicates that SH3 Commander somehow retains info about your particular patrol other than a single line entry in SH3Cmdr.ini located in the main folder. It lists a series of dates and numbers. Although I can't say what they specifically are, they don't seem to correspond to the Randomised event.cfg file in any way.
Unless, I can get this completely sorted out, I'm not really seeing much of a future for this, if any.
I guess these are the questions that I need to have answered with absolute certainty.
Explicitly, what does the entry RndMidPat=0 imply?
Explicitly, what does the entry RndMidPat=1 imply?
What exactly is the difference between the two?
If you do not rollback SH3 Commander, how are each of the above conditions applied?
If you rollback SH3 Commander, does it retain the malfunctions and/or sabotage assigned to your boat on launch of SH3 Commander?
It may just be a dead idea. :dead:
badwolf
02-25-13, 09:22 PM
I worked on an external program that was called up by SH3 Commander.
There was a weather mod, think it was something to do with persistent bad weather when leaving port. Well that mod was called up by SH3 Commander, when the weather mod closed it passed back to Sh3 commander which launched the SH3. I don't know if the latest SH3 Commander still has that command in, but I'd bet it is. You can make an external program to collect data from the saved files and do anything you want with it, then update SH3 similar to how Commander does it. The possibilities of what a program like this can do is enormous using the collected saved game data. I know this works, as I tested it out.
I even edited the weather name in SH3 Commander to my own program name and it worked, but leaving it as named is a lot easier for everybody.
Wreford-Brown
02-26-13, 07:17 AM
I guess these are the questions that I need to have answered with absolute certainty.
Explicitly, what does the entry RndMidPat=0 imply?
Explicitly, what does the entry RndMidPat=1 imply?
What exactly is the difference between the two?
If you do not rollback SH3 Commander, how are each of the above conditions applied?
If you rollback SH3 Commander, does it retain the malfunctions and/or sabotage assigned to your boat on launch of SH3 Commander?
It may just be a dead idea. :dead:
1. RndMidPat=0 means that this particular entry in sabotage will not be applied mid-patrol.
2. This particular entry in sabotage may be applied mid-patrol.
3. I believe this is to do with when you load the game. SH3 Commander is an external engine therefore should not be able to affect the game whilst you are playing it (SH3 loads all game data on first load, therefore it can't have an effect on the game files mid-play). If you are loading a new game in port then it will roll a dice for each RndMidPat=0 entry plus every RndMidPat=1 entry. If you're loading a mid-patrol save then it will only roll a dice for each RndMidPat=1 entry.
4. If you don't rollback SH3 Commander then the malfunction or sabotage remains in place... forever. This is because it has rewritten the game files and rollback prevents it from deleting the changes.
5. No - rollback deletes all previous changes to the files so I don't see how it can remember old problems. This is part of the 'save game and reload and your crew may have solved the problem' answer.
Can anyone check me on these?
rudewarrior
02-26-13, 11:56 AM
Just to check for understanding.
1. RndMidPat=0 means that this particular entry in sabotage will not be applied mid-patrol.
2. This particular entry in sabotage may be applied mid-patrol.
3. I believe this is to do with when you load the game. SH3 Commander is an external engine therefore should not be able to affect the game whilst you are playing it (SH3 loads all game data on first load, therefore it can't have an effect on the game files mid-play). If you are loading a new game in port then it will roll a dice for each RndMidPat=0 entry plus every RndMidPat=1 entry. If you're loading a mid-patrol save then it will only roll a dice for each RndMidPat=1 entry.
It seems from these two statements that HEMISENT's post is incorrect. What you have stated here makes more sense, and seems to fit into my anecdotal observations as well. So I think that it is safe to assume that everything you have said here is true. :up:
4. If you don't rollback SH3 Commander then the malfunction or sabotage remains in place... forever. This is because it has rewritten the game files and rollback prevents it from deleting the changes.
5. No - rollback deletes all previous changes to the files so I don't see how it can remember old problems. This is part of the 'save game and reload and your crew may have solved the problem' answer.
Can anyone check me on these?
I am assuming by forever you mean until the end of the patrol (or your u-boat is sunk, as that counts as forever, I guess :D)?
In light of your answer to #5, can anyone confirm this? From everything I can tell, it seems that how the rollback works would imply what you say.
I'd also like to know if it applies between careers. For example, I'm in career #1 with a permanent condition. I save/exit and start playing career #2. If I go back to career #1, will the permanent condition still be in place?
Generally, incorporating a mod that would explicitly require that you do not roll back SH3 Commander is a worrisome mod indeed. :nope: If I was to consider doing this further, I would need some absolute confirmation of which is the case.
Wreford-Brown
02-26-13, 02:39 PM
Just to check for understanding.
It seems from these two statements that HEMISENT's post is incorrect. What you have stated here makes more sense, and seems to fit into my anecdotal observations as well. So I think that it is safe to assume that everything you have said here is true. :up:
HEMISENT wrote malfunctions and sabotage for SH3 Commander, but both his statement and mine say the same thing from slightly different angles. Our statements support one-another.
I am assuming by forever you mean until the end of the patrol (or your u-boat is sunk, as that counts as forever, I guess :D)?
In light of your answer to #5, can anyone confirm this? From everything I can tell, it seems that how the rollback works would imply what you say.
I'd also like to know if it applies between careers. For example, I'm in career #1 with a permanent condition. I save/exit and start playing career #2. If I go back to career #1, will the permanent condition still be in place?
The answer to this is probably in careers.cfg in your savegames (C:\Documents\SH3\data\cfg\Careers). This file appears to save any damage. As SH3 Commander imposes standard damage, maybe it appears in here :hmmm:
Hi all,
when I experimented with the randomized events file I was also confused by the old post from HEMISENT. I came to the conclusion that this post is simply wrong. From all my testings I concluded that SH3 Commander has no memory. As soon as you rollback or reload via SH3 Commander all previous settings are lost. If you choose not to rollback during a career you also must not launch the game via SH3 Commander anymore. This, however, makes the RndMidPat parameter somehow useless. In addition, you have to take care of this when calculating failure rates (because you basically throw the dice only once per patrol).
You can easily check all these things by having an event with 'choosefrom=1' and a single case (i.e., 100% probability) with RndMidPat=0. You should always get the event when leaving port, but after reloading it should be gone and never come back during a patrol. Do the same with RndMidPat=1 and you should always have it.
All these findings are in line with JScones post from above, especially, '1. Removes previously installed files'.
Regards, LGN1
PS: Here is a link to an old discussion of this topic:
http://www.subsim.com/radioroom/showthread.php?t=147237&highlight=install+SH3&page=28&langid=1
Wreford-Brown
02-26-13, 03:50 PM
Hi all,
when I experimented with the randomized events file I was also confused by the old post from HEMISENT. I came to the conclusion that this post is simply wrong. From all my testings I concluded that SH3 Commander has no memory. As soon as you rollback or reload via SH3 Commander all previous settings are lost. If you choose not to rollback during a career you also must not launch the game via SH3 Commander anymore. This, however, makes the RndMidPat parameter somehow useless. In addition, you have to take care of this when calculating failure rates (because you basically throw the dice only once per patrol).
You can easily check all these things by having an event with 'choosefrom=1' and a single case (i.e., 100% probability) with RndMidPat=0. You should always get the event when leaving port, but after reloading it should be gone and never come back during a patrol. Do the same with RndMidPat=1 and you should always have it.
All these findings are in line with JScones post from above, especially, '1. Removes previously installed files'.
Regards, LGN1
PS: Here is a link to an old discussion of this topic:
http://www.subsim.com/radioroom/showthread.php?t=147237&highlight=install+SH3&page=28&langid=1
:yep:
So my answers are:
I guess these are the questions that I need to have answered with absolute certainty.
Explicitly, what does the entry RndMidPat=0 imply? This feature is ignored if SH3 Commander states 'At sea during patrol XX'.
Explicitly, what does the entry RndMidPat=1 imply? This feature/event can happen all the time when loading a career.
What exactly is the difference between the two? s. above
If you do not rollback SH3 Commander, how are each of the above conditions applied? When you launch via SH3 Commander the changes are lost.
If you rollback SH3 Commander, does it retain the malfunctions and/or sabotage assigned to your boat on launch of SH3 Commander? No.
rudewarrior
02-26-13, 09:04 PM
So yeah, certain statements in HEMISENT's post are incorrect and confusing. :doh:
And it appears that SH3 Commander's RndMidPat feature really doesn't actually accomplish what it originally intended. :huh:
It appears that it's original purpose was that an item with RndMidPat=0 would be a die roll at the beginning of the patrol. I assume at this point it was originally intended that whatever the outcome, it was supposed to stick with you throughout the patrol. Then an item with RndMidPat=1 would be something that would be temporary and (possibly) fixable by the crew.
However, the way it seems to work, it is all dependent on rollback. If you don't roll back, you can get 0 and 1 conditions, which essentially treats a 1 condition as a 0 condition. If you do rollback, when you launch again on the same mission, you can only get 1 conditions, which also means a 0 condition is ruled out/removed altogether.
This makes me think my mod idea won't work, and what I may do is turn all of my 0 conditions into 1 conditions.
Normally, what I do is I only allow myself to save the game immediately after the weather changes, and I just deal with the problems that I have. This way, when I am engaging, it is as if I "just discovered the problem," and I just have to deal with it. Since we can't really really cause random malfunctions right in the middle of patrols, I try to find a way to make it such that I am forced into situations sometimes where the boat is not working at 100%, probably something that was a factor as the war progressed.
Unless someone has some better suggestions?
Ultimately, I think that's it for this idea. :wah:
Thanx for the help guys! :salute:
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.