![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#46 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
OK, I got it. Tabbing was off.
|
![]() |
![]() |
![]() |
#47 |
Watch
![]() Join Date: Apr 2007
Posts: 29
Downloads: 0
Uploads: 0
|
![]()
Exactly like you wrote it but with proper spacing in front
Code:
i = group.waypoints.iterator () for waypoint in i: # 400 * 1852 is 400 NM in meters. if waypoint.length > 400*1852: zigZagToWaypoint(waypoint,i,20,4.5) Edit: Also just a suggestion from playing a patrol with zig-zagging convoys: 4.5nm might be too short, the AI isn't very good at turning in formation. ![]() |
![]() |
![]() |
![]() |
#48 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
BTW, this tool is an amazing addition to the toolbox. Thank you so much.
|
![]() |
![]() |
![]() |
#49 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
http://www.mediafire.com/?8jzux3g1gxb
that is the mission file I made (quick mission). Open it with the editor and take a look! |
![]() |
![]() |
![]() |
#50 |
Loader
![]() Join Date: Apr 2005
Location: Madrid, Spain
Posts: 86
Downloads: 0
Uploads: 0
|
![]()
tater,
Good work! Are you using Yanaran's fix in init.py? Some of your waypoints come out of zigzag at extreme angles, which will break the AI formations. BTW, for everyone playing with zigzags, I recommend you use the output path option in the program, so your original file is untouched. That way you can always edit without zigzags and add them later. Once all those waypoints are put into place, it looks very confusing. |
![]() |
![]() |
![]() |
#51 | |
Loader
![]() Join Date: Apr 2005
Location: Madrid, Spain
Posts: 86
Downloads: 0
Uploads: 0
|
![]() Quote:
|
|
![]() |
![]() |
![]() |
#52 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
Ah, no, I didn't use the changes Yanaran made. I misunderstood and thought that you had added those changes to version 0.3.
The 4.5nm was based on the base speed of 9 knots. That was for a zig or zag every 30 minutes. Later in the war every 5 minutes was not uncommon. 9-10nm for that convoy would mean only 1 change per hour, which is better than default, but pretty unlikely to spoil a torpedo attack. A long torpedo run might be 4 minutes, unless there is a significant chance of a course change during a long run like that, it will have little effect. |
![]() |
![]() |
![]() |
#53 | ||
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]() Quote:
I'd think that SOP for large surface combatants should probably be line astern, even though that was a combat formation and not a general steaming formation. |
||
![]() |
![]() |
![]() |
#54 | ||
Loader
![]() Join Date: Apr 2005
Location: Madrid, Spain
Posts: 86
Downloads: 0
Uploads: 0
|
![]() Quote:
Quote:
|
||
![]() |
![]() |
![]() |
#55 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
Possibly, combat vs regular steaming formations varied wildly. Once engaged, standard practice for surface combatants would be to assume a line formation to concentrate fire. A box masks some of the ships farther from the enemy.
Varied a lot though. AI is indeed really tricky. It would be nice to have the waypoints include a "zig-zag" toggle with degrees and time interval though. I don't expect it to happen, though, which is why this tool you have created is so great. Re: Copy and Past: For copy and paste there are 2 features I'd like to see. 1. copy a group, waypoints and all, and paste a copy of it offset enough that they are unlikely to overlap---tot he opposite side of the globe if needed. Then in the editor you lasso it and drag it where you want. 2. the ability to select a group of waypoints (same as for the zig-zag, for example) and paste them with an offset set by the user. The waypoints should be added to the END of the group's waypoints. So if the group has 20 waypoints, I could select waypoints 6-13 and paste them 10nm West. There would then be a long waypoint connecting waypoint 20, and the new waypoint 21 (which is just #6 moved west 10nm). tater |
![]() |
![]() |
![]() |
#56 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
That was a Q&D test, but this shows great promise. Ideally, I would use some of your other suggestions for "tagging" waypoints with odd radius values. Such a recurring, random convoy would (ideally) have maybe 10 alternate paths, where some even overlap. The tagged waypoints would get different zig-zags as well. Some get a 20 degree aver 30 minutes, so every hour, others get a 30 degree, and so forth. This would be particularly effective for the random singleton (with the odd 2d ship) Merchant layers. Formation keeping would be no problem, and they could even have some very aggressive zig zagging, like every 2-5 minutes (gotta figure a lone merchant ship is gonna have to be aggressive to survive).
|
![]() |
![]() |
![]() |
#57 |
Loader
![]() Join Date: Apr 2005
Location: Madrid, Spain
Posts: 86
Downloads: 0
Uploads: 0
|
![]()
I understand the copy&paste ideas now. They seem easy, so I'll add them for the next version. That will have to wait at least a few days, though, since I'll be out of town tomorrow.
|
![]() |
![]() |
![]() |
#58 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
Right now, I have a notepad document with the code I am using in there so I can cut and past it into the appropriate fields. Is this what I should expect, or am I missing something? No problem if that is the easiest way. If it is, then perhaps a library of useful (remarked) examples would be in order as a txt doc?
That way some of the code-impared (myself, last code I ever wrote was FORTRAN back in the 80s) can have stuff to plug in where all they need to do is change numbers. I might not be able to use particularly esoteric elements of this program, but I plan on beating the livig hell out of it. ![]() tater |
![]() |
![]() |
![]() |
#59 |
Loader
![]() Join Date: Apr 2005
Location: Madrid, Spain
Posts: 86
Downloads: 0
Uploads: 0
|
![]()
There are quite a few small examples in the README. Also, you can define new functions for future use by adding them to the init.py file (see the file for a few examples).
Other than that, yes, copy/paste is the best way. I wanted something simple for the non-programmer and that wasn't too hard for me to code. If there is enough interest, I can add a second interface where you can just run code directly from a file. |
![]() |
![]() |
![]() |
#60 |
Admiral
![]() Join Date: Apr 2005
Location: San Diego Calif
Posts: 2,290
Downloads: 187
Uploads: 12
|
![]()
I've found a "bug" when generating "zigzag's" that cross 180 longitude, it will generate positions that go around the world vice crossing the dateline correctly
|
![]() |
![]() |
![]() |
|
|