PDA

View Full Version : [REL] Wirebreak Mod (assembly code modding)


Skwabie
02-20-19, 09:31 PM
-WirebreakSpeedThreshold in weapons.txt now works. Wire break chance only affected by speed.

-Angled tube jams at ~10% chance (speed / 300) above 30.5 knots.

-Snake search pattern changed to much narrower. Default is 10deg/sec for 9 seconds turns. Changed to 2 deg/sec turn for 20 seconds.

-Torpedo vertical homing algorithm changed to pure pursuit. - By default it was only altitude difference based and has nothing to do with slant range. Torpedoes thus are mostly immune to large height difference/maneuver when homing.

-Torpedo run deep depth set to 200ft above sea floor, or 1000ft, whichever is shallower.

-“Advanced” torpedoes (sensor angle >=55 deg) reject wrecks, whales and oilrigs, and have a routine to evade if the target it locks on to is destroyed by another torpedo: stop homing - dive to run deep depth – snake search. Exception: countermeasure homing when target destroyed or evaded, upon which it will only circle search.

-AI launched torpedoes with sensor range above 2700yards will use drive through on jam. Below 2700 – drive around jam. By default AI torp drivethrough/drive around is based on chance. Player launched torpedoes: drive through jam on passive homing, drive around jam on active homing.

-AI launched torpedoes: sensor angles < 45 deg – snake; sensor angles between 45 and 55 deg – chance for either snake or straight; sensor angles > 55 deg – straight search.

-Player ASW missile torpedo will dive to depth of closest enemy at drop point and trigger AI reaction, and can also target surface ships.

-Sonar ping lines fade much slower so can get a solid bearing out of it.

-Max number of helos increased to 8 and min number ~ half of TF total. More chance for 8 if total helo count above 8. Initial patrol radius increased.

-Fixed wing aircraft is much less sticky.

-Enemy torpedoes can hit surface ships again.

-Mission start spawn range increased, by decreasing sonar contact strength requirement.

-AI detection range against player missile is largest at missile launch. Missiles have size factor 0.4 within launch +7 sec (booster is bright and lotta smoke), 0.2 outside launch +7 sec, 0.25 beyond waypoint. – Don Kay search radar range 50k yards, so launch detection 20kyds, missile detection 10k, active missile 15k. AI will only counter fire if launch detection. Largely decreased radar detection points on player by detecting player missiles.

Small tweaks against other AI... simplifications.


update:

-Fixed player ASW missile bug.
-Restored helicopter navigation.
-Player Mast radar returns reduced.
-Player visual range bumped.
-Periscope max zoom factor set to x64.


update2:

-Fixed torpedo deep run depth bug under surface ice.

-Ping lines fade a little faster.

-New entry in config.txt:
HeloMADMultiplier
Gives helicopters a MAD detection range multiplier so they are not completely useless - or not, default is 1... In config.txt it would look like (7.5 my own setting)

...
MADDetectionRangeInYards=400
HeloMADMultiplier=7.5
-Simulates wide aperture flank array. New entries in sensors.txt:

SonarWAARange -- range of the WAA, ala 15000 yds for the Seawolf.
SonarWAATMARate -- Sol increase rate due to angle rate while in WAA range.
SonarWAATMABaseSol -- absolute Sol increase rate while in WAA range.

In sensors.txt it would look like

SonarModel=usn_an_bqq_10
SonarType=ACTIVE/PASSIVE
SonarFrequencies=L,L
SonarActiveSensitivity=32
SonarPassiveSensitivity=46
SonarBaffle=150
SonarNoisePerKnot=1
SonarOutput=235
SonarWAATMARate=10
SonarWAARange=15000
SonarWAABaseSol=5
With above settings perfect Sol can be achieved in 5-10 time units once within 15000 yds.

On the target data page, once target is in WAA range the RNG readout turns cyan:
https://lh3.googleusercontent.com/uNg_yi0McQtWx0pwF5aBPF6mWdN1lcSNGEyYyeP68W90OFCHBI w7gQ95YbB96bIbpJwZjbRt9r9RkKKrQU1_hFUgiAgw6gar_6Tz LpnIXUfzzzUd-atl3qNFqKcqur20vFt594-07Vka5JOAbf_h_14vLKI8t_GE6TAuWoKfXZWLCpN0D8jVsUia6 ciJDRImqOKWljCn2S8q9IS0hDwr7n0na39ZCizwW-2rfTE1IODj7qi-6GteyBpon0_XDUDHLdaustWf4XD9VMCFHOayv7th1vtsMjuNd7 q0VAmvTBPRnD5EUT5PTi4zjOhFtMGta8w82N15xkK1c0MN-7wN263bgZaPC1vjrHH8MYvrcKigIF5q4CouAWv_LkucqVxXqJL y_UA21eEem6jAYdssGR6pHVEGSUx0MLSxqpfrKIuNkMrl8u26E v81DGY-GXuKToQm8V35JxQ4sc8wMZK7dzHk0XguoIMshOH_UBujX1tr94 3CMm_Mc6-X7DPqhYGY9AxHhmRruIzCX_Wn2bBJGBtxOPyM-pYo4iHIVeTI6N8qCeoohYLuABtZxZZNYl0zDnyY1CDoXyZw3gF _pmE5QDdl2VsHoLnHdMCBk-OF-awqrM1HLY7P3I65V286MElKlg_lXNxcrBaadGut5EFeTD-JUdkIsJRPR-q0VMVYOPqZ2oHcoJ_mEl_-nd8Cbh7DGLa4H2xSiS_vXrLjRb7Dtym-=w333-h417-no

If the WAA cannont get a reading but the estimated range is within WAA range, the RNG readout turns yellow, indicating the estimate is false.
https://lh3.googleusercontent.com/dnVH5RRvQvPdXSg5Xr3nKdSgNTODtuAFzygwm81vVrkh_M40XM bHfRRKHaUaiCh85A5HoGD_c1C2fG-q2og972dDSUOH7kMswf5Ln-tvvm4FNcD6eQBrKLtt8Z4xAaal2pCLwFAEzB7rY5HOwayloV6P hqQK4UGG3wfsru9DYsw8HruJk99UjJXR4VghXWcxGAUGCyW5UL cYNUDEslDtYvIjFhWFnh9bqML_sRb8uw8UuMk3bory6MTEaqV7 vlbIqui7vwheeqTMaffHlvnmgbTJIHuAOVbS8eTv1yAt_U8-kKq4ihWCmS7ubAoHyPwfRrCSd85mEJYszywS9trh1_T9Y6kklR dfIDFNYudYKJq1Q7U-jAe438YFuVJ9l-USI0P1IDnkBZlI9x3F4kaSCK5cQVDi32oAxlQVERkt0-h9EXFOJniyhxQRRegRXfdzy-zWekjxlrCN466xf09dcgah5IxTQhzBgE5aae4stono8yiLyAge qL0_HPVz4wEbBtiS2CF_jpKIMft1_uKrigfoL--S18WzLyu1r-79C5fnhGWCNz0__ChIqwPlHq5YHwhJ3KN3qpt_GsX2WODOntiw cuUvQISpbcEf9vYWbenA0t4uu6vZbTyRbo-BBpTweaDBC99yHQwFoE5TxyI9Ow769GYFs8EcCdunFagdkqWBl tUTrs778E3jJ832mMxuoPhqEw0c6Pv-JdFOHYZtZ2ss=w333-h417-no


update3:

-New entry in \ColdWaters_Data\StreamingAssets\override\hud\defa ult.txt
PingLineFadeRate=
Changes tactical map ping line fade rate.
Game default is 0.5.

-New keystrokes:
-Stop Time Compression; Start Time Compression. Original “Set Time Compression” key renamed to “Toggle Time Compression”.
-Previous Tube.
-Previous Contact.
-Increase depth; Decrease depth. Changes depth control on helm panels by 50ft, works just like mouse clicking dive controls in the default game. Mouse control now changes depth on helm by 10ft intervals.
-Signature List Forward 5; Signature List Backward 5. Cycles through targeting list on the signature panel by 5 on each key press.

-MaxPitchAngle for missiles in weapons.txt all changed to 7.


update4:

(https://www.subsim.com/radioroom/showpost.php?p=2700680&postcount=35) description in post (https://www.subsim.com/radioroom/showpost.php?p=2700680&postcount=35)

Link (http://www.mediafire.com/file/gsj3rhwxor6xurp/Wirebreak_Mod_Upd4.rar/file)



Install:

1. Extract.

2. Backup all.

3. Extract and overwrite.

4. Keybinding in game options no longer works with expanded keylist. Better manually edit options.txt for new key assignments.


How?

Reflector (https://www.red-gate.com/products/dotnet-development/reflector/) (eating ramens this spring..) + Reflexil (http://reflexil.net/)
dnspy (https://github.com/0xd4d/dnSpy/) (awesome)
MS Visual Studio
A guide on steam (https://steamcommunity.com/sharedfiles/filedetails/?id=1316954316)




https://youtu.be/Gy86V4vuyqo

Skwabie
02-20-19, 09:37 PM
Sonar ping lines:
https://lh3.googleusercontent.com/lqRUneCjIXZUkHIEi5qTNeo67ltmhFij6XknjcA0u_YqRuL9_V OAoDwGLbQjJUmF37sfX5D9gYLRdrEgQQIYllO-IjAWPHLCAyMYjT6fOVJd8IRmhLRCjlrnImpCLZmcJmg42LpYsn QPTZBI1I_XbeTRRAajNazb2LzWF6haNoM_dn7W0sK6dWjKNoX_ uam7PN60Hfg9GveFikpyVKKmGJzW8XhYTMODE3KoaJ-Qrt7kKybDaYgWJAGnnLsEMV89ScHzB9xqnV-V2M2-gTVCUp4hqWH-IiGU95AoCjBiOCDCc4VhfjPZw6m-BnTJKJxLxxXQuBFpx3fZaFsKEWspIC4NHCyyISKzr74jcpEeL0 oPEpYwUbBCPQpUTQ0lQ1a4uwDVUeKoWUrdslHrF3t0l6nzeCiq 1-OC4jMlf_L6yLaQBw_4DXsPcrn7BGE6k51hCkK6RIqrudfZMAUx _v0Q2Kgdz13B5J7l-TrJuvDxAZv9YjOkZ7YkclOLVG0i11lwj0bBNGR0UhLu5yG9d99 Sk_txuz_faziQuCzxoZ_URybzAK67nE8Oecp4lJmoMmRg8_GoY kG-FWOVrZwKNqOJLEuXvWQiODeHJp_0L9No0P5imJmmeVmpt5Pi4C HzMJc1e6-943SYFvWXizEUS5b_FcnBdOLJtOOgGxGaoslIBffd8nnvnAQr-QOpbD7GqbN-lb6pVDllLb4jc--RNoomRs_C=w1127-h901-no

Torpedo snake pattern:
https://lh3.googleusercontent.com/PoKrfs6ZxUB43nLanzA969eHs5XaxxHRd-UPJE0fqEPjc16-wKSw6MZXLGY3JTphDGcbyyNflWO00tgYc2mwh68v_8H0Qa3HOC SZT8AlYvrF_v2J9bOfjx_PKixWQ5YKO4Bn9_qCEsDhF9fGo26H 06J_-7bSB9C4LM1_QWibldILWhPjw0dutdwHB7GpeYLa9fQDK3FRMYk 7ZTGOw02cLKl-diWIkOonRQdlDFMq7POXkS5hbfKf8QcNOK0DOIo_G7gGHnHVCv VrkxKmFg485dYiP8snMaYLF8LMjVcJArs0ogjGO6wSV2vtbDgO CPEiMRpA1tJQ6PeXxwG1ne8G_sP0LaEdrcQN0SXXDtAKdaC2h_ F85dR5xpN_qImCI3ioL5EvBVN3BJZPVA3KhKvD-G-vKTgaC3k0YbVYYhZdOGkhvYnr-OmJNskYJZxCvr4_gc2VMBZlRTn9hiU6JECEJECIx11_VxNP2m3 W-XVWziLxT3x8CpDRkM2QhuZ2BWJYX2DNMVEiBYFtKjXu_oerzOT l9P_XGgR7s2emF08MKRWJpNtwJSfQjAznDzT7BcU6O3pQ5Z-LrbYRmhbh9CXeEXAgvDKDF5oxoVYKDfzUhu2CFQuBJycHsOg7Z C8uOsZMGXojxz4cS4gkbIopZyGHaISNcAs3XRsn2JJ7EBk_32N KhvYsAmww_i3EFc_QqOZHaYUIokJQqHf6GmAz7CLDSyK-=w1127-h901-no

Torpedo vertical homing:
https://youtu.be/-Ws6G5pTa0k

Skwabie
02-21-19, 12:09 PM
update

Fixed player ASW missile bug.
Restored helicopter navigation.

Player Mast radar returns reduced.
Player visual range bumped.
Periscope max zoom factor set to x64.

jack33
02-22-19, 01:17 PM
Nobody thanks you for your work? I give you thanks:Kaleun_Salute:

CDR DPH
02-23-19, 09:30 AM
Thx, will give this a try.

Skwabie
02-23-19, 07:08 PM
update2:
-Fixed torpedo deep run depth bug under surface ice.
-New entry in config.txt: HeloMADMultiplier
-Simulates wide aperture flank array.

Details in OP.

CDR DPH
02-23-19, 07:41 PM
Everything seems to work well on my end. I find the longer display period for the yellow sonar lines a bit too long. Was playing a mission with 20 enemy ships and all I could see on the screen was yellow. :-)

Skwabie
02-23-19, 07:49 PM
Everything seems to work well on my end. I find the longer display period for the yellow sonar lines a bit too long. Was playing a mission with 20 enemy ships and all I could see on the screen was yellow. :-)
Tried to make it a config variable but failed. In update2 it was set to 0.015 - before was 0.01, last night I tried 0.02 but found it fade a little too fast so... Will try again later to externalize it!

CDR DPH
02-24-19, 04:17 PM
No rush, thx for your efforts.

jack33
02-25-19, 03:11 AM
Dear Skwabie. Thank you for your work. Would there be any possibility to make marks on the map, for example of waypoints or historical positions? Thanks again

CDR DPH
02-25-19, 08:51 AM
Here is a new issue that I suspect is related to the changes made to the dll.

I have given one of my US subs access to ss-n-16 torpedo launched asw missiles. After one of the updates to the dll, when these missiles are launch, they arc high into the air and then dive into the sea not far from where they were launched.

I believe the n-16s still worked after the first modification to the dll but one of the subsequent modifications may have broken them.

Skwabie
02-25-19, 05:37 PM
Update 3. Details in OP.

Will try again later to externalize it!
Success. PingLineFadeRate in \HUD\default.txt

Would there be any possibility to make marks on the map, for example of waypoints or historical positions?
Would be nice!... but seems to be beyond what I can do atm. But I'm also learning!

they arc high into the air and then dive into the sea not far from where they were launched.
Forgot that I changed that:X Original game set all missiles' maxpitchangle to 7 regardless of weapons.txt entry. I changed the game to follow the .txt entry and there's some missiles with MaxPitchAngle=89 in there and crash to sea after launch results. In update 3 I attached the edited weapons.txt.

CDR DPH
02-25-19, 10:09 PM
We're all learning right along with you.

One aspect that drives me insane, is having to select the torp in the weapons store first, then click on a swim option or depth setting. I'd like to cut my clicks in half and just toggle the setting by clicking on the appropriate box.

Probably not addressable by the type of modding you are doing, but if KFG ever asks for suggestions again, I've got a list. :-)

Thx.

jack33
02-26-19, 03:18 AM
Thank´s

JhonSilver
03-07-19, 03:43 PM
Great job !! Very interesting results.

jack33
03-08-19, 04:59 AM
No news:06:

CDR DPH
03-08-19, 08:16 AM
I've used the modified dll for while now and kind of like some of the changes.

The longer display period for sonar lines is both useful and cluttering. The reduced torp snaking arcs, I'm on the fence.

I do like that enemy torps can sink enemy vessels again. That's only fair if my own torps can sink me.

Me thinks that many of these changes should have been adjustable from within the options screen from the outset.

AllQuiet
03-22-19, 01:49 AM
Why do we need the Assembly-CSharp DLL file? Or for that matter, why do we need the dictionary and weapons file?

Wouldn't it be easier to simply post the changes you made in the text files instead of gathering up other files?

I have my own dictionary and weapons file and I don't want them disturbed.
In fact, every single file in the game has my fingerprint stamped on them now.

CDR DPH
03-26-19, 06:03 PM
Why do we need the Assembly-CSharp DLL file?

The dll is where the aspects that the modder wished to change are contained. These changes cannot be made by changes in any of the txt files alone. You need the other files (with their respective edits) to support the changes made in the dll.

AllQuiet
04-07-19, 07:46 PM
The dll is where the aspects that the modder wished to change are contained. These changes cannot be made by changes in any of the txt files alone. You need the other files (with their respective edits) to support the changes made in the dll.

Ok...nice improvement over stock weapon behavior. And I noticed a couple of things. Changing depths now have finer increments of 10 vs 50. Change you write the file so that we can use the shift key for larger depth increments and keep the finer increments for depth like you have it now?

I also noticed the F9 time acceleration was disabled. I'm not sure if this was a memory dump on my end or you culled it out on the dll file you created...

CDR DPH
04-08-19, 08:50 AM
I had to fiddle a bit to get F9 working again. The added commands to start/stop time compression seem redundant as F9 on its own works well enough. Maybe I am missing the point of the extra commands.

Hey skwabie - what sonar ping value did you use in the first set of dll changes that prompted me to complain that the ping lines were displayed for too long? I'm having difficulty finding a happy medium and do not know what numeric value range is available to be used. Thx.

VDNKh
08-23-19, 03:24 PM
So after playing around with this a little I love it and see a ton of potential since it looks like CW is no longer being patched.

One big bug with this is that, since hostile torps can hit surface ships now, the AI does not account for friendly fire at all and constantly sinks its own ships.

Badger343rd
09-26-19, 12:26 PM
I can't seem to get this mod to work.as I keep getting a string error relating to time compression.Any way to get this problem addressed?

VDNKh
10-13-19, 07:42 PM
I can't seem to get this mod to work.as I keep getting a string error relating to time compression.Any way to get this problem addressed?

Delete this file and let the game generate a new one:

AppData\LocalLow\Killerfish Games\Cold Waters\options.txt

partycat
04-26-20, 03:24 PM
I really liked this mod. However there is a problem I would like to mention.

When I install this mod, hostile torpedoes seems to ignore both MOSS and Noisemakers. If I launch the MOSS and if the torpedo acquires on MOSS, it doesn't ignore the MOSS (mostly) and homes onto it, however if the torpedo acquires on my sub first, there is nothing I am being able to do afterwards. It's just ignoring everything, MOSS, Noisemaker, Knuckles and keep homing at me. and since this mod also changes their pitch angles, it is impossible to evade by doing manuevers.

I'm not exactly sure but this issue might be occuring because of the torpedoes ignoring destroyed vessels and whales. So maybe there needs to be a tweak to the file.

I would very much appreciated if you could look into it. Thanks in advance :3

Aktungbby
04-26-20, 07:37 PM
partycat!:Kaleun_Salute:

M134
04-27-20, 06:57 AM
I really liked this mod. However there is a problem I would like to mention.

When I install this mod, hostile torpedoes seems to ignore both MOSS and Noisemakers. If I launch the MOSS and if the torpedo acquires on MOSS, it doesn't ignore the MOSS (mostly) and homes onto it, however if the torpedo acquires on my sub first, there is nothing I am being able to do afterwards. It's just ignoring everything, MOSS, Noisemaker, Knuckles and keep homing at me. and since this mod also changes their pitch angles, it is impossible to evade by doing manuevers.

I'm not exactly sure but this issue might be occuring because of the torpedoes ignoring destroyed vessels and whales. So maybe there needs to be a tweak to the file.

I would very much appreciated if you could look into it. Thanks in advance :3

Is this happens with all torpedoes, or wire-guided only?

partycat
04-27-20, 02:00 PM
Is this happens with all torpedoes, or wire-guided only?

I just made a test, it's with wire-guideds only. Although my torpedoes skill being blinded by hostile noisemakers eventhough they are still connected with wire.

M134
04-27-20, 03:16 PM
I just made a test, it's with wire-guideds only. Although my torpedoes skill being blinded by hostile noisemakers eventhough they are still connected with wire.

That happens when AI had identified your decoy as a decoy and/or have a steady 10+ contact with your sub. Obviously it will not chase anything else when he sees your sub.
Decoys helps only when AI is not sure where your sub is.

To counter wire guided torpedo you better make it not wire guided.
In case of US subs it is quite simple: You send mk48 in direction of an enemy, acitvate it right after it finishes its turn - this will give you speed (and range, since game code doesn't know that range should decreace when speed is increaced).
After that stop snake searching manually and switch torpedo to active sonar, so it start shouting "I'm looking for you") Usually enemy start evasive maneuvers at full speed and looses a wire.
- Wlii not help if enemy sub can't reach wire break speed (diesel subs for example).

partycat
04-27-20, 07:22 PM
That happens when AI had identified your decoy as a decoy and/or have a steady 10+ contact with your sub. Obviously it will not chase anything else when he sees your sub.
Decoys helps only when AI is not sure where your sub is.

To counter wire guided torpedo you better make it not wire guided.
In case of US subs it is quite simple: You send mk48 in direction of an enemy, acitvate it right after it finishes its turn - this will give you speed (and range, since game code doesn't know that range should decreace when speed is increaced).
After that stop snake searching manually and switch torpedo to active sonar, so it start shouting "I'm looking for you") Usually enemy start evasive maneuvers at full speed and looses a wire.
- Wlii not help if enemy sub can't reach wire break speed (diesel subs for example).

Oh, I see. Thank you so much for the explanation and letting me know what is the exact thing making hostile torpedoes behave like this.

If I may ask though, is it possible to remove that or make it for both sides instead of only AI? I checked the dll with dnspy a bit but I'm totally new to dll moddings. Tried to remove the code that changes depth sets from 50 feet to 10 feet but it gave me warning when I saved the module and well, game crashed at startup :D (and I was thinking Skyrim modding was difficult :D )

I tried your advise, it kinda works but when I do that, I instantly give away my position. They all go active instantly and return fires to my torpedo's bearing. If nothing works, I guess I can just remove the wire guidance from their torpedoes, but I want to leave it as a last result since it would also make things too much easier.

I still can't understand though the logic of this type of behaviour. Because eventhough the decoy has been identified, it's too loudy noise still blinds the torpedo. and the feature should be in my sub and torpedoes too if it's in the hostiles. or even as optional, like Sonar WAA.

By the by, what did you mean by having a 10+ steady contact? I didn't understand that part.

M134
04-28-20, 01:13 PM
Oh, I see. Thank you so much for the explanation and letting me know what is the exact thing making hostile torpedoes behave like this.

If I may ask though, is it possible to remove that or make it for both sides instead of only AI? I checked the dll with dnspy a bit but I'm totally new to dll moddings. Tried to remove the code that changes depth sets from 50 feet to 10 feet but it gave me warning when I saved the module and well, game crashed at startup :D (and I was thinking Skyrim modding was difficult :D )

I tried your advise, it kinda works but when I do that, I instantly give away my position. They all go active instantly and return fires to my torpedo's bearing. If nothing works, I guess I can just remove the wire guidance from their torpedoes, but I want to leave it as a last result since it would also make things too much easier.

I still can't understand though the logic of this type of behaviour. Because eventhough the decoy has been identified, it's too loudy noise still blinds the torpedo. and the feature should be in my sub and torpedoes too if it's in the hostiles. or even as optional, like Sonar WAA.

By the by, what did you mean by having a 10+ steady contact? I didn't understand that part.
You're welcome)

1.It is already working on both sides since you can manually steer your torpedo into enemy sub, ignoring decoys and noisemakers. It is only fair that AI can do the same. Of course you must constantly override your torpedo desire to dance around noisemaker)

2.Tactics I've posted above is for the case when you're already detected, so there is no point in hiding anyway. If you're not detected you can just send MOSS somewhere away from you and enemy will probably steer their torpedoes after it.
If you're detected and attacked you do not want wire-guided torpedoes near you. It is not very hard to evade wireless torpedos by shooting a pair of MOSS (so torpedoes will travel from one to another), but you can't fool wired that way - that's why you want enemy to accelerate and break wires.

3. Again: Your torpedo may try to chase decoy, but you can override it. AI does the same.

4. In the "signature" tab under "SNS COMP" you can see how enemy "hear" you by active(when enemy is using active), passive and towed sensor. Once any of that numbers reaches 10 - enemy knows everything about you (like when you have 95% solution on target).
Be aware though... this readings are dependant on target solution, since they are something like "If enemy is where we think it is, than it will hear us that good"

What help do you need with .dll? I'm not a coder, but I can do something... I've made "Precise Depth Channge" into Epic Mod recently (Guys here, thanks for idea!) and might help with your attempts. But here it is a bit complicated. Find me in Discord if you need help with .dll modding: Dot#7424

partycat
04-28-20, 09:28 PM
You're welcome)

1.It is already working on both sides since you can manually steer your torpedo into enemy sub, ignoring decoys and noisemakers. It is only fair that AI can do the same. Of course you must constantly override your torpedo desire to dance around noisemaker)

2.Tactics I've posted above is for the case when you're already detected, so there is no point in hiding anyway. If you're not detected you can just send MOSS somewhere away from you and enemy will probably steer their torpedoes after it.
If you're detected and attacked you do not want wire-guided torpedoes near you. It is not very hard to evade wireless torpedos by shooting a pair of MOSS (so torpedoes will travel from one to another), but you can't fool wired that way - that's why you want enemy to accelerate and break wires.

3. Again: Your torpedo may try to chase decoy, but you can override it. AI does the same.

4. In the "signature" tab under "SNS COMP" you can see how enemy "hear" you by active(when enemy is using active), passive and towed sensor. Once any of that numbers reaches 10 - enemy knows everything about you (like when you have 95% solution on target).
Be aware though... this readings are dependant on target solution, since they are something like "If enemy is where we think it is, than it will hear us that good"

What help do you need with .dll? I'm not a coder, but I can do something... I've made "Precise Depth Channge" into Epic Mod recently (Guys here, thanks for idea!) and might help with your attempts. But here it is a bit complicated. Find me in Discord if you need help with .dll modding: Dot#7424

I agree with all except 1. (kinda). What makes me think it's not exactly both sides is,
When I manually steer my active homing torpedo while it's already homing, it stops beeping eventhough it's still locked at the target (sensor lines on minimap are still red). However while hostile torpedo coming at me at active homing, it keeps beeping while manuevering towards me.

Also same thing goes when hostile sub deploys noisemaker for example, my torpedo stops beeping and manuevering around the noisemaker. I can still of course steer it towards hostile sub but it doesn't beep until it's clear from the noisemaker. When I deploy the noisemaker however, hostile torpedo still keep beeping.

I also removed the mod and gave the hostile vessel impossible to breakable wire. When I deploy my noisemaker, it made the hostile torpedo to stop homing at me and go around the noisemaker, when I launched MOSS, it made the torpedo to acquire the MOSS instead.

So I'm very sure this mode changing the behaviour and ability of hostile torpedo while it's connected with wire. It's not like hostile sub manually steering it, it definetly autonomously homing at me.

Though as a workaround of this (temporary solution), I installed a Railgun to my sub that internally mounted to sub's spine :P It has the SS-N-7 torpedo that swims at 2600 knots with 13 degrees sensor angle and turn/pitch rate. When a hostile sub becomes too nasty, I'm just pointing my sub's nose towards it and send her a hyper velocity dense shell. Leaves nothing but a rubble in a few seconds from the nasty sub :D
https://expanse.fandom.com/wiki/Amun-Ra-class

As for the dll, this mod changes the depth setting buttons from 50 feet to 10 feet and increase tube jamming on torpedo launch speed. It's of course good for setting a precise depth however it's being very hard when I want to change like 1000 feet depth. So I wanted to remove that option with dnspy and saved the module but game crashed at startup. As for tube jamming, I like to go really fast with my submarine (I know it ain't realistic but just for fun) and still being able to launch torpedoes with worrying about jamming my tubes :D

M134
04-29-20, 03:00 PM
I agree with all except 1. (kinda). What makes me think it's not exactly both sides is,
When I manually steer my active homing torpedo while it's already homing, it stops beeping eventhough it's still locked at the target (sensor lines on minimap are still red). However while hostile torpedo coming at me at active homing, it keeps beeping while manuevering towards me.

Also same thing goes when hostile sub deploys noisemaker for example, my torpedo stops beeping and manuevering around the noisemaker. I can still of course steer it towards hostile sub but it doesn't beep until it's clear from the noisemaker. When I deploy the noisemaker however, hostile torpedo still keep beeping.

I also removed the mod and gave the hostile vessel impossible to breakable wire. When I deploy my noisemaker, it made the hostile torpedo to stop homing at me and go around the noisemaker, when I launched MOSS, it made the torpedo to acquire the MOSS instead.

So I'm very sure this mode changing the behaviour and ability of hostile torpedo while it's connected with wire. It's not like hostile sub manually steering it, it definetly autonomously homing at me.

Though as a workaround of this (temporary solution), I installed a Railgun to my sub that internally mounted to sub's spine :P It has the SS-N-7 torpedo that swims at 2600 knots with 13 degrees sensor angle and turn/pitch rate. When a hostile sub becomes too nasty, I'm just pointing my sub's nose towards it and send her a hyper velocity dense shell. Leaves nothing but a rubble in a few seconds from the nasty sub :D
https://expanse.fandom.com/wiki/Amun-Ra-class

As for the dll, this mod changes the depth setting buttons from 50 feet to 10 feet and increase tube jamming on torpedo launch speed. It's of course good for setting a precise depth however it's being very hard when I want to change like 1000 feet depth. So I wanted to remove that option with dnspy and saved the module but game crashed at startup. As for tube jamming, I like to go really fast with my submarine (I know it ain't realistic but just for fun) and still being able to launch torpedoes with worrying about jamming my tubes :D

Right... Skwabie's mod changes torpedo behavior, and to be honest I do not know how much since I've not played it much. So, If changes are quite radical, than my advices might be useless. Haven't thought about such variant, my apologies.
If torpedo behaviour is unapropriate to you, my only suggestion would be to use another mod, since changes in Torpedo class could be vast and complicated. You can add features you like to another mod, at least some of them - that would be easier.

As for depth:
1. If I get it right PgUp/PgDn keys should change depth in 50ft increments.
2. You can go to HelmManager/InitialiseHelmManager and change "this.depthInterval = 10f;" to "this.depthInterval = 50f;" or whatever increment (in feet) you like.

partycat
05-01-20, 07:05 AM
Right... Skwabie's mod changes torpedo behavior, and to be honest I do not know how much since I've not played it much. So, If changes are quite radical, than my advices might be useless. Haven't thought about such variant, my apologies.
If torpedo behaviour is unapropriate to you, my only suggestion would be to use another mod, since changes in Torpedo class could be vast and complicated. You can add features you like to another mod, at least some of them - that would be easier.

As for depth:
1. If I get it right PgUp/PgDn keys should change depth in 50ft increments.
2. You can go to HelmManager/InitialiseHelmManager and change "this.depthInterval = 10f;" to "this.depthInterval = 50f;" or whatever increment (in feet) you like.

Oh. Thank you so much. PgUp PgDown keys helped a lot :3

Skwabie
10-13-20, 03:03 PM
Update:

Imported mega features from Epic Mod:
-AirdefenseSub
-Deploy towed array (set to repairable if overspeed, preventing awesome_boat_greatly_diminished_because_that_time_ I_forgot_to_press_the_button incidents)
-Periscope snap to target bearing
-Nav/missile launch/torpedo launch/depthcharge/dipping sonar markers.
-Variable torpedo sensor range, with edits.

-Variable torpedo sensor range: Torpedo sensor range depends on homing modes, target closeness to sea surface/bottom, target noise (passive) / target sonar reflection (active). (Torpedo.CheckWithinSensorAngles) Config.txt entries: TorpSensorBaseNoise, TorpSensorBaseReflection, AnechoicCoef, PassiveHomingMultiplier, SensorSeaStateDivider, SurfaceCloseDepthFeet.

-Torpedo homing logic:
--Weapons.txt entry DriveThroughJam=TRUE makes a torpedo drive through noisemakers. Drive around if not set.
--Drive around logic unchanged from default game. Drive through works as follows. If noisemaker range is far, once the torp clears the noisemaker (e.g. noisemaker timed out, dropped off..) it would go straight ahead; if noisemaker range is medium, once clear the torp would circle search; if noisemaker range is close, it would drive around the noisemaker same as default drive around behavior. Medium range and close range decided by weapons.txt entry DriveThroughMediumRange and DriveThroughCloseRange.
--Biologic/oilrig/sinking target rejection routine changed to weapons.txt entry SmartTargeting=TRUE (no longer depends on sensor range). It will also remember the last valid target's direction, if circle searched more than 360 degrees it would resume inertial guidance toward that direction (only bearing between torpedo and target) with snake search.
--Bug fix from default game: torpedo instant switch between jammed/unjammed. A noisemaker is a big sphere, the sphere's edge could be blocking torpedo LOS while its center is outta torpedo sensor cone angles.

-Torpedo active run
--Activated torpedoes can be deactivated. Keystroke: Deactivate Torpedo.
--Torpedo active range can be defined in weapons.txt with ActiveRangeInYards. If undefined, active range would be inactive_range * run_speed / active_run_speed.
--Torpedo data display updates data depending on torpedo state.

-Torpedo tube selection
--Keystroke for selecting individual tubes: Select Tube 1 --> Select Tube 10.
--Keystroke for priority reload: Set Priority Reload Tube. Highlights a yellow box around the selected priority reload tube. Priority reload tube always reloads first. (i.e. the one with the moss)

-UI
--Lead indicator fix: Position calculated. Has 5 "modes":
0) If lead is impossible to attain or is too big, indicator is a grey dot fixed 16000yds in front of target.
1) Green dot if player is simply navigating, showing intercept point for player sub to target.
2) Blue dot if player presses fire button, showing intercept point for the selected torpedo.
3) Blue dot if torpedo on the way, showing intercept point for the current guiding torpedo.
4) Red dot if current torpedo is active.
--Torpedo waypoint line greyed out if out of wires. Mostly for the 68 campaign where subs have 4 tubes but 2 wires. If 3rd torp is still launched the "wirebreak" message no longer plays - no wire is attached to begin with.
--Camera direction keys can pan the tactical map when it is fullscreen.
--Fix default game bug that displays the event camera icon, but event camera is actually off after player switches views.
--Fix default game emergency deep function that resurrects masts when they're already in the process of going down but just not stowed. Emergency deep also retracts towed array.
--Night vision can be enabled without periscope. View point switching between above/below surface would turn it off, but guess it's better than nothing.
--PingLineFadeRate in HUD\default.txt no longer works on torpedo active pings, otherwise too much clutter.
--Ballast/rudder/plane/depth/speed/heading digits turn blue if auto diving/auto turning/speed adjusting to telegraph.
--Config.txt entry DepthUnderKeelAlt, default 100 (feet). When distance to sea surface is below this value, depth reading changes to distance to sea floor in red (e.g. "+99"), instead of depth.
--Keystroke Level Submarine Horizontal: keep plane/ballast angles/auto diving while zeroing rudder; Keystroke Level Submarine Vertical: keep rudder angles/auto turning while zeroing plane/ballast.
--Keystroke: Start Fast Time Compression, which compresses time even more than default time compress. Helicopters and sunk ships may act weird, so only use when closing distance from far away.
--Keystroke for choosing submarine/warship/merchant category on the signature tab (same as mouse clicks): Goto Profile Submarine, Goto Profile Surface, Goto Profile Merchant

-AI fixes
--Enemy would attack with both missiles and torpedoes.
--AI torpedo waypoint setting uses same calculation as lead position indicator.
--AI adjust speed due to cavitation bug fix. Bug would cause AI to slow down, but propeller rotation speeds and engine sounds remain unchanged. (VesselAI.SubmarineAI)
--AI likely to fire more torpedoes if it detects player.
--Sunk ships would miraculously disappear after some time, mostly to free up frame rates. Duration defined in config.txt WreckDisappearTime in seconds.

-Campaign fixes
--Fix default game bug: "CombatBehaviour" (DEFENSIVE/OFFENSIVE) in mission.txt has no effect.
--Fix default game bug: "NumberOfEnemyUnits=0-1" in mission.txt is really 0-0, because UnityEngine.Random.Range(0f,1f) -> converts to integer -> then this is always zero.
--Resets random number generator's seed every time player leaves port, to make campaign missions more random.


--------------
Merging with North Atlantic 2000 (https://www.subsim.com/radioroom/showthread.php?t=237657)

- Separates vessels into 3 year groups: 68, 84, 2000 with varying performance/sensor/weapons.
- PropAudioPitchRange for all subs changed to 0.1,1.0 (default only SSN_Permit) to make speed variance audible.
- Active sonar ping sound varies a bit between different sub sonars.
- Updates 1968/1984 campaign similar to 2000 campaign, with better Opfor equipment and mission variance:
-- For 1968: adds hypothetical Victor2 1968 version, no ASW missiles; Adds NT37 torpedo to 68 subs, 28000/22500yds 30/37kts inactive/active; Warpact sub torpedo upgrades to Test-71; Adds PLAN ships SS_Romeo, DD_Luda, FF_Jianghu, FF_Chengdu (performance matches Warpact 68 level), adds Set-65 torpedoes to Luda/Jianghu, Yu-1 to Chengdu; Mission variance and category similar to 2000 version.
-- For 2000: Adds SSBN_Borei; Adds/changes Uset-80K/Set-65K/Test-71MKE with hypothetical better performance; Adds CY-1 missiles to SSK_song; Adds FF_Jianghu3 to coastal patrols; Adds Test-71MKE to Jianghu3.
-- For 1984: more mission variance and Opfor upgrade similar to 2000 version. No PLAN ships.

Link (http://www.mediafire.com/file/gsj3rhwxor6xurp/Wirebreak_Mod_Upd4.rar/file)

Badger343rd
10-13-20, 10:43 PM
can this be incorporated into epic??

M134
10-14-20, 03:14 AM
Update:

Imported mega features from Epic Mod:

-Deploy towed array (set to repairable if overspeed, preventing awesome_boat_greatly_diminished_because_that_time_ I_forgot_to_press_the_button incidents)
-Periscope snap to target bearing
-Nav/missile launch/torpedo launch/depthcharge/dipping sonar markers.



Nice to see that you've got something useful from me too)

Many thanks to you for help in Atlantic Fleet modding and also I've been learning on your code in CW too. Good to see you're still around)

Also: If you want, I can add you to EM Assembly-CSharp Github, might be easier to check on features that way.

Skwabie
10-14-20, 05:23 PM
I'm no longer around these communities very often, just still play a little time to time - but a game is no good before modding... In the off chance u guys or anyone else find some I share useful just ctrl-c and no need for credit.

Badger343rd
10-16-20, 12:31 PM
Could you increase the tube number keys from 10 to 14...for the akula?

Duplicate_yifei
11-02-23, 10:50 PM
I'm no longer around these communities very often, just still play a little time to time - but a game is no good before modding... In the off chance u guys or anyone else find some I share useful just ctrl-c and no need for credit.

Hi,Skwabie!
I tried to bring your WAA functionality into the DOT module,By editing DLL(I modified DatabaseSonarData and CalculatePlayerTMA), make sure WAA works for TMA, however distance color does not change.

To make WAA range the RNG readout turns cyan,Can you tell me where these codes are? It took me a long time to find it.

Aktungbby
11-05-23, 09:47 PM
Duplicate_yifei!:Kaleun_Salute: