Page 1 of 1
How to create a custom campaign?
Posted: Sat Jan 02, 2021 9:11 pm
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?
Re: How to create a custom campaign?
Posted: Sat Jan 02, 2021 9:45 pm
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++
Re: How to create a custom campaign?
Posted: Sat Jan 02, 2021 10:25 pm
by dalfrede
Re: How to create a custom campaign?
Posted: Sat Jan 02, 2021 11:54 pm
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.
Re: How to create a custom campaign?
Posted: Sun Jan 03, 2021 1:10 am
by dalfrede
No, you need to have deployment hexes though
Re: How to create a custom campaign?
Posted: Sun Jan 03, 2021 1:46 am
by Ezequiel1996
thank you very much!
Re: How to create a custom campaign?
Posted: Sun Jan 03, 2021 2:51 am
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
Re: How to create a custom campaign?
Posted: Sun Jan 03, 2021 6:52 am
by Ezequiel1996
i need some help please i can't find the solution
i will upload the campaign rar. can someone help me?
Re: How to create a custom campaign?
Posted: Mon Jan 04, 2021 5:18 am
by Ezequiel1996
i need help with this problem

Re: How to create a custom campaign?
Posted: Tue Jan 05, 2021 2:01 pm
by MagicAndre1981
in the
you forgot the
at the beginning.
After adding it the campains loads fine.
Re: How to create a custom campaign?
Posted: Tue Jan 05, 2021 6:09 pm
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 !
Re: How to create a custom campaign?
Posted: Tue Jan 05, 2021 6:26 pm
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?
Re: How to create a custom campaign?
Posted: Wed Jan 06, 2021 2:32 am
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