| View previous topic :: View next topic |
| Author |
Message |
jasonb885
Joined: 27 Mar 2002 Posts: 1749
|
Posted: Fri May 27, 2005 11:28 pm Post subject: |
|
|
Now it's time for the green goat of all Perl hacks: A RND layer processor. Here's the first ship in our friend HX39Convoy.
| Code: |
$VAR1 = [
{
'CargoInt' => '0',
'CargoExt' => '1',
'Side' => '0',
'CrewRating' => '2',
'CfgDate' => '19390201',
'SpawnProbability' => '100',
'Type' => '102',
'No' => '1',
'Origin' => 'British',
'Class' => 'KLS',
'Escort' => 'false'
},
|
My goal is to walk through each group of ships, being mindful of which carry cargo. I'm going to snatch up the one with the latest date and assign it leadership. I imagine making it entry [RndGroup $n.RndUnit 1] is sufficient. Then I can wander through and change any escorts with AppearanceDate= later to be the latest possible escort based on the merchant leader.
Heh, okay, this is proving a lot more involved than I thought it would be. I do have the ship information extracted and I can sort by AppearanceDate now. Now for each RND group with merchant ships, I need to find each escort that has a later AppearanceDate than the lead merchant (which I sort to the latest possible) and replace it with the latest possible warship that can spawn.
After that, it will be as simple as reassembling the RND entry in its entirity (stick the Waypoints back on and the RND header) and output it in the order in which I read it.
Only six or eight hours left...
The upside is I can mess with single ship RNDs pretty easily, I just ignore them now. I could quite simply look at the GameEntryDate and have some hash table for adjusting the ReportPosProbability almost for free. I could use some magic strings, too, so for example traffic off the US coast, based on the RNDGroup name, could be initially higher than 20% for the first $n months of America's entry into the war.
Or something...
W00P, I'm excited. It almost works. I have it properly assigning (unrandomized) spawnable ships to convoys.
omfg yes!
After an all nighter and hours of not eating, it works.
murhahahahahahahahahahahhahahahahahaha it works
Now let's see if it can fix SH3 v1.3's RND layer for SH3 v1.2!
Heh, doesn't quite work after all. Now I have to figure out what specific change(s) makes a campaign load crash.
Oops, I was assigning Class=any in instances where the ship was of a random Class= Unfortunately I didn't clear that for merchant ships, only for destroyers. So it was crashing because it couldn't look up type "any". Makes sense.
Now to modify my code and try again.
Murhahahahah!
I am victorious!
I can now validly reorder convoys so the latest possible escort will spawn under v1.2. Now I just need to fix it so HK groups aren't eaten. I haven't added capital ships to my roster, so they aren't being included in the HKs and Task Forces. Oops.
Fixed.
This is very tight.
I processed the RND from RuB1.30 without incident. It only messed with RndGroup61 - RndGroup118, which is correct. The rest aren't convoys. Now I just have to verify it fixed everything up correctly.
Last edited by jasonb885 on Sun May 29, 2005 2:45 am; edited 7 times in total |
|
| Back to top |
|
 |
irishred
Joined: 10 Mar 2004 Posts: 307 Location: The Woodlands, TX
|
Posted: Sat May 28, 2005 3:41 am Post subject: |
|
|
| Beery wrote: | | Lanzfeld wrote: | I have just started a career with the latest build.
The range in my Type IIA seems longer then I remembered. Has this been changed? :hmm: |
1st Flotilla used only Type IIBs at the start of the war. Now for some strange reason it seems it's impossible to change the name of the Type IIA to 'Type IIB', but at least we can make the boat behave more like a IIB so that it can get to all the 2nd Flotilla hunting grounds. |
Is it possible just to clone the subs like sergbuto did with the merchants to recreate the type IIB/D's and the VIIA? |
|
| Back to top |
|
 |
jasonb885
Joined: 27 Mar 2002 Posts: 1749
|
Posted: Sun May 29, 2005 12:32 am Post subject: |
|
|
Okay, the latest stable test release, in the original post, fixes the bug with the slideout gauges. That was a feature I really missed, but it works correctly now.
I also fixed the SCR layer where two Aux cruisers in Scapa didn't spawn for stationary sinkage. I don't think many people will care, but it's fixed. Now all stationary warships in harbor should spawn, as intended. (I did not add any.)
Link removed. Pointed to files no one should be getting now.
Last edited by jasonb885 on Wed Jun 01, 2005 5:16 pm; edited 1 time in total |
|
| Back to top |
|
 |
Lanzfeld
Joined: 10 Jan 2002 Posts: 1256 Location: Reston, VA
|
Posted: Sun May 29, 2005 9:50 am Post subject: |
|
|
So you recommend that we go into port before updating our version right?
or do we have to do a complete clean install?
Great work!  |
|
| Back to top |
|
 |
jasonb885
Joined: 27 Mar 2002 Posts: 1749
|
Posted: Sun May 29, 2005 1:08 pm Post subject: |
|
|
| Lanzfeld wrote: | So you recommend that we go into port before updating our version right?
or do we have to do a complete clean install?
Great work!  |
Absolutely only install once you're in port, the same as any other RuB version.
You could do a clean install if you wanted. If you end up with 400m depth gauges then RuB1.22 didn't get fully uninstalled when you removed it (you need to do that first). |
|
| Back to top |
|
 |
jasonb885
Joined: 27 Mar 2002 Posts: 1749
|
Posted: Mon May 30, 2005 1:31 am Post subject: |
|
|
ROFL.
I can confirm the new AI works under SH3 v1.2 if you use the SIM file from v1.3. I took out an auxilliary cruiser in Scapa and _three_ destroyers came in rapidly to prosecute me. The detection wasn't there, as I slipped away without even trying, but all there seemed to be working together to take care of business. Very nice. In the past I'd sink something in Scapa and no one cared.
 |
|
| Back to top |
|
 |
Castorp24
Joined: 03 Apr 2005 Posts: 68 Location: Spain
|
Posted: Wed Jun 01, 2005 8:29 am Post subject: |
|
|
Superb work, thanks a lot. I´m going 1.2 again  |
|
| Back to top |
|
 |
joedepurp
Joined: 31 Aug 2004 Posts: 46
|
Posted: Fri Jun 03, 2005 6:33 pm Post subject: |
|
|
Jasonb885,
I really want to try the RUB series, but I don't want the 20/20 mod and mayybe others.
It would be nice to be able to tailor the selections. Is there a way to select what I want or to exclude what I don't want?
Or is there a way to override what RUB loads ie; 20/20?
Thank you! |
|
| Back to top |
|
 |
jasonb885
Joined: 27 Mar 2002 Posts: 1749
|
Posted: Fri Jun 03, 2005 11:32 pm Post subject: |
|
|
| joedepurp wrote: | Jasonb885,
I really want to try the RUB series, but I don't want the 20/20 mod and mayybe others.
It would be nice to be able to tailor the selections. Is there a way to select what I want or to exclude what I don't want?
Or is there a way to override what RUB loads ie; 20/20?
Thank you! |
Sure.
Just keep your original Campaign RND file and copy it over the one that is installed with RuB. People have done the same to install World Mod's increased traffic, for example. |
|
| Back to top |
|
 |
joedepurp
Joined: 31 Aug 2004 Posts: 46
|
Posted: Sat Jun 04, 2005 2:06 pm Post subject: |
|
|
Thanks for the info Jason!
But I still woulld not know how to remove just the "20/20" mod
from the RUB mod.
 |
|
| Back to top |
|
 |
Lane
Joined: 10 Jan 2002 Posts: 975 Location: Southwest , Indiana USA
|
Posted: Sat Jun 04, 2005 10:48 pm Post subject: |
|
|
Jason 885,
After looking at 4 pages about this mod were are we at?
Are there changes to the file from page 1? I have the JSGME ver 1.3
and have World Mod 5 then RB 1.22 modifed Campaign folder gone
and dark water folder Don't know what this has done? Reason
I removed campaign folder I did not want the 20/20 mod but just read
about the orignal Campaign-RND file Now I have 3 new campaign files
from World Mod 5 Now I read that all the warships are elite? and I may
have the 20/20 mod I think I am about ready to run the mod installer
remove World Mod 5 and install RB 1.22 with a stock camp-RND and play
the sim Sometimes I feel If I see another mod listed I will go crazy.
I know another good idea :hmm: I have a new sim I haven't played
much Dangerous Waters nice manual I think I need a break
Lane  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|