Why some changes in Gamerules.pzdat won't take effect?

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

Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design

Post Reply
fenglicao
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 74
Joined: Mon Oct 10, 2011 2:24 pm

Why some changes in Gamerules.pzdat won't take effect?

Post by fenglicao »

Hi, when I tried to change these 5 parameters in Gamerules.pzdat: GreenReplacementsExp, ScnReplaceCost, ScnEReplaceCost, CamReplaceCost, CamEReplaceCost, and start a new game, somehow they won't take effect and the game still uses the default rule. While all the other parameters I changed were all applied in the new game.

So are these 5 parameters hard-coded in the game and can't be changed, or did I do something wrong? Please help.
Razz1
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 3308
Joined: Tue Jan 18, 2011 4:49 am
Location: USA

Post by Razz1 »

They are supposed to work on new games. not existing games.
fenglicao
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 74
Joined: Mon Oct 10, 2011 2:24 pm

Post by fenglicao »

Yes, of course it's on new games, not existing ones. You see the other parameters got changed in the new games, except these 5.
Razz1
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 3308
Joined: Tue Jan 18, 2011 4:49 am
Location: USA

Post by Razz1 »

Are you trying to change a DLC or main campaign?
fenglicao
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 74
Joined: Mon Oct 10, 2011 2:24 pm

Post by fenglicao »

Main campaign.

I tried DLC too, it had the same result.
Razz1
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 3308
Joined: Tue Jan 18, 2011 4:49 am
Location: USA

Post by Razz1 »

DLC has different rules.

If you are having this problem with main game the 1.05 has major bugs as the editor is not working correctly.
fenglicao
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 74
Joined: Mon Oct 10, 2011 2:24 pm

Post by fenglicao »

I tried to reinstall V1.00 and it also behaved the same, that is, just these 5 parameters won't change. However, I thought I once made changes with some of those in one of the earlier versions, though I am not sure.
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Post by El_Condoro »

Just confirming I can get 4 of the 5 to work:
ScnReplaceCost: sets the replacement cost for green replacements on the battlefield (scenario or campaign). e.g. set to 50 (%) of an M26 (prestige cost 910), 5 points would cost 91 per point x 0.5 x 5 = 227
ScnEReplaceCost: sets the replacement cost of elite replacements on the battlefield (scenario or campaign) e.g. set to 75 (%) of a Marder III (cost 282), 6 points would cost 28.2 x 0.75 x 6 = 127
CamReplaceCost: as per above but only available on the deployment screen (not on the battlefield)
CamEReplaceCost: as above but for elite units on the deployment screen.
The one I could not get to change no matter what is GreenReplacementsExp - it defaults to 30% of XP in any case, even if I delete the value in the field (using Excel).

My testing was done on a custom campaign that is set up the same as the DLCs, ie. under the Mods folder of My Games\Panzer Corps. It reads the gamerules.pzdat that I have in there (I know because the one in the main Data folder has different values).
fenglicao
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 74
Joined: Mon Oct 10, 2011 2:24 pm

Post by fenglicao »

Many thanks to El_Condoro, I went back and took a further look and found the problem. In the original gamerules.pzdat file, the 4 values of ScnReplaceCost, ScnEReplaceCost, CamReplaceCost, CamEReplaceCost were separated only by a space, not a tab. When I inserted a tab, then these values would take effect when changed.

Earlier I was only using notepad to edit the file and thus couldn't tell.

Also same as EL, GreenReplacementsExp defaults to 30% and couldn't be changed.
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Post by El_Condoro »

That was a critical bit of info I left out! I, too, had put that tab in (shifted them into separate cells in Excel). Now, where is that 30% coming from...
fenglicao
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 74
Joined: Mon Oct 10, 2011 2:24 pm

Post by fenglicao »

Interestingly, now the changes will affect existing campaign games. The current scenario will use old rules, but once you proceed to the next scenario, it will start using the new rul.es.

Is this right?
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Post by El_Condoro »

I guess the game reads everything at the beginning of each scenario rather than the beginning of the campaign. I'm glad it does - from a designer's point of view it means scenarios can be edited and played from the end of the preceding one, rather than playing the whole campaign through (or using endscn) each test.
Razz1
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 3308
Joined: Tue Jan 18, 2011 4:49 am
Location: USA

Post by Razz1 »

Thank you for your post on the solution to the mistake.

This is how we all learn.

It's great to see scientist share their work.
Rudankort
FlashBack Games
FlashBack Games
Posts: 3836
Joined: Sat Aug 21, 2010 2:23 pm
Contact:

Post by Rudankort »

Great catch guys.
- In the stock file spaces are used instead of tabs.
- GreenReplacementsExp value is read from the file using wrong name - GreenReplacementsEx (no "p" at the end!).

Next patch will have both points fixed, and in the meantime there is a workaround you can use. For GreenReplacementsExp value just include both GreenReplacementsEx and GreenReplacementsExp values in the file to make sure the modded file works with both current and future version of the game.
fenglicao
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 74
Joined: Mon Oct 10, 2011 2:24 pm

Post by fenglicao »

Thanks for a complete solution to this matter.

Also many thanks for the "chess" mode, the RNG change in 1.05, and the 'ultimate difficulty' level :)

While we are at it, can this little bug be fixed: after a Recon moved but didn't attack, if it moved again but then backspaced, the Recon will be allowed to still do a full replacement or resupply. In MP someone can move a demaged Recon away from danger and do full replacement in the same turn (reported this sometime ago).

And top of my wishlist, is the ability to buy 1 star, 2 star, 3 star replacements, each with definable prices (think this has been asked around in the forum), preferrably also with the GreenReplacementExp-like feature, that they carry additional 30% of the Exp difference between your unit and the replacements, assuming your unit's Exp has an impact on the imcoming replacements. Any chance this can be considered in future versions? Sorry I got carried away too much. :wink:
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Post by El_Condoro »

Thanks for the fixes, Rudankort. I also really like "chess" mode but I think "ultimate" would be my undoing!
While we are at it, can this little bug be fixed: after a Recon moved but didn't attack, if it moved again but then backspaced, the Recon will be allowed to still do a full replacement or resupply. In MP someone can move a demaged Recon away from danger and do full replacement in the same turn (reported this sometime ago).
Interesting that you found a bug to do this - in PG2 it was done by design. If a recon moved but had enough movement remaining it could resupply fully. Personally, I really like that - it makes recon more useful, considering they are often cannon fodder, as discussed elsewhere on the forum.
And top of my wishlist, is the ability to buy 1 star, 2 star, 3 star replacements, each with definable prices
It has also been requested that designers be able to set new purchases in campaigns to have the desired experience, rather than starting at zero.
Rudankort
FlashBack Games
FlashBack Games
Posts: 3836
Joined: Sat Aug 21, 2010 2:23 pm
Contact:

Post by Rudankort »

fenglicao wrote: While we are at it, can this little bug be fixed: after a Recon moved but didn't attack, if it moved again but then backspaced, the Recon will be allowed to still do a full replacement or resupply. In MP someone can move a demaged Recon away from danger and do full replacement in the same turn (reported this sometime ago).
I'll see if I can fix this in the next update.
fenglicao wrote: And top of my wishlist, is the ability to buy 1 star, 2 star, 3 star replacements, each with definable prices (think this has been asked around in the forum), preferrably also with the GreenReplacementExp-like feature, that they carry additional 30% of the Exp difference between your unit and the replacements, assuming your unit's Exp has an impact on the imcoming replacements. Any chance this can be considered in future versions? Sorry I got carried away too much. :wink:
Do we REALLY need to make experience management this complicated? I think, it is quite complicated already, with two types of replacements and four different prices for them, depending on exact campaign stage. I can understand people giving mixed green and elite replacements to their units to optimize resulting experience (number of full stars) and prestige spent, but configuring the price of each star separately? I dunno. You can create a separate thread for this in the main forum, and see what people say and if the concept can be refine enough.
Rudankort
FlashBack Games
FlashBack Games
Posts: 3836
Joined: Sat Aug 21, 2010 2:23 pm
Contact:

Post by Rudankort »

El_Condoro wrote:und a bug to do this - in PG2 it was done by design. If a recon moved but had enough movement remaining it could resupply fully. Personally, I really like that - it makes recon more useful, considering they are often cannon fodder, as discussed elsewhere on the forum.
Good point, and funny PG2 worked the same. Recon movement is a hack in game rules, and I'm pretty sure they did it the same way as I. Hence the same behavior. :)

Hmm, I need to give this some thought.
fenglicao
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 74
Joined: Mon Oct 10, 2011 2:24 pm

Post by fenglicao »

I guess it may be good to allow Recon to move and resupply in the same turn (so just need to make it available without the 'move again and backspace' trick?), but will this throw some game balance off? Right now Recons are much cheaper than a low end Tank with comparable stats, yet with better spotting and movement. In MP games I often buy them a lot to mess up the opponent. So they are already very effective. In campaign games people just need to protect them better.

Ok maybe I'll open a thread in the main forum about buying Units/Replacements with specific Exp.

Rudankort, I'm already very, very thankful for all the things you and others have done. So can I buy you a Christmas gift? Ok I'll include El_Condoro on the list too. :)
Post Reply

Return to “Panzer Corps : Scenario Design”