Unique Upgrade Question
Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design
Unique Upgrade Question
Hello everyone,
I have a Question.
I want to bring in Unique units (Graphics) in the game. For example 1.ZG "Wespe" Luftwaffe Bf-110. The graphic has a Wespe on the nose.
I make this unique units "nopurchase" so I can "give" 1 to the player but the computer AI can not buy 20 of them.
The Question/problem is that the player must have the possibility to upgrade this units (Example from Bf-110C to Bf-110D). The upgrade (Again with unique graphic) must only be for that unique unit or everything will be messed up again by the AI.
Example, The 501 heavy panzer bn, Tiger I, can enter the game with a unic graphic in a campaign scenario as given core unit to the player. But at a moment the player must have the chance to upgrade it to the 501 heavy panzer bn Tiger II.
Who Knows how to fix this?
Greetings PHCAS
I have a Question.
I want to bring in Unique units (Graphics) in the game. For example 1.ZG "Wespe" Luftwaffe Bf-110. The graphic has a Wespe on the nose.
I make this unique units "nopurchase" so I can "give" 1 to the player but the computer AI can not buy 20 of them.
The Question/problem is that the player must have the possibility to upgrade this units (Example from Bf-110C to Bf-110D). The upgrade (Again with unique graphic) must only be for that unique unit or everything will be messed up again by the AI.
Example, The 501 heavy panzer bn, Tiger I, can enter the game with a unic graphic in a campaign scenario as given core unit to the player. But at a moment the player must have the chance to upgrade it to the 501 heavy panzer bn Tiger II.
Who Knows how to fix this?
Greetings PHCAS
- Attachments
-
- VB.jpg (45.28 KiB) Viewed 2973 times
Re: Unique Upgrade Question
Currently it is not possible to do it as far as I know. You can only make these units elite or SE by adding them the bonus trait just like SE units have in the base game. Then they cannot be purchased but can be upgraded to another bonus unit. However, they can be upgraded to any other available bonus unit in the same class not just that other unique unit. But you can place these two unique units in the same upgrade family (series) so that they can be upgraded cheaper to the newer model. This would encourage players to upgrade to that other unique unit.
Another option might be scripting: during a scenario you can tell the game to upgrade any unit with a certain name to any another unit anytime. Here the disadvantage is that some tricky players might try to rename some other units to the same name to get more upgraded units for free. But I think most players do not bother renaming the existing units. And if you really want to you might be able to avoid it by some more scripting: for example you designate a zone which is only one hex and tell the player to move that certain unique unit there at a certain turn and than the upgrade would happen only once in that given turn in that given hex and then you can even charge the player for some prestige, too.
Another option might be scripting: during a scenario you can tell the game to upgrade any unit with a certain name to any another unit anytime. Here the disadvantage is that some tricky players might try to rename some other units to the same name to get more upgraded units for free. But I think most players do not bother renaming the existing units. And if you really want to you might be able to avoid it by some more scripting: for example you designate a zone which is only one hex and tell the player to move that certain unique unit there at a certain turn and than the upgrade would happen only once in that given turn in that given hex and then you can even charge the player for some prestige, too.


slitherine.com/forum/viewtopic.php?f=147&t=47985
slitherine.com/forum/viewtopic.php?f=147&t=36969
-
flakfernrohr
- Colonel - Ju 88A

- Posts: 1572
- Joined: Wed Aug 03, 2011 11:56 pm
- Location: Texas
Re: Unique Upgrade Question
I don't know if this mod would work, but Puma on the DMP forum did a purchase mod some time ago. That might add some ability to "purchase" a unit at will.
Old Timer Panzer General fan. Maybe a Volksturm soldier now. Did they let Volksturm drive Panzers?
Re: Unique Upgrade Question
This sounds very good. Thanks McGuba, I only have to find out exactly how to do that.McGuba wrote: Another option might be scripting: during a scenario you can tell the game to upgrade any unit with a certain name to any another unit anytime. Here the disadvantage is that some tricky players might try to rename some other units to the same name to get more upgraded units for free. But I think most players do not bother renaming the existing units. And if you really want to you might be able to avoid it by some more scripting: for example you designate a zone which is only one hex and tell the player to move that certain unique unit there at a certain turn and than the upgrade would happen only once in that given turn in that given hex and then you can even charge the player for some prestige, too.
Thanks PHCAS
-
captainjack
- Brigadier-General - 15 cm Nblwf 41

- Posts: 1912
- Joined: Thu Sep 13, 2012 7:42 am
Re: Unique Upgrade Question
If you name a unit in the editor "General Knowledge" changing the unit name in the game to "Corporal Clot" doesn't affect what the editor sees.
So make your unique/nopurchase/noupgrade unit. Give it a name in the editor.
Either in a given scenario or in a special Unit upgrade scenario, you set a script that on turn X (or every turn) looks for "General Knowledge" (or whatever name you choose). If that unit is present - you can decide whether in a particular hex, a zone or anywhere on the map. If it is there the script performs a unit action to convert it to another unit type. General Knowledge is then converted from a BF110G to a Lockheed Starfighter (or something more appropriate but less cool).
I've done this in experimental upgrade scenarios with named units but not with unique units, so it should work.
So make your unique/nopurchase/noupgrade unit. Give it a name in the editor.
Either in a given scenario or in a special Unit upgrade scenario, you set a script that on turn X (or every turn) looks for "General Knowledge" (or whatever name you choose). If that unit is present - you can decide whether in a particular hex, a zone or anywhere on the map. If it is there the script performs a unit action to convert it to another unit type. General Knowledge is then converted from a BF110G to a Lockheed Starfighter (or something more appropriate but less cool).
I've done this in experimental upgrade scenarios with named units but not with unique units, so it should work.
Re: Unique Upgrade Question
Thanks Captainjack, I am going to try this out.
Greetings PHCAS
Greetings PHCAS
Re: Unique Upgrade Question
I try
"edit trigger" Add map conditions
"actions" Add unit action
Is that correct? It does nothing
"edit trigger" Add map conditions
"actions" Add unit action
Is that correct? It does nothing
Re: Unique Upgrade Question
Oké. I let a recon unit named "test" drive in to a zone. Now the unit changes automaticly to a infantry unit with the name "test". How to let it change in a nonpurchace unit of my choice?
This is very important to me becausse it will make a big difference in my mods. Please help
This is very important to me becausse it will make a big difference in my mods. Please help
Re: Unique Upgrade Question
Na oké,
So as I wrote with a script you can change any unit in the game to any other be it unique or not. You just have to add the unit action triggered under the necessary circumstances:
and then specify which unit(s) you want to change and to what:
where obviously XY is the custom name of the unit(s) (not to be confused with the unit type name) which will be changed if in zone 4 at the end of turn 43 and if it is a British infanty and then its type will be changed to British Inf 43 as specified by unit ID number 530 as seen in the equipment.pzdat file:
529 Bridge Engineer 0 110 6 0 2 2 0 1 2 1 -1 1 8 18 2 0 1 British_Bridge_Eng.png 1.1.1939 1.1.1946 11 Bridge Engineers beng close
530 British Inf 43 0 171 7 0 3 2 0 3 5 3 0 1 8 16 3 0 1 British_Inf_43.png 1.1.1943 1.1.1946 3 43 British Infantry close
531 British HW 43 0 197 6 0 2 2 0 4 6 5 -1 1 8 18 3 0 1 British_HW_43.png 1.1.1943 1.1.1946 3 43 British HW Infantry close
Note: in this example I used the script to make sure the AI will upgrade some of its still existing infantry in zone 4 to the '43 model, when it becomes available (which happens to be in turn 43 in the Battlefield: Europe mod - I only added the name XY for this example, if left empty the script applies to all British Inf units in zone 4).
Again, with this method theoretically you can change any unit in the game to any other, but I would suggest to avoid cross-class upgrades, unless that is what you really want. For example if you change an infantry unit to an air unit when there is another air unit above it could end up in a game crash, and so on. However, there should not be a problem for example with upgrading an obsolete Pz.II tank to a Marder II anti-tank or a Pz.38 tank to a Marder III or Hetzer anti-tank or to a Grille SP artillery at some point as long as they have a custom name given in the editor. In this way historically accurate cross-class upgrades can be made, which is not possible in the game otherwise.
So as I wrote with a script you can change any unit in the game to any other be it unique or not. You just have to add the unit action triggered under the necessary circumstances:
and then specify which unit(s) you want to change and to what:
where obviously XY is the custom name of the unit(s) (not to be confused with the unit type name) which will be changed if in zone 4 at the end of turn 43 and if it is a British infanty and then its type will be changed to British Inf 43 as specified by unit ID number 530 as seen in the equipment.pzdat file:
529 Bridge Engineer 0 110 6 0 2 2 0 1 2 1 -1 1 8 18 2 0 1 British_Bridge_Eng.png 1.1.1939 1.1.1946 11 Bridge Engineers beng close
530 British Inf 43 0 171 7 0 3 2 0 3 5 3 0 1 8 16 3 0 1 British_Inf_43.png 1.1.1943 1.1.1946 3 43 British Infantry close
531 British HW 43 0 197 6 0 2 2 0 4 6 5 -1 1 8 18 3 0 1 British_HW_43.png 1.1.1943 1.1.1946 3 43 British HW Infantry close
Note: in this example I used the script to make sure the AI will upgrade some of its still existing infantry in zone 4 to the '43 model, when it becomes available (which happens to be in turn 43 in the Battlefield: Europe mod - I only added the name XY for this example, if left empty the script applies to all British Inf units in zone 4).
Again, with this method theoretically you can change any unit in the game to any other, but I would suggest to avoid cross-class upgrades, unless that is what you really want. For example if you change an infantry unit to an air unit when there is another air unit above it could end up in a game crash, and so on. However, there should not be a problem for example with upgrading an obsolete Pz.II tank to a Marder II anti-tank or a Pz.38 tank to a Marder III or Hetzer anti-tank or to a Grille SP artillery at some point as long as they have a custom name given in the editor. In this way historically accurate cross-class upgrades can be made, which is not possible in the game otherwise.


slitherine.com/forum/viewtopic.php?f=147&t=47985
slitherine.com/forum/viewtopic.php?f=147&t=36969
Re: Unique Upgrade Question
GREAT! I didn't understand you can make a choice of the "Value" as a number in the equipment file. This fix all the upgrade problems in the PHCAS1 mod. Now I can make unique unit graphics, Let SSLAH start as a Infantry unit, make it a Panzer Grenadier unit if the time is there and finaly make it a Panzer Division. The AI will not mess up the whole thing becausse it are nopurchase units. Al I have to do in the campaign scenario's is to give the first core unit to the player and upgrade the units in the scenario's coming in the historical timeline. Thank you so much McGuba!!
Greetings PHCAS
Greetings PHCAS
Re: Unique Upgrade Question
Ah, ok, cool!
Just be aware that if the infantry has an organic transport and then gets upgraded to a tank it will carry over its truck which might be strange. Unless you do not allow it to have truck transport or somehow figure out how to remove it. There is a parameter called Transport Type, but you can only have it "set" or "add" - there is no such thing as "remove".
You can experiment by adding a non-existent or negative value and see what happens, but it may or may not work.
Just be aware that if the infantry has an organic transport and then gets upgraded to a tank it will carry over its truck which might be strange. Unless you do not allow it to have truck transport or somehow figure out how to remove it. There is a parameter called Transport Type, but you can only have it "set" or "add" - there is no such thing as "remove".


slitherine.com/forum/viewtopic.php?f=147&t=47985
slitherine.com/forum/viewtopic.php?f=147&t=36969
Re: Unique Upgrade Question
Yes it is a problem. In the mods I added a lot of transports. Most units start with horse traction and can upgrade the transport than. It is not possible now. Example: leFH18 with SdKfz-11. Has to be upgraded to sFH18 with SdKfz-7.McGuba wrote:Ah, ok, cool!![]()
Just be aware that if the infantry has an organic transport and then gets upgraded to a tank it will carry over its truck which might be strange. Unless you do not allow it to have truck transport or somehow figure out how to remove it. There is a parameter called Transport Type, but you can only have it "set" or "add" - there is no such thing as "remove".You can experiment by adding a non-existent or negative value and see what happens, but it may or may not work.
By for example SSLAH the Schützen drive in Opel Blitz. When replaced by Panzergrenadier they need SdKfz-251.
didn´t we almost have it all.....................
Re: Unique Upgrade Question
Well in that case you can try changing its transport by adding the unit ID number of the SdKfz.251 to the Transport Type parameter as set: value
altough I have never tried it, it should do the trick. And when it comes to the tank version you might want to change it to one of your recovery vehicles as transport. However, I am not sure which transport it will change as there are other transports as well in the game - rail, sea, air, etc. Anyway, it has to be tested and then you will see what happens.
altough I have never tried it, it should do the trick. And when it comes to the tank version you might want to change it to one of your recovery vehicles as transport. However, I am not sure which transport it will change as there are other transports as well in the game - rail, sea, air, etc. Anyway, it has to be tested and then you will see what happens.


slitherine.com/forum/viewtopic.php?f=147&t=47985
slitherine.com/forum/viewtopic.php?f=147&t=36969
Re: Unique Upgrade Question
McGuba I made it!
*A second unit action can change the transport type like you said. So that problem is fixed.
*I find out that if you use number 99999 for the transport it will be removed.
So if you do remove the transport in the first unitaction (99999)
Than you can change the unit into a tank (without transport) in the second unitaction
Hurray, hurray, hurray thanks again McGuba!
Greetings PHCAS
*A second unit action can change the transport type like you said. So that problem is fixed.
*I find out that if you use number 99999 for the transport it will be removed.
So if you do remove the transport in the first unitaction (99999)
Than you can change the unit into a tank (without transport) in the second unitaction
Hurray, hurray, hurray thanks again McGuba!
Greetings PHCAS
-
captainjack
- Brigadier-General - 15 cm Nblwf 41

- Posts: 1912
- Joined: Thu Sep 13, 2012 7:42 am
Re: Unique Upgrade Question
Thanks for the transport upgrade advice. I had been able to upgrade my 42 French Infantry but not their transports, and had been wondering how to upgrade a towed 25mm into a portee-mounted one. This should now solve the problem.
And for those wondering, if the initial Blitzkrieg had stalled 1942 is roughly when the Mas assault rifles, upgraded mortars and infantry HEAT weapons (I'm following the Blunted Sickle idea of a PIAT style launcher, rather than modified VB grenade) would have been available in quantity. I then assume that the 25mm AT (on their Laffly 20 portees) then get dispersed among the mechanised infantry to provide some longer-ranged [HA] while travelling and the wider availability of AA guns means that 25mm portee-mounted AA guns are available for some [AA}.
And for those wondering, if the initial Blitzkrieg had stalled 1942 is roughly when the Mas assault rifles, upgraded mortars and infantry HEAT weapons (I'm following the Blunted Sickle idea of a PIAT style launcher, rather than modified VB grenade) would have been available in quantity. I then assume that the 25mm AT (on their Laffly 20 portees) then get dispersed among the mechanised infantry to provide some longer-ranged [HA] while travelling and the wider availability of AA guns means that 25mm portee-mounted AA guns are available for some [AA}.
Re: Unique Upgrade Question
Still a hint
If you make the starting core units purchase zone in a campaign scenario zone 32, all updates you want can be done automatic by starting the scenario if you make zone 32 the trigger.
If you make the starting core units purchase zone in a campaign scenario zone 32, all updates you want can be done automatic by starting the scenario if you make zone 32 the trigger.
Re: Unique Upgrade Question
Awesome! 


slitherine.com/forum/viewtopic.php?f=147&t=47985
slitherine.com/forum/viewtopic.php?f=147&t=36969
Re: Unique Upgrade Question
Two other questions
1. If you want to make a unit "must survive" or the game will be lost, does someone know how to do that?
2. does anyone knows were to find a good manuel about the editor were you can find out this kind of scripts?
Greetings PHCAS
1. If you want to make a unit "must survive" or the game will be lost, does someone know how to do that?
2. does anyone knows were to find a good manuel about the editor were you can find out this kind of scripts?
Greetings PHCAS
Re: Unique Upgrade Question
Edit -> Scenario Params -> Victory Conditions -> Edit -> Add map conditionphcas wrote:Two other questions
1. If you want to make a unit "must survive" or the game will be lost, does someone know how to do that?
and then specify your special unit, which in this case is a German tank commanded by phcas:
should work but I have never tested...
I think there is no comprenehnsive manual for the editor. Basically most of its features are self-explanatory, anyway. After that scripting is like cooking or chemistry: you can combine the existing scripts to get the desired events, but there is no recipe given for each and every meal.2. does anyone knows were to find a good manuel about the editor were you can find out this kind of scripts?
Many things can be made with a little creativity and sometimes I tend to think about how to script things in PzC when I am traveling or working.


slitherine.com/forum/viewtopic.php?f=147&t=47985
slitherine.com/forum/viewtopic.php?f=147&t=36969
-
captainjack
- Brigadier-General - 15 cm Nblwf 41

- Posts: 1912
- Joined: Thu Sep 13, 2012 7:42 am
Re: Unique Upgrade Question
I've done this and it works fine.McGuba wrote:should work but I have never tested...
