Custom Terrain Types?

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

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

Post Reply
Fimconte
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 204
Joined: Fri Aug 12, 2011 11:12 am

Custom Terrain Types?

Post by Fimconte »

Maybe I'm missing something very obvious here, but after adding a new Terrain type into terrain.pzdat and corresponding movement values into movement.pzdat, I still can't get the terrain to show up in the Editor.
Where else do I need to dot the i's to get my custom terrain in?
rezaf
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1487
Joined: Mon Aug 15, 2011 3:27 pm

Post by rezaf »

Since the editor is a messy piece of hardcoded assumptions with no relations to the actual gamefiles, I highly doubt it's capable of recognizing new terrain types, sorry to tell.

It MIGHT work just adding a new tile for your terrain type to the png which holds the "hand drawn" terrain types that are shown when you place terrain in the editor, but I haven't tried - it works that way with flags, though.
_____
rezaf
HBalck
1st Lieutenant - Grenadier
1st Lieutenant - Grenadier
Posts: 786
Joined: Thu May 21, 2009 9:28 pm
Location: Augsburg / Bavaria / Germany...but I am from Eastern Germany !

Post by HBalck »

That's all hard coded !!! We can mod only the units and the png layers all main parameters the developers will save for later versions I think.

H.Balck
Fimconte
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 204
Joined: Fri Aug 12, 2011 11:12 am

Post by Fimconte »

rezaf wrote:Since the editor is a messy piece of hardcoded assumptions with no relations to the actual gamefiles, I highly doubt it's capable of recognizing new terrain types, sorry to tell.

It MIGHT work just adding a new tile for your terrain type to the png which holds the "hand drawn" terrain types that are shown when you place terrain in the editor, but I haven't tried - it works that way with flags, though.
_____
rezaf
I added the new tile to the .png, now the tile shows up in the editor but has no corresponding string attached to it.
Curiously enough while in a new blank scenario, placing the new tile results in a blank string (the image is placed), while on a existing map (Moscow 41 in this case) it assumes a existing one. In Moscow 41, placing the new tile shows up as Olenino, In France - as Amiens.
Both being the 18th String. Populating the list with other strings and the setting the 18th same as the one in the terrain.pzdat doesn't work either.

So it's probably hardcoded indeed. =/
rezaf
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1487
Joined: Mon Aug 15, 2011 3:27 pm

Post by rezaf »

Yeah, the string attached to your new terrain type is stored in the strings file, but the actual connection between terrain id and string is hardwired in both the scenario editor and game exe files - you can easily find the references using a Hex editor.

At least the text descriptions for a lot of things are actually stored in HTML or XML files/snippets, so they would be easy to modify, if only the developers hadn't then compiled those files INTO the exes and hardwired everything so nobody can make changes. It's very disappointing, really, and I hope this sees some developer love in the not-too-distant future.

Fimconte, have you verified if the actual terrain works?
If it's just the descriptions that are wrong, you can just replace all with custom strings. Yes, it's a bit laborous, but doable. I did exactly that for all Desert/Rough Desert tiles in my PG Classic mod.
_____
rezaf
HBalck
1st Lieutenant - Grenadier
1st Lieutenant - Grenadier
Posts: 786
Joined: Thu May 21, 2009 9:28 pm
Location: Augsburg / Bavaria / Germany...but I am from Eastern Germany !

Post by HBalck »

Thats all right , but you can't give the new tiles new parameters for movement and diggin in - thats hartd coded I have tested in July 2011 and it doesnt run also with the new patches !

H.Balck
Fimconte
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 204
Joined: Fri Aug 12, 2011 11:12 am

Post by Fimconte »

rezaf wrote:Yeah, the string attached to your new terrain type is stored in the strings file, but the actual connection between terrain id and string is hardwired in both the scenario editor and game exe files - you can easily find the references using a Hex editor.

At least the text descriptions for a lot of things are actually stored in HTML or XML files/snippets, so they would be easy to modify, if only the developers hadn't then compiled those files INTO the exes and hardwired everything so nobody can make changes. It's very disappointing, really, and I hope this sees some developer love in the not-too-distant future.

Fimconte, have you verified if the actual terrain works?
If it's just the descriptions that are wrong, you can just replace all with custom strings. Yes, it's a bit laborous, but doable. I did exactly that for all Desert/Rough Desert tiles in my PG Classic mod.
_____
rezaf
No the terrain doesn't do what it's supposed to (allow air embark).
wino
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 52
Joined: Fri Jan 14, 2011 2:41 pm

Re: Custom Terrain Types?

Post by wino »

Fimconte wrote:Maybe I'm missing something very obvious here, but after adding a new Terrain type into terrain.pzdat and corresponding movement values into movement.pzdat, I still can't get the terrain to show up in the Editor.
Where else do I need to dot the i's to get my custom terrain in?
Did you try to add new hex picture in graphics/editor/terrain.png ?
Maybe it is needed ?

All the names are coded into pzscn files individually but they are then translated via pzloc and strings.pzdat files.

When you look into ScenarioEditor.exe it got reference to pzdat files, so I do not think that anything is hardcoded. Maybe editor Author can say anything about this ?
rezaf
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1487
Joined: Mon Aug 15, 2011 3:27 pm

Re: Custom Terrain Types?

Post by rezaf »

Wino, did you even read what we discussed just above?

If you're already looking into the scenario editor exe, scan it for references to the terrain ID strings. Something TRN_FOREST (for example), stored in unicode.
As you'll discover, the terrain types ARE hardcoded in the editor, same goes for the game.

Sadly.

Just as you wrote, there's plenty of indication that they actually intended for this stuff to be moddable, but in the end they didn't.

Seems like the developer coding this portion of the game got a 0:8 prediction for pulling it off but then the RNG handed him a 2:3 result. :P

As for a word from the devs, sadly Rudankort got his forum-posting privileges cancelled some months ago. :(
_____
rezaf
Molve
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 538
Joined: Wed Jul 27, 2011 10:06 am

Re: Custom Terrain Types?

Post by Molve »

rezaf wrote:As for a word from the devs, sadly Rudankort got his forum-posting privileges cancelled some months ago. :(
What does this mean?

Searching Rudankort's posts, you'll find his most recent post was made five days ago:
viewtopic.php?p=258903#258903
rezaf
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1487
Joined: Mon Aug 15, 2011 3:27 pm

Post by rezaf »

Just semi-kidding around Molve.

Rudankort used to be pretty active on all PzC forums, even outside of Slitherine/Matrix. These days ... you might notice all even remotely recent posts of Rudankort are in the Beta forum...

I DO hope it's a good sign and he's busy patching up whatever they see fit to include in the patch(es) and otherwise hard at work on the first content expansion.
_____
rezaf
wino
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 52
Joined: Fri Jan 14, 2011 2:41 pm

Post by wino »

I am not sure what are you trying to achieve here. Each scenario got defined independent defined strings. The terrain types strings are just first N strings. When N is bigger then X (number of terrain types on scenario creation time) we got problem, right ?
So we can just re-numerate all non terrain types strings and all be fine again.
Or do it yourself by renamming first N-X and add their copy on the end of the string list, then change ID of those relocated strings on map.
BTW. Do you want me to write scenario file names re-numerating tool ? This should be quite easy (?)

Example of tool usage:
movenamestool scenario_name.pzscn 17 3

This will move all names having number 17 or bigger by 3 (17+3=20, 18+3=21, etc) and place 3 empty strings on positions 17,18,19 so new terrain types can have unique name (non existing in scenario name ID).
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

The only reason Alex has not posted to the forums is he is working hard and exhausted! He needs a holiday but is not scheduled to take it till October.

He posts when he can so not sure how this odd rumour got started!
Post Reply

Return to “Panzer Corps : Scenario Design”