SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Modern-Era Subsims > Dangerous Waters > DW Mod Workshop
Forget password? Reset here

Reply
 
Thread Tools Search this Thread Display Modes
Old 10-30-05, 12:26 PM   #481
LuftWolf
Ocean Warrior
 
Join Date: May 2005
Location: Free New York
Posts: 3,167
Downloads: 2
Uploads: 0
Default

Just to be sure it wasn't the anti-cavitation routine the Mod uses, I tested the stock SubAvoidWeap doctrine, and the same grounding problem exists, so it isn't anything we've done, just something we haven't fixed yet.
__________________
LW
LuftWolf is offline   Reply With Quote
Old 10-30-05, 12:29 PM   #482
Amizaur
Sonar Guy
 
Join Date: Nov 2002
Location: Poland
Posts: 398
Downloads: 0
Uploads: 0
Default

Quite simple to check - replace SubAviodWep doctrine by standard one and play the scenario again. BTW Luftwolf have you checked your doctrine changes with SCDoctrineChecker ? To check all spaces, quotes, bracket balance ect. ? Original doctrine shows 8 errors and your 16 :-/ I should have checked it

P.S. I hope they are caused only by no space after ;
Nope, your comments were causing that... strange, were interpreted as commands somehow... taking them into quotes helped. Don't know if the same happened in the game, maybe not (checker is sometimes more restrictive than original SCS doctrines) but it's good to try avoid such possible errors. Worse when DoctrineChecker don't show anything but game interpreter has problems, MUCH harder to find :-/
I seen this only once, when I had keywords and calcs in comment, they were tried to be taken as commands... but usually don't matter what's in the comment, whole lines of code are disabled by adding ; before them :hmm:
Amizaur is offline   Reply With Quote
Old 10-30-05, 12:43 PM   #483
LuftWolf
Ocean Warrior
 
Join Date: May 2005
Location: Free New York
Posts: 3,167
Downloads: 2
Uploads: 0
Default

Yes...

I mean no.

Well, all I did was change some numbers and add a couple comments to the CIWSAttack and SubAvoidWeap doctrines and then tested the heck out of them in game... I specifically didn't add any clauses or anything because I don't have a programming editor on my computer that adds those nice color codes, plus I dropped out of my programming course in college.

In any case, I was very very careful not to do anything that would necessitate me dealing with syntax and then I tested everything in the game, so we shouldn't need to worry about it, but in the future I will do that when I change anything. Thanks for reminding me.
__________________
LW
LuftWolf is offline   Reply With Quote
Old 10-30-05, 12:46 PM   #484
LuftWolf
Ocean Warrior
 
Join Date: May 2005
Location: Free New York
Posts: 3,167
Downloads: 2
Uploads: 0
Default

Yes, I just checked them as well, it is caused by the lack of whitespace after the comment, all eight of them.



Still, it won't effect the operation of the doctrine in game... I think.
__________________
LW
LuftWolf is offline   Reply With Quote
Old 10-30-05, 12:51 PM   #485
LuftWolf
Ocean Warrior
 
Join Date: May 2005
Location: Free New York
Posts: 3,167
Downloads: 2
Uploads: 0
Default

Ok, so we are ok...?

I have tested these doctrine a bunch, and there have been no problems, so I think the interpretor is ok with my comments.
__________________
LW
LuftWolf is offline   Reply With Quote
Old 10-30-05, 12:52 PM   #486
Amizaur
Sonar Guy
 
Join Date: Nov 2002
Location: Poland
Posts: 398
Downloads: 0
Uploads: 0
Default

Are you sure ? I added the space after ; (I have no spaces after the comment txt anywhere :hmm: ) and still showed errors. Will check again.

:hmm:

LegCourse = ( TgtBrg + 100 + rnd 40 mod 360 ) ; LW edit to 100 to 140
*** Unknown word or variable present ***
*** Unknown word or variable present ***
*** Unknown word or variable present ***
*** Unknown word or variable present ***


But moving whole comment to next line helped too I usually use them this way (in separate line)
Amizaur is offline   Reply With Quote
Old 10-30-05, 12:53 PM   #487
LuftWolf
Ocean Warrior
 
Join Date: May 2005
Location: Free New York
Posts: 3,167
Downloads: 2
Uploads: 0
Default

I ran the SC checker on a some of the stock doctrines just for the heck of it, and it returns errors all over the place.

I think there are some things that have been modified and added in the DW interpretor that the SC checker doesn't account for.
__________________
LW
LuftWolf is offline   Reply With Quote
Old 10-30-05, 12:58 PM   #488
LuftWolf
Ocean Warrior
 
Join Date: May 2005
Location: Free New York
Posts: 3,167
Downloads: 2
Uploads: 0
Default

Yeah, the doctrine checker doesn't like comments on the same line as commands, regardless of whitespace. the DWInterpretor seems fine with it however, or the doctrine changes I have made would cause a total failure of the doctrine in the tests I've done, and I tested every effect after I made changes.

So we are in the clear on that issue.

Time for some football!
__________________
LW
LuftWolf is offline   Reply With Quote
Old 10-30-05, 01:00 PM   #489
Amizaur
Sonar Guy
 
Join Date: Nov 2002
Location: Poland
Posts: 398
Downloads: 0
Uploads: 0
Default

Because it's SC checker, not DW

But when you learn first what errors are "legal" i.e. showed even on original DW doctrines (new keywords for example) then checker is VERY!!!! helpfull in finding new ones !! I usually check how many errors were before modifications and after, if number is the same then usually OK .
If my doctrine shows more errors, then I check if those are real errors or caused by checker/DW incompatibility. In 99% of cases it turns out to be my error (something unbalanced, no space, ect.). Couldn't work without this tool I hope jsteed will relase DW version.
Amizaur is offline   Reply With Quote
Old 10-30-05, 01:02 PM   #490
LuftWolf
Ocean Warrior
 
Join Date: May 2005
Location: Free New York
Posts: 3,167
Downloads: 2
Uploads: 0
Default

Doh! We are posting past each other.
__________________
LW
LuftWolf is offline   Reply With Quote
Old 10-30-05, 01:24 PM   #491
Deathblow
Captain
 
Join Date: Sep 2005
Posts: 518
Downloads: 0
Uploads: 0
Default

Quote:
Originally Posted by LuftWolf
Just to be sure it wasn't the anti-cavitation routine the Mod uses, I tested the stock SubAvoidWeap doctrine, and the same grounding problem exists, so it isn't anything we've done, just something we haven't fixed yet.
Hm.... how to fix this... :hmm: It might be with the subs preception of the layer in the SubAvoidWeap doctrine, or maybe the minalt settings.

In the stock SubAvoidWep doctrine

Code:
; Set Depth Opposite Layer
			IF TgtAlt < LAYER THEN {
				SETALT ( -100 - RND 50 )
			} ELSE {
				SETALT ( LAYER - 100 )  ;set depth to 100 ft below layer
			} ENDIF
It could be a layer problem. In the FFGatekeeper mission, the seafloor is at 200meters, but an XBT launch will report a layer depth of 300meters. Perhaps the AI is trying to set its evasion depth to an obtainable layer depth.

But in the modded doctrince...
Code:
; Set Depth Opposite Layer
			 IF TgtAlt < LAYER THEN {
			 	SETALT ( -600 - RND 50 )
			 } ELSE {
				SETALT ( LAYER - 400 )
				; set depth to 400 ft below layer
			 } ENDIF

			; Setalt ( ( MinAlt / 0.3048 ) + 100 )
			; DebugOut "MinAlt + 100 feet set"
Seems like it could be the same problem. The AI might be using a layer depth that is actually below the seafloor depth. It probably happens when part of the map is above the continental shelf and the other part in the open ocean.... The AI might be using a layer thats inappropriate.

Perhaps another IF statement could remedy the problem...

Code:
IF MinAlt > LAYER
          Setalt ( (MinAlt / 0.3048) + 100)
ELSE
          IF TgtAlt < LAYER THEN { 
             SETALT ( -600 - RND 50 ) 
          } ELSE { 
            SETALT ( LAYER - 400 ) 
            ; set depth to 400 ft below layer 
          } ENDIF
ENDIF

Just guessing for now.
Deathblow is offline   Reply With Quote
Old 10-30-05, 01:29 PM   #492
LuftWolf
Ocean Warrior
 
Join Date: May 2005
Location: Free New York
Posts: 3,167
Downloads: 2
Uploads: 0
Default

I've also not ruled out the possiblity that the combination of a hard-turn plus rapid acceleration might be making the subs drift deeper, just as happens with player subs as well.

To test whether it is a layer or not, you could set the environment type to be bottom limited, thus removing the layer entirely.

I should test this.
__________________
LW
LuftWolf is offline   Reply With Quote
Old 10-30-05, 01:29 PM   #493
Deathblow
Captain
 
Join Date: Sep 2005
Posts: 518
Downloads: 0
Uploads: 0
Default

One question. Is SETALT measured in feet where MinAlt is measured in meters? Trying to understand why the MinAlt is divided by 0.3048.

Oh, and does anyone know what "TgtSilos" controls?
Deathblow is offline   Reply With Quote
Old 10-30-05, 01:33 PM   #494
LuftWolf
Ocean Warrior
 
Join Date: May 2005
Location: Free New York
Posts: 3,167
Downloads: 2
Uploads: 0
Default

Nope, its not the layer issue, because even in Bottom Limited environment the subs ground. :hmm:

Quote:
One question. Is SETALT measured in feet where MinAlt is measured in meters? Trying to understand why the MinAlt is divided by 0.3048.

Oh, and does anyone know what "TgtSilos" controls?
The doctrine is fed information from the game engine in meters, but all doctrines are interpreted in feet, so...

In terms of TgtSilos, I have *no* idea at all.
__________________
LW
LuftWolf is offline   Reply With Quote
Old 10-30-05, 01:50 PM   #495
Deathblow
Captain
 
Join Date: Sep 2005
Posts: 518
Downloads: 0
Uploads: 0
Default

Just ran a test of the above missoin with bottom limited conditions (Layer = 0meters). The sub still ran aground.

Then again, it still might be a layer problem. Isn't the default evasion depth set at 400 ft below the layer? So in a bottom limited sea, (layer =0 ) would that make the AI got to 400ft no mater what?

More testing coming.
Deathblow is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:13 PM.


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