Help needed - how to get rid of excess devices when recombining sub-units

Please post here for questions and discussion about scenario design, art and sound modding and the game editor for WITP Admiral's Edition.

Moderators: wdolson, MOD_War-in-the-Pacific-Admirals-Edition

Post Reply
User avatar
LargeSlowTarget
Posts: 4800
Joined: Sat Sep 23, 2000 8:00 am
Location: Hessen, Germany - now living in France

Help needed - how to get rid of excess devices when recombining sub-units

Post by LargeSlowTarget »

Hello,

I need some help with recombining units and shedding of excess devices. I have tried the search but unable to find the answer.

I want to recombine the various US Navy and US Army Air Corps base forces in the PI into the historic "Provisional Naval Rifle Battalion" and the "Provisional Air Corps Regiment". This is to reduce "unit clutter" and the number of devices counting against the stacking limits (which I believe are too low for Clark and Bataan hexes, but I don't know how to edit them). The idea is that the recombined units should shed the assorted devices (AA guns, air and naval support etc.) of the base force sub-units and obtain a TO&E containing just "Provisional Rifle Squads", a few machine guns, a couple of light mortars and support squads.

So I have created parent units for the provisional units and made the assorted base forces their sub-units. However, when the sub-units recombine, all their devices are being lumped together in the parent unit - in adition to the TO&E devices of the parent unit (which start at 0 and need to fill-out, but that is not a problem).

My question is how to make disappear the unwanted excess devices when recombining sub-units i.e. the AA guns and air / naval support from the sub-unis not wanted in the parent unit TO&E. I have tried a parent unit TO&E containing just the "wanted" devices, as well as a TO&E containing the unwanted devices with their amount set to "0" (I have altered the sequence of the devices in the slots so the slots of sub-units and parents contain the same devices in the same slots). Makes no difference, I always have unwanted devices carried over from the sub-units in the parent.

Thanks in advance!

LargeSlowTarget
User avatar
PaxMondo
Posts: 9796
Joined: Fri Jun 06, 2008 3:23 pm

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by PaxMondo »

ORIGINAL: LargeSlowTarget

This is to reduce "unit clutter" and the number of devices counting against the stacking limits (which I believe are too low for Clark and Bataan hexes, but I don't know how to edit them).
LST:

I believe that the stacking limits are in the pwhex file. fairly straight forward to edit that file.
Pax
User avatar
PaxMondo
Posts: 9796
Joined: Fri Jun 06, 2008 3:23 pm

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by PaxMondo »

ORIGINAL: LargeSlowTarget

Hello,

I need some help with recombining units and shedding of excess devices. I have tried the search but unable to find the answer.


]My question is how to make disappear the unwanted excess devices when recombining sub-units i.e. the AA guns and air / naval support from the sub-unis not wanted in the parent unit TO&E. I have tried a parent unit TO&E containing just the "wanted" devices, as well as a TO&E containing the unwanted devices with their amount set to "0" (I have altered the sequence of the devices in the slots so the slots of sub-units and parents contain the same devices in the same slots). Makes no difference, I always have unwanted devices carried ove

I don't think you can. when units combine, they retain their current devices. they just have a new TOE that they will build/replace to. IJ has a lot of examples of that as early on many (most) ID's are split into almost infinite sub-units, many not appearing on map for months ... sometimes years ..
Pax
szmike
Posts: 354
Joined: Sun Aug 30, 2009 11:21 am

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by szmike »

ORIGINAL: LargeSlowTarget

My question is how to make disappear the unwanted excess devices when recombining sub-units i.e. the AA guns and air / naval support from the sub-unis not wanted in the parent unit TO&E. I have tried a parent unit TO&E containing just the "wanted" devices, as well as a TO&E containing the unwanted devices with their amount set to "0" (I have altered the sequence of the devices in the slots so the slots of sub-units and parents contain the same devices in the same slots). Makes no difference, I always have unwanted devices carried over from the sub-units in the parent.

Thanks in advance!

LargeSlowTarget

It's only possible indirectly afaik. When playing a game and settting upgrades to on (and op mode to rest) after recombining, units within double command HQ range remove non-TOE devices to pool during turn resolution.
US87891
Posts: 422
Joined: Sun Jan 02, 2011 1:31 pm

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by US87891 »

As Pax says, it can't be done the obvious way. The code sections dealing with upgrades, replacements, and recombination has been modified many times in response to community clamor. Hard to know what is real or what is Memorex presently.

In our small scenarios, some units have three or more TOE options for upgrading; primarily the Australian Light Horse and armor. In the database, we set the 'old' unit to withdraw (disband) on a certain date and introduce the appropriate 'new' unit as a 'delayed' introduction. Problem with that is the 'new' unit arrives at the location that the 'old' unit occupied at the scenario start. If the 'old' unit has substantially moved, or is engaged in combat somewhere else, things get FUBB. Also, the substitution date is cast in stone in the initial database.

Just some thoughts you can play around with.

You can get Dave Bradley's AE map data editor at https://sites.google.com/site/dbpagegro ... /downloads
It can edit the stacking limits for each hex. I think there is a How To, or Readme in the download.

Best of luck.

Matt
User avatar
LargeSlowTarget
Posts: 4800
Joined: Sat Sep 23, 2000 8:00 am
Location: Hessen, Germany - now living in France

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by LargeSlowTarget »

Thanks guys for the quick answers!
el cid again
Posts: 16980
Joined: Mon Oct 10, 2005 4:40 pm

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by el cid again »

My question is how to make disappear the unwanted excess devices when recombining sub-units

The trick is to REPLACE devices with different ones. You can in fact use the same device more than once too.

First - ALL the units that will combine - and the parent - need to use a similar device order scheme. If a given
sub unit is to have none of a given device which is present in the parent - put the device number but zero count
in the slot. It will not report in the game, but will combine properly. If a sub unit has a device you want to
lose after combining, for that slot, put a device in the parent unit which is different - and it will 'convert'
all the former devices instantly. Watch the numbers so the combined totals are correct. But what you want to do
can be done.
User avatar
LargeSlowTarget
Posts: 4800
Joined: Sat Sep 23, 2000 8:00 am
Location: Hessen, Germany - now living in France

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by LargeSlowTarget »

Still tinkering with these issues, time permitting. The hints given by Cid have allowed my to advance on the recombination issue, but I am still stuck with the stacking limits.

In the pwhexdat editor docs I have only found the following snippet:

2.3.20 Stacking Limit (Byte 49)
00 = Unlimited
01-FF = the value in this field *5000
Note: At present this field only works with the latest beta releases and is in testing/modification trials.
The stacking limit may also be a function of other factors such as terrain, base size, etc.


I do run the latest beta release, but changing the value does not have any effect in the game.

The base in question is medium island, with a "stock" limit of 60k men.

I have tried with the value 03, expecting to arrive at a limit of 15k men - but no change in the game.

DBB contains other "medium" islands with less than 60k limits, so it appears to be doable.

However, the editor value for those bases is "00" - does that mean the limits in DBB are hardcoded ?

For background info: My mod contains the bases of Rendova and Kolombanagara, for which I want to limit stacking to 15k - 20k men. I also want to up the 45k limit for Bataan, which I deem being too low (some Allied players resort to "Banzai charges" in order to reduce Allied troop strength on the PI in order to reduce overstacking and supply usage - that is cheesy IMO).

Any help greatly appreciated.
US87891
Posts: 422
Joined: Sun Jan 02, 2011 1:31 pm

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by US87891 »

ORIGINAL: LargeSlowTarget
...
Any help greatly appreciated.
Bonjour LST,
Yes, what you wish is eminently doable. We do it continually, so I know it works. And yes, Babes stacking limits are implemented through a pwhexe editor and not by hard coding.

I believe you are using the map editor from Dave Bradley. I downloaded a copy of v-07 and it functions just as intended. However, there are some administrative procedures that need to be followed. The pwhexe file that it opens must be in the same folder as the editor’s exe file.

When editing, clicking the “write” buttons just saves things to the buffer. You must periodically and affirmatively “save” from the file menu to actually update the file.

When you are finished, check the date/time stamp of the file in the editor directory to make sure it’s copacetic. If so, copy/transfer to your main AE directory and enjoy. You must restart in order to load the new pwhexe file.

[ed] I should be clearer. "Write" saves your edits to the buffer. "Save" saves your buffer to the file. You need to do both.

If you are still having problems, send me a PM, and I help sort them out.

Matt
User avatar
LargeSlowTarget
Posts: 4800
Joined: Sat Sep 23, 2000 8:00 am
Location: Hessen, Germany - now living in France

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by LargeSlowTarget »

Hello Matt,

Thx for chiming in.

Yes, I do use Dave Bradley's v07 editor.

I'm using the editor like you describe and I have no issues with changing hex sides, rivers, straits, terrain etc. - my changes to these parameters do appear in the game.

The only thing that is not working is the stacking limit.

I have the impression that the stacking values are not even being read into the editor, the value is always "00" for all hexes.

The example below is the Bataan hex which in-game has a 45k limit but shows "00" in the editor.

Changing that value and then write/save it and replacing the pwhexdat file has no impact in the game.

That's why I am at loss here.

On this occasion - please convey my greetings to John.





Image
Attachments
stacklimit.jpg
stacklimit.jpg (235.78 KiB) Viewed 83 times
US87891
Posts: 422
Joined: Sun Jan 02, 2011 1:31 pm

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by US87891 »

My goodness, that sounds grim. It could be the file or the editor that's gotten corrupted somehow. One way to check is open the file with a hex editor. Make the display record 56 bytes wide and look at the value in column 49. The bytes for the Bataan hex (78 : 77) will be at offset 899752 (decimal) or DBAA8 (hex). Look for a 9 in column 49; or just see if there is anything other than '0' in col 49.

We have a different editor that can do many things. If you want, send me your pwhexe file by PM and I'll have John, Ed or Mo look at it. If something needs fixing, we can do that without disturbing any of your other data.

Let me know. Matt
User avatar
LargeSlowTarget
Posts: 4800
Joined: Sat Sep 23, 2000 8:00 am
Location: Hessen, Germany - now living in France

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by LargeSlowTarget »

Hi Matt,

OMG, I'm a bloody amateur, never done hex editing before...

Well ok, I have installed HxD which Dave has recommended in the pwhexdat notes, and although I have no idea what the editor and the numbers are all about, I have found the indicated line in my modded pwhexdat.file :

Image

Just to compare, I have re-downloaded the "Gnarly Asian Roads with SL" file from the Babes website.

It is exactly the same - in both HxD and the pwhexdat editor > when I load the gnarly file in pwhexdateditor, it shows "Stack limit = 00" for the Bataan hex.

Does that mean my editor that's gotten corrupted somehow?
Attachments
hexedit.jpg
hexedit.jpg (278.65 KiB) Viewed 83 times
US87891
Posts: 422
Joined: Sun Jan 02, 2011 1:31 pm

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by US87891 »

Hello, LST,

For a self-described amateur, you are doing very well. Everything seems copacetic with the pwhexe file so the only thing left is possible corruption of your editor or perhaps 'something' squirrely in the procedure for accessing the correct file. I can't say at this point.

PM me a copy of your pwhexe file. I'll open it in my copy of Dave's editor and see what, if anything, is going on; either with the file or editor. Once the error source is ID'd the fix should be straight forward.

Matt
User avatar
LargeSlowTarget
Posts: 4800
Joined: Sat Sep 23, 2000 8:00 am
Location: Hessen, Germany - now living in France

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by LargeSlowTarget »

Now slap me silly... the fault was indeed with my editor installation!

Just to eliminate all possible errors on my side, I have redownloaded the v07 editor from tm.asp?m=2922596 - and with the new download I get "stacking limit = 09" for the Bataan hex and can change it! Hooray, now I can finalize my mod.

Thank you so much, Matt, for having pointed me in the right direction!
US87891
Posts: 422
Joined: Sun Jan 02, 2011 1:31 pm

RE: Help needed - how to get rid of excess devices when recombining sub-units

Post by US87891 »

Hi LST,
I am glad you got it sorted out.
Post Reply

Return to “Scenario Design and Modding”