SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SHIII Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=195)
-   -   [IDEA]: Reducing searchlights (https://www.subsim.com/radioroom/showthread.php?t=169588)

h.sie 05-16-10 03:41 AM

Hi WB,

this is very helpful, thanks! I did not know about the RndMidPatrol Variable. So there is a chance that SH3Cmdr can be used. Great.

But all these thoughts are useless if merchants in the war REALLY NEVER used their searchlights when in uboat alert state. Maybe it historically most accurate to completely remove the lights as schlechter_pfennig already did.

I dont know this.

h.sie

LGN1 05-16-10 05:54 AM

Hi all,

I tried to use SH3 Commander, but I am pretty sure it does not work (for my malfunction mod I tried to use it a lot). The comment in randomised events.cfg is missleading (at least my tests show different results). The problem is that each time you run SH3Commander the first thing is that it removes the old changes. Here is an old post from JScones:


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 (color and bold made by me, LGN1)
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!!!!

So, that's the problem. If the eqp file has been changed in port, the changes will be removed when you run SH3 Commander the second time during a patrol (eqp files will not be modified again during a patrol). Would be great if SH3 Commander would keep a log file with the changes that have RndMidPat=0 and reactivate the changes during a patrol. To summarize, the RndMidPat=0 means that you can GET the change only in port, but you LOOSE it at sea (if you run Commander again). At least, that's what my tests show.

The only solution via SH3 Commander would be not running it again during a patrol.

LGN1 05-16-10 05:58 AM

Quote:

Originally Posted by h.sie (Post 1393508)
Hi BBW, yes I mean mid patrol saves. If you save a patrol, then apply changes to the .eqp files and then load the patrol again with modified .eqp files, then the changed equipment can lead to CTD. I think this is what LGN1 said, and it sounds logical.

...

greetings,
h.sie

Yes, that's what I meant. Thanks for clarifying.

In general, I think the idea with different equipment entries with different dates is great (assuming you can add enough entries to the eqp files without performance problems)!

Probably it would be enough for the ten most used merchants and between 1940 and 1943/44 (or when people stop using the deck gun).

Cheers, LGN1

Wreford-Brown 05-16-10 06:15 AM

Quote:

Originally Posted by LGN1 (Post 1394230)
Hi all,

I tried to use SH3 Commander, but I am pretty sure it does not work. The comment in randomised events.cfg is missleading (at least my tests show different results). The problem is that each time you run SH3Commander the first thing is that it removes the old changes. Here is an old post from JScones:


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 (color and bold made by me, LGN1)
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!!!!

So, that's the problem. If the eqp file has been changed in port, the changes will be removed when you run SH3 Commander the second time during a patrol (eqp files will not be modified again during a patrol). Would be great if SH3 Commander would keep a log file with the changes that have RndMidPat=0.

But if you use randomised events.cfg it writes it in as ser 20 and you only need to rewrite the exact line that you need to replace, so you may be able to add:
EQUIPMENT##|LinkName=NULL and it should get rid of the searchlight.

If you reverse engineer my mid-patrol radio orders mod you could give it a try.

LGN1 05-16-10 07:27 AM

Hi Wreford-Brown,

thanks for the comment. I took a look at your mid-patrol radio orders mod, but cannot see how it helps in the present situation :06: Could you please be a bit more specific?

I think the main problem is that SH3 Commander does not offer the option that some files are randomized/changed only in port AND kept in the same state over a patrol (while re-running SH3 Commander). In order to offer such a feature, it would need some kind of 'memory' (what I guess is difficult if you think of using SH3 Commander for different commanders/careers in parallel). Maybe JScones can comment on this.

Cheers, LGN1

Wreford-Brown 05-16-10 08:05 AM

If you can tell me which type of ship and which equipment number you'd like to test I can give you a few lines to paste into your randomised events.cfg file in commander.

The test will work best with just one type of ship (preferably a warship) and one that is quite easy to find in game for testing. For the initial test I'd be tempted to use a warship that is in one of the single missions so we don't add the complication of the _RND files.

I can also run up a test single mission with that specific type of ship if it's easier for you.

h.sie 05-16-10 08:15 AM

Thanks all for your co-operation.

Since Plan B (using SH3-Cmdr.) is still a little bit nebulous for me, I'm thinking primary about Plan A: Pseudo-Randomizing the availablity dates for the searchlights of the 10 (-20) most commonly used merchants/tankers (in convoys).

While searching through Campaign_RND.mis in order to find out which merchants are most commonly used in convoys, I found entries like this:

[RndGroup 210.RndUnit 1]
Type=101
Origin=British
Side=0
No=2

Ok, there will be spawned 2 British Tankers (Type=101). But which ones? In the Roster/British/Sea directory one can find more than one tanker. Is this determined by random? If yes, it will be hard to find out which are the most commonly used ships.

Any suggestions / help?

Thanks, h.sie

Wreford-Brown 05-16-10 08:47 AM

In the _RND file it could spawn any Type 101 ship which are most of the tankers and the Whale Factory Ship. In order to get test results you'd have to adjust all of these ships.

If you're trying to test you could go into one of the single missions and see what ships are used. For example: the Airship Escort mission has two Clemson Class destroyers, two Armed Tugboats and two Modern Medium Tankers so adjusting any of those should give you decent test results. I'd recommend setting the randomisation to 100% for the test (to ensure you get the results you're after) then adjust the randomisation until you get the effect you're after. Load times are also shorter than the full campaign :up:.

Do you mind if I investigate the SH3 Commander route? I have no intention of creating a rival mod (too much hard work!) but if I can get this to work for your original idea then it opens up a few doors for some other ideas I've got.

LGN1 05-16-10 10:06 AM

Sorry, I don't know what we want to test :oops:

- Whether the searchlights can be removed via randomised events.cfg? Sure, they can. No problem. E.g.,

[0:data\Sea\NKC3\NKC3.eqp]
;Remove searchlight
;Chance: 10%
ApplyToPeriod=19400101|19450508
ChooseFrom=10
RndMidPat=1

0_Equipment 19|LinkName=NULL
0_Equipment 20|LinkName=NULL



- Whether changing the eqp file and loading a save game created with a different eqp file can lead to a CTD? Well, my tests showed this.

The basic question/problem is how can we change the eqp files with SH3 Commander without having different eqp files during a patrol?

Cheers, LGN1

h.sie 05-16-10 10:13 AM

Hi WB,

you misunderstood me. I looked in the RND.mis not for testing purposes, but for finding out which are the most commonly used ships in convoys.

No, I don't mind if you investigate the SH3-Cmdr-Route. I am thankful.
There is no rivalry. We are doing our best to make SH3 as good as possible. There is no "my idea" or "my mod".

Thanks for helping,
h.sie

h.sie 05-16-10 10:19 AM

@LGN1: Since I'm pessimistic regarding SH3Cmdr, I'm following Plan A: Randomizing availability dates for the 10-20 most commonly used convoy ships. And currently I look into RND.mis in order to find out which ships are most commonly used.

LGN1 05-16-10 10:26 AM

Hi h.sie,

as you already pointed out, the rnd layer is not very useful for finding out which ships are frequent. I would start with type 102 ships (freighters).

Whether realistic or not, the searchlights are annoying in the game and make ships harder/more risky to sink. So, I would first remove them from small type 102 ships to keep sinking larger ones more difficult/risky.

h.sie 05-16-10 01:14 PM

Maybe I found an easy solution which could be done smartly using Sh3-Cmdr randomize function.

For testing purposes I edited the .dat file of a merchant and moved the position of the L01 and L02 Nodes for the searchlights out of the visible range by setting the Translation Y value to 1E8. Don't know where the searchlights now are, but I cannot see them anymore. Maybe they are on the moon.

This could be done easily using Sh3-Cmdr individually for each ship with a new randomization for each start of the game. The CTD caused by changed equipment mid-patrol and reported by LGN1 will not happen!

Only a little mid-testing report. Have to test, whether the searchlight on the moon can cause CTD. But I'm optimistic that it doesn't.

Furthermore I have to test, whether moving the searchlight up really makes my uboat less visible to the enemy. I'm also optimistic in this point.

And then I have to test, whether changing the .dat file mid-patrol can cause CTDs.

h.sie 05-17-10 12:45 PM

After numerous tests (some with 20 ship convoys) I can say:

1) No CTD so far - when searchlights moved out of visible range.

2) No CTD so far - when saving mid patrol, then moving lights into or out of visible range and than reload that patrol.

Only thing left to be tested: Is my Uboat really less visible when searchlights moved out of visible range? (Or is the visibility of my Uboat hardcoded and independent of the Y-position of the searchlight???)

Then I have to become familiar with SH3-Cmdrs Randomized Events.cfg in order to automatically modify the Y-Position of the lights, which are floatingpoint values. Don't now if SH3 supports floatingpoint.

After that and if test results are positive, one can easily modify SH3-Commanders Randonized Events.cfg and make one entry for each ship to "remove" its searchlights by a certain and individual chance, let's say 90%. Every time SH3 is started using SH3-Cmdr, a new randomisation will occur for each ship type.

Chances getting better that it will work.

Drawback: It's possible that a ship has a searchlight before saving a game and the same ship doesn't have a light after reloading. But that's okay. Maybe Bernard lost the fuse.

h.sie 05-17-10 01:19 PM

Yeah. UBoat is much less visible when searchlights moved away. (I thought that maybe visibility is independent of the searchlights Y-position).

Only thing left to do is to find out how to modify Y-Position floating point value using SH3-Cmdr.


All times are GMT -5. The time now is 02:38 AM.

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