Import core army into new campaign

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

Moderator: Panzer Corps 2 Moderators

Post Reply
Draculea
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 3
Joined: Tue Mar 04, 2014 8:42 am

Import core army into new campaign

Post by Draculea » Sun Sep 13, 2020 9:52 am

Hello,

just finished AO SCW and 39 and left me longing for more action. I was also looking in the campaign tree and came with the ideea i could import my core from AO 39 into a new 39 campaign or Barbarossa '41. Currently this is not possible and maybe is a good idea for Slitherine to give us the possibility in order to ease our waiting time until AO 40.

But that takes time, if ever available. To the point: saw some remarks on the forum of someone modding an early save with his '45 core. Would like to do the same.

Kind thanks for the people who can point me in the right direction.

dalfrede
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 973
Joined: Wed Mar 15, 2017 7:48 pm

Re: Import core army into new campaign

Post by dalfrede » Mon Sep 14, 2020 5:28 pm

To handle Core transfers between campaigns you have to edit two LUA files.

Looking at the AO39 campaign folder, two lines stand out:
From: campaign.lua

"core_sets": ["end_of_001AODLCscw"],
This line says what core[s] to import.

From script.lua

SaveCore("end_of_002AODLC1939")


So to use you AO39 Core to in a new campaign you must add the line:

"core_sets": ["end_of_001AODLC1939"],


To the campaign.lua file of the new campaign you want to play.

I am too lazy to go into more detail, but the above is enough info to modify a campaign to either save a Core or to use a Core

Note: LUA scripts are locked in when a new campaign is started.
So if you want to play with your final core from the Base campaign, you most add the SaveCore line, and replay the campaign.
Note2: I doubt that anyone has done this yet.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.

Draculea
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 3
Joined: Tue Mar 04, 2014 8:42 am

Re: Import core army into new campaign

Post by Draculea » Tue Sep 15, 2020 10:06 am

Yup, this works very well. Only addition is "campaign.lua" is a .json. You also need to click on the custom army in order for this to work properly.

The other thing i might try to do is get the corps composition from the .sav files. Will look at one to see if i can pinpoint the location of the core.

Thank and regards.
dalfrede wrote:
Mon Sep 14, 2020 5:28 pm
To handle Core transfers between campaigns you have to edit two LUA files.

Looking at the AO39 campaign folder, two lines stand out:
From: campaign.lua

"core_sets": ["end_of_001AODLCscw"],
This line says what core[s] to import.

From script.lua

SaveCore("end_of_002AODLC1939")


So to use you AO39 Core to in a new campaign you must add the line:

"core_sets": ["end_of_001AODLC1939"],


To the campaign.lua file of the new campaign you want to play.

I am too lazy to go into more detail, but the above is enough info to modify a campaign to either save a Core or to use a Core

Note: LUA scripts are locked in when a new campaign is started.
So if you want to play with your final core from the Base campaign, you most add the SaveCore line, and replay the campaign.
Note2: I doubt that anyone has done this yet.

Post Reply

Return to “Panzer Corps 2 Scenario Design”