New Pacific War Bug Fixes / Enhancements

Pacific War is a free update of the old classic, available in our Downloads section.
Rich Dionne
Posts: 382
Joined: Tue Jul 11, 2000 8:00 am
Contact:

New Pacific War Bug Fixes / Enhancements

Post by Rich Dionne »

After much pain and struggle, I’ve managed to figure out a way to edit the Pacwar EXE with the goal of finally fixing some of the long standing bugs, and perhaps even enhancing the game somewhat. This is a work in progress; as I’m sure you Pacwar veterans know, there’s lots to fix! I’ve uploaded a new version of the PAC.EXE (version 3.2.2) at the link provided below. Let me know if you have any trouble downloading it.

https://www.dropbox.com/s/t81db05i0ull3 ... 2.zip?dl=0

If you want to try it, first save your original PAC.EXE version (3.2) to a different name so you don’t lose it, and then unzip and copy the new EXE into your game directory (rename it from PAC322.EXE to PAC.EXE). I hope you like it. I’ve also included a SAVEA file to highlight the differences between the official 3.2 version of the game and my new 3.2.1 version. Here a description of the first set of bugs I’ve tried to fix.

Teleportation Bug: This old bug involved different ways of “teleporting” ships (including loaded cargo) around the map using a variety of techniques. The bug was recently well described by Istfemer on the Pacific War Forum (link below):

tm.asp?m=3664408

In general, the bug was based around transferring ships between TFs that weren’t in the same location, or disbanding a TF to a base that is not in the same location as the TF. My new version of the EXE should fix this bug. The new code prevents TFs from disbanding unless the base and TF are in the same location, and it prevents ship transfer between TFs unless they’re in the same location. Try out the new EXE (confirm it works) and let me know if I missed any “teleportation” techniques.

Replenishment Bugs: There seem to be many bugs surrounding replenishment. I’ve made an attempt to eliminate some of them, although I’m sure some still exist; it’s a work in progress. The new EXE fixes (hopefully) the bug that prevents carriers from getting refueled (generally when no aircraft replenishment is available). The new code also allows CV TFs to be replenished with aircraft if the replenishment TF is only carrying aircraft. You can look at differences between the version 3.2 and 3.2.1 by loading the SAVEA file. If you open SAVEA in human player mode, you will notice I have placed TFs in 3 different areas to test out replenishment.

The first area at hex 24, 25 shows a typical replenishment setup (containing both air and fuel replenishment ships). This should work OK for both versions of the EXE.

The next setup at hex 50, 19 shows a replenishment TF with fuel only. Version 3.2 has a problem with Air Combat TFs refueling from this replenishment TF (no refueling takes place). Version 3.2.1 should fix this.

The last setup at 37, 39 has air replenishment only. This type of replenishment doesn’t work at all in version 3.2. Version 3.2.1 should now replenish Air Combat TFs. Try it.

Target Priorities: I don’t know about you, but I have been often frustrated when my air base or Air Combat TF doesn’t attack a juicy target that is nearby, concentrating instead on an airfield, for example. In Version 3.2.1, I have adjusted the code so that if you set an air base target type (using alt-B) or set an Air Combat target priority (using the “F” key), you should now see the EXE giving a greater focus on the target you have set. This doesn’t always work, but you should see an improvement. You can try this by opening the SAVEA file again. In human player mode, as Japanese, adjust the target priority at your Gasmata base (near Rabaul). I have the target currently set for “Port”. Try adjusting this and running the execution phase for both Version 3.2 and 3.2.1. You should see some difference.

Zones of control: I’m sure you’ve noticed that the AI regularly sends Allied TFs returning to base to take the scenic route, through the Japanese Empire! The new 3.2.1 version of PAC.EXE should be much more respectful of enemy territory. You can see this difference by again opening up the SAVEA file, running the execution phase, and focusing on Allied TFs 50 (heading to Port Moresby) and 51 (heading for Darwin). Look at the difference between version 3.2 (living dangerously!) and 3.2.1. You will note in 3.2.1 that the TFs should try to skirt around enemy territory, although they may pause during their return to base; this is due to the close proximity of Japanese ZOCs (basically, this is still a work in progress and very hard to fix, I’m still unhappy with how close the TFs get to enemy ZOCs), but they should continue moving on the next turn.

I’ve also made a couple more minor fixes:

You will now get victory points for lost aircraft due to bombardment, either air or naval (Version 3.2 does not give points for this).

I’ve also adjusted HQ supply & fuel on-hand multipliers to 1000 to limit oil / resource disappearance during the routine convoy phase. This issue was described in my old forum post below:

tm.asp?m=3026840&mpage=1&key=routine%2Cconvoy�

I’m currently working on a major fix for the oil, resource, and routine convoy routines.

Try out version 3.2.1 and let me know what you think. Also, if you have a bug or enhancement request that‘s been driving you crazy for years, let me know, and I’ll add it to the list of potential fixes. Keep in mind; however, that I’m basically working with machine code to make these changes, and major enhancements, such as AI improvement, may be beyond my reach (although I may even try to improve that!)

Regards,

Rich
User avatar
Capt. Harlock
Posts: 5379
Joined: Sat Sep 15, 2001 8:00 am
Location: Los Angeles
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by Capt. Harlock »

You will now get victory points for lost aircraft due to bombardment, either air or naval (Version 3.2 does not give points for this).

Now that alone is a worthwhile fix. Much appreciation for the hard work.
Civil war? What does that mean? Is there any foreign war? Isn't every war fought between men, between brothers?

--Victor Hugo
Rich Dionne
Posts: 382
Joined: Tue Jul 11, 2000 8:00 am
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by Rich Dionne »

Thanks! Hopefully I'll be able to keep at this for awhile and add some more fixes / improvements.

Istfemer pointed out that my version 3.2.1 didn't stop the sneaky submarine patrol based teleportation technique. Well, I just revised the link, and have uploaded version 3.2.2, which should now eliminate this bug also. Here's the updated link:

Sorry, Istfemer, I know you kind of enjoyed finding this one! [:D]

https://www.dropbox.com/s/t81db05i0ull3 ... 2.zip?dl=0

As always, let me know if you find any problems, and if you have any hated bugs you want eliminated, I just may be able to help!

Regards,

Rich
User avatar
wga8888
Posts: 459
Joined: Wed Sep 29, 2010 6:20 pm
Location: Sachse, Texas USA
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by wga8888 »

I am in my third game with Brad Kay who has been editing the exe to fix many of the issues introduced in the SSI to Matrix conversion. My issues as Allied was I end up with 15000 C47s in the pool, Japanese have an excessive number of fighters in the pool such that losses are of no consequence. I do not remember the others or the details of what Brad was doing. Another iteration was anticipated after our 3rd game.

I would like to get the two of you together to share ideas. Otherwise I have to choose which patch to use in the next game. .

I am aways wary of those who want to clarify a game [wounds like what you are doing] vs change it to fit an agenda [what they did to War in Europe so Axis always win in the 3rd week of Oct 1942].

bill thomson; bill@wargameacademy.org
Bill Thomson
wga8888@icloud.com
Discord: wga8888 #7339
817-501-2978 CST [-6 GMT]
Istfemer
Posts: 190
Joined: Sat Jul 19, 2014 9:45 am
Location: Kyiv, Ukraine

RE: New Pacific War Bug Fixes / Enhancements

Post by Istfemer »

As far as I know, the only difference between Brad Kay's exe and original v3.2 one is the year when Japanese kill multiplier comes online.
Brad Kay edited the multiplier to activate in 1944 instead of 1946.

Most of Brad's fixes were made through editing of Pacwar scenario files.
Rich Dionne
Posts: 382
Joined: Tue Jul 11, 2000 8:00 am
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by Rich Dionne »

Bill,

Well, I certainly don't have an agenda (Allied or Japanese), I'm trying to fix some bugs and issues that have been bothering us all for many years. I love this game and my only goal over the last ~15 years has been to make it a better game, if possible. I will certainly touch base with Brad; he has done much to improve the game. I think as Istfemer mentions, much of Brad's work has been around improvements to the OBC files, where you can significantly affect things like aircraft production rates, plus perhaps some factor adjustments in the EXE to adjust victory point multipliers, etc.

I am also interested in your comments about game issues, such as crazy aircraft production rates, because I may be able to make some tweaks within the code to alleviate this issue. I have also had a fairly long hiatus from Pacific War; somehow I can never stay away too long. I only wish I had figured out how to edit machine code long ago; I guess even old dogs can learn a few new tricks!

Regards,

Rich
bradk
Posts: 376
Joined: Mon Dec 12, 2005 1:21 pm

RE: New Pacific War Bug Fixes / Enhancements

Post by bradk »

ORIGINAL: Rich Dionne

Bill,

Well, I certainly don't have an agenda (Allied or Japanese), I'm trying to fix some bugs and issues that have been bothering us all for many years. I love this game and my only goal over the last ~15 years has been to make it a better game, if possible. I will certainly touch base with Brad; he has done much to improve the game. I think as Istfemer mentions, much of Brad's work has been around improvements to the OBC files, where you can significantly affect things like aircraft production rates, plus perhaps some factor adjustments in the EXE to adjust victory point multipliers, etc.

I am also interested in your comments about game issues, such as crazy aircraft production rates, because I may be able to make some tweaks within the code to alleviate this issue. I have also had a fairly long hiatus from Pacific War; somehow I can never stay away too long. I only wish I had figured out how to edit machine code long ago; I guess even old dogs can learn a few new tricks!

Regards,

Rich

Correct. The only thing I touched on the exe was the date of the kill multiplier. That's because that's all I knew how to do!

I haven't worked on PW for a long time... a blessing actually because the next thing was LCU fixes in CBI, which would have been made ineffective by the Monsoon changes. With all the work that's been here I'm excited about getting back to working on PW.

Glad to work with you guys on this project.
bradk
Posts: 376
Joined: Mon Dec 12, 2005 1:21 pm

RE: New Pacific War Bug Fixes / Enhancements

Post by bradk »

What I've done with the scenario files still needs some fixes even absent any exe changes. In a couple games with Bill its been shown I went a bit too low on production of a couple of types of aircraft... BOTH sides. However, its pretty close to what I consider reasonable.

Certain things worked out very well, as examples, no factories for patrol or cargo aircraft. The auto production of one per turn of every active aircraft - even those without a factory - combined with preloading the pools and adjusting the number is to be activated airgroups seems to work.

Anyway, I'm very happy people here are working on things beyond my capability.
bradk
Posts: 376
Joined: Mon Dec 12, 2005 1:21 pm

RE: New Pacific War Bug Fixes / Enhancements

Post by bradk »

I’m currently working on a major fix for the oil, resource, and routine convoy routines.

You're talking here about IJ oil disappearing so quickly? I tried (I think it was your suggestion) moving the two Asian mainland HQs from a port location to an inland location. It seemed to work acceptably, that is, IJ didn't have an abundance of oil but didn't basically run out June 42.
Rich Dionne
Posts: 382
Joined: Tue Jul 11, 2000 8:00 am
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by Rich Dionne »

Brad,

Yes this is related to the issue I originally brought up in the following post:

tm.asp?m=3026840&mpage=1&key=routine%2Cconvoy&#3026840

I finally found the bug in the EXE: In the routine convoy code, the desired amount of fuel and supply to be delivered to a given base is first selected, then these desired amounts of fuel and supply are actually pulled out of the oil and resource reserves. Following this, the code checks if MCS is available for delivering the fuel and supplies; if not, these quantities are still gone from the reserve.

So I'm currently working to adjust the code so that only fuel and supply actually delivered gets subtracted from the reserves.

Pulling HQs away from ports prevents the routine convoy system from sucking down the resources without delivering fuel and supplies; but this is only a stop gap measure...

Regards,

Rich
bradk
Posts: 376
Joined: Mon Dec 12, 2005 1:21 pm

RE: New Pacific War Bug Fixes / Enhancements

Post by bradk »

Yes, its a stopgap. Best I could do in the middle of a game!!!

Looking at the figures on how demand from bases is calculated, would it be possible to alter the demand formula so bases ask for less? There would still be some waste but might be easier than figuring out how to return unused oil to the pool amounts. I can't imagine any base needed 18,000 fuel points.

Even on a small base port size 4, 500 (instead of 2000) times port size is 2000 fuel points which ought to be enough even if TFs are formed there. I think....

Rich Dionne
Posts: 382
Joined: Tue Jul 11, 2000 8:00 am
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by Rich Dionne »

Indeed, actually Istfemer found the very factor for me, which I reduced from 2 to 1, and voila, you only need to supply 9000 to a size 9 port. This makes a big difference in routine convoy losses (the AI actually has a chance of finding the ships necessary!). I think I may have already put the 1.0 factor in my version 3.2.2 of the EXE. I still want to eliminate the possibility of loss altogether; I know what to do in the code, just haven't had time yet...
bradk
Posts: 376
Joined: Mon Dec 12, 2005 1:21 pm

RE: New Pacific War Bug Fixes / Enhancements

Post by bradk »

That's fantastic.

Suggest you be willing to accept some waste if necessary.

The "necessary" part is that small non HQ ports need enough fuel for TFs. Its very possible for a player to base several TFs at a level 4 port. This could especially be a problem for the Allies late in the game.
Rich Dionne
Posts: 382
Joined: Tue Jul 11, 2000 8:00 am
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by Rich Dionne »

Yes, there'll be a bit of a balancing act. But I think we can find a happy medium on what target supply and fuel levels are necessary at both HQ and non HQ bases. Actually, now that I think about it, the 2.0 factor adjustment to 1.0 only affects the target supply and fuel levels for HQ ports, the target levels for non HQ ports should be unaffected by this adjustment.
bradk
Posts: 376
Joined: Mon Dec 12, 2005 1:21 pm

RE: New Pacific War Bug Fixes / Enhancements

Post by bradk »

Cool.
User avatar
Capt. Harlock
Posts: 5379
Joined: Sat Sep 15, 2001 8:00 am
Location: Los Angeles
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by Capt. Harlock »

I finally found the bug in the EXE: In the routine convoy code, the desired amount of fuel and supply to be delivered to a given base is first selected, then these desired amounts of fuel and supply are actually pulled out of the oil and resource reserves. Following this, the code checks if MCS is available for delivering the fuel and supplies; if not, these quantities are still gone from the reserve.

So I'm currently working to adjust the code so that only fuel and supply actually delivered gets subtracted from the reserves.

Applause and thanks if you can fix this. I had my strategy in a PBEM game ruined because my National Oil Reserve dried up, and took my Preparation Points with it.

A thought: is it possible to do anything about Chinese LCU's being bombed to levels of experience that render them worthless, and they never train back up?
Civil war? What does that mean? Is there any foreign war? Isn't every war fought between men, between brothers?

--Victor Hugo
Rich Dionne
Posts: 382
Joined: Tue Jul 11, 2000 8:00 am
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by Rich Dionne »

ORIGINAL: Capt. Harlock

A thought: is it possible to do anything about Chinese LCU's being bombed to levels of experience that render them worthless, and they never train back up?

I'll see if I can find this in the code. The Chinese should be able to train up like other Allied units. They may (and probably should) have limits in terms of maximum training level possible, and a likely low starting experience for added recruits...

What kind of drop in experience have you seen? and then you don't see any experience recovery? or perhaps a painfully slow increase?
User avatar
Capt. Harlock
Posts: 5379
Joined: Sat Sep 15, 2001 8:00 am
Location: Los Angeles
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by Capt. Harlock »

What kind of drop in experience have you seen? and then you don't see any experience recovery? or perhaps a painfully slow increase?

I've seen Chinese LCU's go down to 18 after repeated bombing casualties and then being reinforced with recruits back to TOE strength. When this happens I try to move them to the rear, which is of course a slow process. (PP limitations make it wise to move only one Chinese unit per turn.) In the rear positions, I do not see any experience increase, and I seem to recall from the manual that, unlike other units, they do not train.
Civil war? What does that mean? Is there any foreign war? Isn't every war fought between men, between brothers?

--Victor Hugo
User avatar
wga8888
Posts: 459
Joined: Wed Sep 29, 2010 6:20 pm
Location: Sachse, Texas USA
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by wga8888 »

Slowly all the strange things seen in game play are coming to mind. Some are being addressed.
-A TF teleported to some remote location
-My Allies gaining a Betty bombing group; or a number of IJN AKs under my control in a port.
-Excessive numbers of planes of certain type. My game in 9/43 I have 6000+ C47s in the pool.
-The loss of Calcutta is fatal to the Allied cause; it is the supply source for India and indirectly China. It cannot be successfully defended if the IJN commits. Before starting a new game, I find it best to ask the IJN opponent if he is dedicated to capture Calcatta. If he is, congratulate him on winning the game and just don't play the game. Same issue on other Replacement hub cities.
Bill Thomson
wga8888@icloud.com
Discord: wga8888 #7339
817-501-2978 CST [-6 GMT]
Rich Dionne
Posts: 382
Joined: Tue Jul 11, 2000 8:00 am
Contact:

RE: New Pacific War Bug Fixes / Enhancements

Post by Rich Dionne »

Capt. and wga, Thanks for the input. I couldn't find anything in the manual about LCU training, but I also remember something on the subject. I'll see what I can find in the code.

wga, I've been working on teleportation issues, much is fixed. Most of the other issues you mention sound like they can be adjusted in the scenario files, such as air groups or ships entering the game at the wrong base due to an error in the scenario file. Calcutta is a definite problem. I've been toying with the idea of adding Bombay to the base list (perhaps instead of Addu I.), make it the Allied Indian supply source, and prevent it from being invaded.
Post Reply

Return to “Pacific War: The Matrix Edition”