Hacking save files

A forum to discuss custom scenarios, campaigns and modding in general.

Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design

Post Reply
jdkbph
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 6
Joined: Mon Nov 03, 2014 2:07 am

Hacking save files

Post by jdkbph »

I posted this in the support forum....

ACK! I've been playing this game (one iteration or another) for over 20 years, and I can't remember how to change unit types (eg, swap ant-tank for infantry) between scenarios? I'm sure I used to be able to do this. Did something change or am I just blind and can't find the option?

The reply I received was no you can't do that. I suggested that this a "design oversight" (meaning no disrespect), and asked if it might be possible to hack a save file to accomplish what I want. I was then directed here.

So does anyone know the answer to that question? Is it possible? If so is there some sort of utility I can use for that?

Thanks.

JD
tenshin111
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 243
Joined: Sun Aug 23, 2015 2:23 pm

Re: Hacking save files

Post by tenshin111 »

I don't know why you would want to change unit type between scenarios and I don't think this is a "design oversight". But that is my opinion ;)

I think it should be possible to do it anyway by changing unit id in the save file. I actually spent some time reverse-engineering the savegame files to be able to change hero attributes (from useless +1 spotting on arty to +1 attack for example) and I know how to do that. I'll take a look at unit types/ids and see if my hypothesis is correct.
tenshin111
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 243
Joined: Sun Aug 23, 2015 2:23 pm

Re: Hacking save files

Post by tenshin111 »

Ok, it looks pretty easy.

Obviously, you need a hex editor, end then:

1. Find the units name
2. Find the last character of the unit's name (the files use unicode encoding so each character is represented by two bytes!)
3. Count EIGHT (empty) bytes from place
4. Bingo. You've found the hex value of the unit id (which refers to the ID in equipment.pzeqp file)
Attachments
save_edit.png
save_edit.png (92.62 KiB) Viewed 7155 times
jdkbph
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 6
Joined: Mon Nov 03, 2014 2:07 am

Re: Hacking save files

Post by jdkbph »

Wow. Great info. Thanks.

As to why I would want to do that? Just to adapt my formations to the changing theaters and complexion of the war as it progressed. Take a look at the history of the 19th Pz Div for example. Converted from an Inf Div to an Armored Div early in the war. This kind of thing was not all that uncommon.

I suppose I should finish the thought...

I know it's ambiguous, but I view the scale of Panzer Corps to be, for the most part, just that... a corps. I usually group my individual formations as if they were brigades/regiments/battalions and I combine them and use them as divisions... typically 1 tank and 2 mech inf, or 2 tank and 1 mech inf, etc. I then attach "corps level assets" such as air, arty, or AT units as necessary.

So if one of my "divisions" is configured as mech inf, and I want to convert it to a tank division, I'd need to swap out one of the inf brigades/regiments/battalions for a tank brigade/regiment/battalion.

Make sense?

JD
captainjack
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1912
Joined: Thu Sep 13, 2012 7:42 am

Re: Hacking save files

Post by captainjack »

An alternative approach would be to edit scenario(s) to script a unit action in a convenient scenario. The most reliable way is probably to change a unit in a specific city or a marked special hex - this is used in US corps to convert infantry to ranger units and it does work between different classes (I recommend you remove the transport before changing the unit type as a tank with a truck transport is a bit strange).
tenshin111
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 243
Joined: Sun Aug 23, 2015 2:23 pm

Re: Hacking save files

Post by tenshin111 »

jdkbph wrote:Wow. Great info. Thanks.

As to why I would want to do that? Just to adapt my formations to the changing theaters and complexion of the war as it progressed. Take a look at the history of the 19th Pz Div for example. Converted from an Inf Div to an Armored Div early in the war. This kind of thing was not all that uncommon.

I suppose I should finish the thought...

I know it's ambiguous, but I view the scale of Panzer Corps to be, for the most part, just that... a corps. I usually group my individual formations as if they were brigades/regiments/battalions and I combine them and use them as divisions... typically 1 tank and 2 mech inf, or 2 tank and 1 mech inf, etc. I then attach "corps level assets" such as air, arty, or AT units as necessary.

So if one of my "divisions" is configured as mech inf, and I want to convert it to a tank division, I'd need to swap out one of the inf brigades/regiments/battalions for a tank brigade/regiment/battalion.

Make sense?

JD
No probs.

Yeah, I can understand what you're saying but you can still buy different units between the scenarios (depending on your needs) and sell the ones you don't want anymore. But this creates an issue - losing experience gathered on your existing units. And that's why - in my opinion - this kind of tinkering with unit types breaks the balance of the game. As you progress in the campaign, experience becomes more and more valuable and being able to freely change/swap units around defeats the whole purpose of unit's progress. In other words, you gather experience with infantry units early in the game and then convert them to experienced panzers or AT units. It's just wrong, at least in the context of this game. But this just my view ;)
jdkbph
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 6
Joined: Mon Nov 03, 2014 2:07 am

Re: Hacking save files

Post by jdkbph »

You're right but I see this as more of an "exchange" of constituent formations that "converts" the role of the parent. A reorganization of men and equipment... not just the equipment. At least that seems to be the way most countries effected div level re-orgs under reasonably normal conditions (ie, non-emergency/desperation).

You guys did give me an idea however. It's clunky but it should give me what I want. I can disband the units I want to swap out (this has no consequence as I represent the only true force in the game), purchase the units I want to replace them with, then use the cheat keys to give them some reasonable amount of experience.

It's clunky and requires discipline on my part to limit my "adjustments", but it appears to work. I suppose I could use dice or something to randomize this a bit.

JD
Post Reply

Return to “Panzer Corps : Scenario Design”