![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
![]() |
#76 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
Another thing to look at might be to set the zigzag distance to somethig based upon ship speed. If the convoy moves at 9 knots, then 4.5 nm would be every 30 minutes. Later in the war they might zig every 2.5 minutes sometimes. AI might not like that though.
tater |
![]() |
![]() |
![]() |
#77 |
Admiral
![]() Join Date: Apr 2005
Location: San Diego Calif
Posts: 2,290
Downloads: 187
Uploads: 12
|
![]()
Did a test run on this code
Code:
from random import randint i = group.waypoints.iterator () for waypoint in i: if waypoint.loopProbability > 0: waypoint.loopProbability = randint(2,8) if waypoint.radius > 0: waypoint.radius = 0 if waypoint.length > 500*1852: zigZagToWaypoint(waypoint,i,0,100) for waypoint in i: waypoint.speed = randint(7,12) if waypoint.length > 99*1852: angle= randint(15,35) distance= randint(12,50) zigZagToWaypoint(waypoint,i,angle,distance) I agree that the code needs "alot of cleanup" and I have made basic changes already Code:
from random import randint if group.repeatIntervalMinutes > 1: group.repeatIntervalMinutes = randint(3000,10000) if group.autoReportProbability > 1: group.autoReportProbability = randint(5,25) if group.autoReportInterval > 1: group.autoReportInterval = randint(1440,9999) if group.spacing > 1: group.spacing = randint(500,995) i = group.waypoints.iterator () for waypoint in i: if waypoint.loopProbability > 0: from random import randint waypoint.loopProbability = randint(2,8) if waypoint.radius > 0: waypoint.radius = 0 if waypoint.length > 250*1852: zigZagToWaypoint(waypoint,i,0,100) from random import randint for waypoint in group.waypoints: waypoint.speed = randint(7,12) i = group.waypoints.iterator () for waypoint in i: if waypoint.length > 99*1852: from random import randint angle= randint(15,35) distance= randint(12,50) zigZagToWaypoint(waypoint,i,angle,distance) |
![]() |
![]() |
![]() |
#78 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
For TFs, the first thing that needs to happen is that thelarge tanker needs the max speed (Sea/NOL_Nippon/NOL_Nippon.cfg) changed to 19 since 12 is too low.
Then the GENERIC Tanker entries need to be switched for the large tanker exclusively. At that point, I'd have all TFs steaming at between 15 and 17 knots. For the troopships, I'd make the speed below their max speed, but still pretty high. If the code was capable of looking at the total path length of the group, perhaps the speed might be inversely proportional to distance. If the trip is really short, have them make maximum speed, dropping to maybe 15 knots minimally for a really long haul. |
![]() |
![]() |
![]() |
#79 | |
Watch
![]() Join Date: Apr 2007
Posts: 29
Downloads: 0
Uploads: 0
|
![]() Quote:
![]() |
|
![]() |
![]() |
![]() |
#80 | ||
Admiral
![]() Join Date: Apr 2005
Location: San Diego Calif
Posts: 2,290
Downloads: 187
Uploads: 12
|
![]() Quote:
Any ETA on the next update on your program ? |
||
![]() |
![]() |
![]() |
#81 | |
Loader
![]() Join Date: Apr 2005
Location: Madrid, Spain
Posts: 86
Downloads: 0
Uploads: 0
|
![]() Quote:
But don't worry, I expect it'll ready before 1.3 ![]() |
|
![]() |
![]() |
![]() |
#82 | ||
Admiral
![]() Join Date: Apr 2005
Location: San Diego Calif
Posts: 2,290
Downloads: 187
Uploads: 12
|
![]() Quote:
|
||
![]() |
![]() |
![]() |
#83 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
While I think this is an issue of using code within the program, I will throw it out there because it might generate some thought for other features.
It would be interesting to make a group with multiple independant units. Ie: 1. you make a "primary" group, and plot waypoints. Program even zig-zags them. 2. clone group with a spacing offset and the code would place each ship X meters from the selected "primary" in a pattern (1 column, 2 columns, etc). Obviously if the groups were multiple ships this might cause a problem, but if the group was a single ship, it'd be fine. You could then make a TF where some ships peel off. Or with enough offset, you have a BB TF with organic escorts. There could also be a borrowed DesDiv of 4 DDs that zig-zags out in front, then peels off for a different mission. For convoys (this is where the idea in my head came from) you make a group with a single merchant and escorts (set to position as escorts). The rest of the merchants are individual ships. Convoy attacked, and the rest might move on... Alternately, say you made 4 groups. The lead ship in each is a merchant, and they are offset by the code to form a 750m box. Each of the merchants has a single escort of some type (subchaser, minelayer, DD). Interesting to see how the AI would deal with an attack in this situation. |
![]() |
![]() |
![]() |
#84 |
Loader
![]() Join Date: May 2007
Location: Orange Park, Fl
Posts: 85
Downloads: 2
Uploads: 0
|
![]()
Skippers,
This from just a newbie like myself is amazing stuff. Yet is beyond my understanding of the code. I have done some simple stuff with XML editor for Galatic Civilizations and Kdiff3 for merging Rome Total War files and used a note editor, just minor stuff really. Can the changes this tool produce be made into a Mod for the campaign? If so it would be great for us other code illiterate skippers out there, like myself.
__________________
Harder Ya train in peace, the less Ya bleed in war. Ya drill as if Ya was in combat and combat becomes a drill. *****Semper Fidela's********* MudMarine, USMC 1972-1985 Aviation |
![]() |
![]() |
![]() |
#85 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
Oh yeah. This is an amazing tool to redo the campaign layers. To be fair to the devs, making all the traffic required for the entire war is a daunting task in the Pacific because unlike the Atlantic, it changes constantly (in the Atlantic the volume/nature of traffic might change, but the routes are pretty much constant after the fall of France).
The basic idea they executed, splitting the layers into segments based on date/content is a good one, the only real issue is the content, and some of the routes and lack of routes. I've already made an experimental set using lurker's code in mcoca's program that adds zig zags to all the japanese stuff in the campaign. I guess I could make it available, but it's very much a WIP. |
![]() |
![]() |
![]() |
#86 |
Loader
![]() Join Date: May 2007
Location: Orange Park, Fl
Posts: 85
Downloads: 2
Uploads: 0
|
![]()
I hope you get it worked out. Maybe the devs will fix that, likely not.
__________________
Harder Ya train in peace, the less Ya bleed in war. Ya drill as if Ya was in combat and combat becomes a drill. *****Semper Fidela's********* MudMarine, USMC 1972-1985 Aviation |
![]() |
![]() |
![]() |
#87 |
Stowaway
Posts: n/a
Downloads:
Uploads:
|
![]()
It would be REALLY cool if you could make an area "hot" and have frighters avoid it and ASW forces drawn to it.
Like if you are around Okinawa's western side and sink a couple of freighters - now freighters pick an alternative route to Okinawa while ASW's beare in on that area. Forcing you to move your patrol area both in search of new pray and to avoid getting clubbered. |
![]() |
![]() |
#88 | ||
Admiral
![]() Join Date: Apr 2005
Location: San Diego Calif
Posts: 2,290
Downloads: 187
Uploads: 12
|
![]() Quote:
|
||
![]() |
![]() |
![]() |
#89 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
Lest anyone forget. This program is up there with minitweaker and JSGME.
<S> to all the guys doing the unheralded heavy lifting. |
![]() |
![]() |
![]() |
#90 |
Navy Seal
![]() Join Date: Mar 2007
Location: New Mexico, USA
Posts: 9,023
Downloads: 8
Uploads: 2
|
![]()
Hey, how would I code it to randomize waypoint.speed, but only if the speed for the given waypoint is > some number (say 5)?
I tried: Code:
from random import randint i = group.waypoints.iterator () for waypoint in i: if waypoint.speed > 5: waypoint.speed = randint(6,10) |
![]() |
![]() |
![]() |
|
|