Stock Campaign and CreateHero

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

Moderator: Panzer Corps 2 Moderators

Post Reply
charge62
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 102
Joined: Fri Nov 09, 2012 12:05 am

Stock Campaign and CreateHero

Post by charge62 »

In AO, I've had no problems creating custom heroes.

I've just started trying in the stock campaign and I've run into a snag. With Battleaxe and Crusader the script looks good and throws out no errors. However the heroes don't appear.

I think the problem has something to do with the existing .lua files and how they interact with the scenario.

Has anyone else run into this?

Is there a solution?

Thank you.
Grondel
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1970
Joined: Mon Aug 04, 2014 10:07 pm

Re: Stock Campaign and CreateHero

Post by Grondel »

charge62 wrote: Wed Jul 16, 2025 8:07 pm In AO, I've had no problems creating custom heroes.

I've just started trying in the stock campaign and I've run into a snag. With Battleaxe and Crusader the script looks good and throws out no errors. However the heroes don't appear.

I think the problem has something to do with the existing .lua files and how they interact with the scenario.

Has anyone else run into this?

Is there a solution?

Thank you.
Without looking at the scenarios i would asume that in both the player goes second, turning him from player 0 to player 1.
u need to adjust ur scripts to that.

sers,
Thomas
charge62
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 102
Joined: Fri Nov 09, 2012 12:05 am

Re: Stock Campaign and CreateHero

Post by charge62 »

I didn't think of that. Thanks.
scorehouse
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 967
Joined: Thu Jun 27, 2019 1:56 am

Re: Stock Campaign and CreateHero

Post by scorehouse »

did it work?
charge62
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 102
Joined: Fri Nov 09, 2012 12:05 am

Re: Stock Campaign and CreateHero

Post by charge62 »

Yes, it worked.

Original code is,
local action = world:MakeNewHeroAction(0, hero)

Change the 0 to 1
local action = world:MakeNewHeroAction(1, hero)
scorehouse
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 967
Joined: Thu Jun 27, 2019 1:56 am

Re: Stock Campaign and CreateHero

Post by scorehouse »

man I wish I knew how to do that. I've never learned how to Mod. but after doing that, you can attach 3/4 etc. hero traits to one Hero? does the Hero have to come with a unit like a tank, Stuka. etc.?
Grondel
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1970
Joined: Mon Aug 04, 2014 10:07 pm

Re: Stock Campaign and CreateHero

Post by Grondel »

scorehouse wrote: Wed Aug 06, 2025 8:57 pm but after doing that, you can attach 3/4 etc. hero traits to one Hero?
The number is not limited, but a hero with 10 traits looks cluttered. 6 atributes, including the unit restrictions, is max that still looks good, but in theory u can have a hero with all possible traits at once.
scorehouse wrote: Wed Aug 06, 2025 8:57 pm does the Hero have to come with a unit like a tank, Stuka. etc.?
No.

sers,
Thomas
scorehouse
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 967
Joined: Thu Jun 27, 2019 1:56 am

Re: Stock Campaign and CreateHero

Post by scorehouse »

need a custom Hero Mod package like Killer Team. is there a tutorial about how to Mod PC2?
Grondel
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1970
Joined: Mon Aug 04, 2014 10:07 pm

Re: Stock Campaign and CreateHero

Post by Grondel »

scorehouse wrote: Thu Aug 07, 2025 10:37 am need a custom Hero Mod package like Killer Team. is there a tutorial about how to Mod PC2?
None that will get u there. check the stickies in the modding area for some input, but it´s very rudimentary.

sers,
Thomas
scorehouse
Major - 8.8 cm FlaK 36
Major - 8.8 cm FlaK 36
Posts: 967
Joined: Thu Jun 27, 2019 1:56 am

Re: Stock Campaign and CreateHero

Post by scorehouse »

thanks
Post Reply

Return to “Panzer Corps 2 Scenario Design”