How to create a custom campaign?

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

Moderator: Panzer Corps 2 Moderators

Post Reply
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

How to create a custom campaign?

Post by Ezequiel1996 »

hi guys i've been working on some scenarios and i want to put them together in a campaign enviroment, how im supposed to do that?
Kerensky
Content Designer
Content Designer
Posts: 8649
Joined: Wed Jan 12, 2011 2:12 am

Re: How to create a custom campaign?

Post by Kerensky »

Outside of the all important scenario files themselves, it's really not that complex. As always, the best way to learn is by existing examples: looking at a DLC campaign.

In short, need 3 things.

1. campaign.json
2. script.lua
3. Put them and scenario folders into this directory

C:\Users\YOURUSERNAME\Documents\My Games\Panzer Corps 2\Campaigns

json and lua file are very simple files you can edit with notepad or notepad++
dalfrede
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1503
Joined: Wed Mar 15, 2017 7:48 pm

Re: How to create a custom campaign?

Post by dalfrede »

For reference:
https://www.slitherine.com/forum/viewto ... 97&t=97693
The first user campaign.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

Re: How to create a custom campaign?

Post by Ezequiel1996 »

thank you guys, im gonna check it now, do i need to create a script for having the same core for every scenario of the campaing? or is already done in the game? im a bit confused about that.
dalfrede
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1503
Joined: Wed Mar 15, 2017 7:48 pm

Re: How to create a custom campaign?

Post by dalfrede »

No, you need to have deployment hexes though
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

Re: How to create a custom campaign?

Post by Ezequiel1996 »

thank you very much!
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

Re: How to create a custom campaign?

Post by Ezequiel1996 »

i did it and when i enter the game and go to new campaign the game crashes and says this LoginId:2d57e60e4b09edb8cb90d68fbbf76dc5
EpicAccountId:

Unhandled Exception: 0xe06d7363

PanzerCorps2_Win64_Shipping!JsonSerializer<CampaignData,void>::Read() [C:\Projects\PanzerCorps2\New\trunk\Source\Common\JsonSerializer.h:126]
PanzerCorps2_Win64_Shipping!JsonReadFromFile<CampaignData>() [C:\Projects\PanzerCorps2\New\trunk\Source\Common\JsonSerializer.h:81]
PanzerCorps2_Win64_Shipping!UGameSelection::AddCampaign() [C:\Projects\PanzerCorps2\New\trunk\Source\Gui\GameSelection.cpp:819]
PanzerCorps2_Win64_Shipping!UCampaignUI::FillList() [C:\Projects\PanzerCorps2\New\trunk\Source\Gui\CampaignUI.cpp:47]
PanzerCorps2_Win64_Shipping!UINavigator::Chain::NavTo() [C:\Projects\PanzerCorps2\New\trunk\Source\Gui\Navigator.cpp:26]
PanzerCorps2_Win64_Shipping!``UMainMenu::OnCreated'::`2'::<lambda_2>::operator()'::`2'::<lambda_1>::operator()() [C:\Projects\PanzerCorps2\New\trunk\Source\Gui\MainMenu.cpp:53]
PanzerCorps2_Win64_Shipping!std::_Func_impl_no_alloc<``UMainMenu::OnCreated'::`2'::<lambda_2>::operator()'::`2'::<lambda_1>,FReply,FPointerEvent const &>::_Do_call() [C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\INCLUDE\functional:903]
PanzerCorps2_Win64_Shipping!SweetButton::OnMouseButtonUp() [C:\Projects\PanzerCorps2\New\trunk\Source\Gui\Sweets.cpp:129]
PanzerCorps2_Win64_Shipping!SButton::FArguments::OnClicked<SWindowTitleBar>()
PanzerCorps2_Win64_Shipping!FSlateApplication::RoutePointerUpEvent()
PanzerCorps2_Win64_Shipping!FSlateApplication::ProcessMouseButtonUpEvent()
PanzerCorps2_Win64_Shipping!FSlateApplication::OnMouseUp()
PanzerCorps2_Win64_Shipping!FWindowsApplication::ProcessDeferredMessage()
PanzerCorps2_Win64_Shipping!FWindowsApplication::DeferMessage()
PanzerCorps2_Win64_Shipping!FWindowsApplication::ProcessMessage()
PanzerCorps2_Win64_Shipping!FWindowsApplication::AppWndProc()
user32
user32
PanzerCorps2_Win64_Shipping!FWindowsPlatformApplicationMisc::PumpMessages()
PanzerCorps2_Win64_Shipping!FEngineLoop::Tick()
PanzerCorps2_Win64_Shipping!GuardedMain()
PanzerCorps2_Win64_Shipping!GuardedMainWrapper()
PanzerCorps2_Win64_Shipping!WinMain()
PanzerCorps2_Win64_Shipping!__scrt_common_main_seh() [D:\agent\_work\9\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
kernel32
ntdll
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

Re: How to create a custom campaign?

Post by Ezequiel1996 »

i need some help please i can't find the solution
i will upload the campaign rar. can someone help me?
Attachments
GC1939.rar
(68.8 KiB) Downloaded 70 times
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

Re: How to create a custom campaign?

Post by Ezequiel1996 »

i need help with this problem :(
MagicAndre1981
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 41
Joined: Sat Aug 16, 2014 6:50 pm

Re: How to create a custom campaign?

Post by MagicAndre1981 »

in the

Code: Select all

 campaign.json
you forgot the

Code: Select all

{
at the beginning.

After adding it the campains loads fine.
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

Re: How to create a custom campaign?

Post by Ezequiel1996 »

thank you i actually managed to get it working but i didn't knew what i did, i just paste it again from the dlcs example haha thank you !
MagicAndre1981
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 41
Joined: Sat Aug 16, 2014 6:50 pm

Re: How to create a custom campaign?

Post by MagicAndre1981 »

Ezequiel1996 wrote: Tue Jan 05, 2021 6:09 pm i just paste it again from the dlcs example haha thank you !
ok. The mod is in spanish when my UI language in PC2 is German. By design?
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

Re: How to create a custom campaign?

Post by Ezequiel1996 »

yes it's in spanish, but im gonna do it on english, its harder for me to create briefings in english, spanish is my main language XD
Post Reply

Return to “Panzer Corps 2 Scenario Design”