Page 1 of 1
LUA questions
Posted: Sat Jan 22, 2022 2:20 am
by FunPolice749
Hello, I'm currently dipping my toes into scenario design and LUA scripting. It's a bit of work but I have come to understand the basics of stuff like reinforcement waves, special hexes, and similar things. I got 2 questions currently:
1. I want to have my reinforcement waves come with specific names and possibly camouflage but I am haven't been able to find any scenario that does this. Is there some way to do this?
2. I want to have specific waves come on specific turns. Is there a way to do that without it being random in the normal waves/boss waves? Currently I haven't had luck in trying to make unique waves but it's entirely possible I'm messing something up.
Re: LUA questions
Posted: Sat Jan 22, 2022 11:28 am
by asuser
Some of your questions (name, skin) I answered here:
viewtopic.php?f=597&t=105069#p918261
Re: LUA questions
Posted: Sat Jan 22, 2022 11:01 pm
by FunPolice749
Thank you for that it was exactly what I was looking for
Would you also know of like any guides or reference points on LUA scripting? I'm still having trouble reliably making stuff work and I can't really find anything that helps. Like for example I still am having trouble to reliably make reinforcement waves spawn because I don't know exactly what is needed. I copy stuff from official scenarios like the zones, waves content, the function WaveSpawn, and the OnNewRound action but then I go to load a scenario and it just doesn't work (and yes I do also include atrigger for the new round event). If there is any guide that explains this or if anyone could help with this it would be greatly appreciated.
Re: LUA questions
Posted: Sun Jan 23, 2022 9:53 am
by asuser
The biggest problem with scenario design is that there are not many answers from the developers to most of the questions. Everything has to be painstakingly picked out of the DLC and then tried out for yourself.
That's why I asked for a real "Modding Guide" a long time ago.
There is only a rudimentary LUA manual on the LUA topic at
"Panzer Corps 2/Manuals... LUAscripting" and another separate document below
"Panzer Corps 2/Panzer Corps2/Content/Editor... properties".
A lot of existing LUA commands means a lot of functionality and variability for the game and the scenario design, but this is currently not fully exploited in the DLC.
Re: LUA questions
Posted: Fri Feb 25, 2022 7:16 pm
by Grondel
FunPolice749 wrote: ↑Sat Jan 22, 2022 2:20 am
2. I want to have specific waves come on specific turns. Is there a way to do that without it being random in the normal waves/boss waves? Currently I haven't had luck in trying to make unique waves but it's entirely possible I'm messing something up.
if u have steam grab the mod "panzercorps 1" and check the Lua-file of scenario Battle Axe.
there are a lot of other scenarios that have specific waves on specific triggers in other scenarioys, too.
Re: LUA questions
Posted: Fri Feb 25, 2022 10:20 pm
by Panzermate
Howdy, folks.
Well I just a finished a quick explanation about Lua from a web Tut and now I know ....not a whole lot more than before.
Several issues, maybe some of you - who appearantly have a head start on this subject - can tell me where to find help to understand some basics so
I'll be able to copy and paste some already working stuff and tweak it to my liking.
I would like to:
Implement grahics(JPEG/PNG) into the header of the sceanrio briefings box.
That means store your selected graphics somewhere and then implement them via script into the briefing.
In the briefings section you select "Set Portait" but instead of an image/source it contains the function "gerhardt_panicked".
(3rd scenario "Brevity" of GCAfrikaCorps). But where can this be found ans waht exactly does ot do or how does it work?
Use this commendation event, but in a different way.
I don't want to award points the player can exchange for heroes or equipment, but rather want him to get promotions (in my campaign the player begins as a Major)
and/or awards/medals for fullfilling some secondary and bonus objectives in certain scenarios.
Means I want to use the in game black box notification once a certain level of achieved bonus/secondary missions is accomplished and hand out
the mentioned promotions/awards.
In fact eye candy only but it increases the llok and fell of the campaign!
Show some maps/start screens before the scenario using these:
Re: LUA questions
Posted: Sun Feb 27, 2022 1:56 am
by Grondel
All u want to do is done in the mod i mentioned above. take a look at the luas and if u have specific questions feel free to ask.