Looking at the files I`m guessing a new line needs to be entered in terrain.pzdat and that needs a corresponding line in strings.pzdat. The image for the editor needs to go in terrain.png from Graphics/Editor and then each movement type from movement.pzdat should get a new entry for the new terrain. That said, how will the engine know what tile background and overlays to place on the designated hex in the editor when it generates the terrain? I feel I`m missing something.
Adding new terrain types?
Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design
Adding new terrain types?
Is there a guide available? I couldn`t find it.
Looking at the files I`m guessing a new line needs to be entered in terrain.pzdat and that needs a corresponding line in strings.pzdat. The image for the editor needs to go in terrain.png from Graphics/Editor and then each movement type from movement.pzdat should get a new entry for the new terrain. That said, how will the engine know what tile background and overlays to place on the designated hex in the editor when it generates the terrain? I feel I`m missing something.
Looking at the files I`m guessing a new line needs to be entered in terrain.pzdat and that needs a corresponding line in strings.pzdat. The image for the editor needs to go in terrain.png from Graphics/Editor and then each movement type from movement.pzdat should get a new entry for the new terrain. That said, how will the engine know what tile background and overlays to place on the designated hex in the editor when it generates the terrain? I feel I`m missing something.
-
BiteNibbleChomp
- Lieutenant-General - Do 217E

- Posts: 3231
- Joined: Mon Jul 01, 2013 6:35 am
Re: Adding new terrain types?
Download bebro's Jap campaign and snoop around the files. You'll get a good idea pretty quickly!
- BNC
- BNC
Ryan O'Shea - Developer - Strategic Command American Civil War
Re: Adding new terrain types?
That statement would imply that you`ve done so already. Hence you could tell me the summary and be even quicker.You'll get a good idea pretty quickly!
As far as I can see, bebro did not add new terrain types in his IJA campaign.
-
BiteNibbleChomp
- Lieutenant-General - Do 217E

- Posts: 3231
- Joined: Mon Jul 01, 2013 6:35 am
Re: Adding new terrain types?
I haven't added new terrains properly - I've just messed around with them a bit (ie. new movement settings). The above is just how I tend to work things out - taking apart other people's work and see how they've done it!Mark50 wrote:That statement would imply that you`ve done so already. Hence you could tell me the summary and be even quicker.You'll get a good idea pretty quickly!![]()
As far as I can see, bebro did not add new terrain types in his IJA campaign.
Bebro added heaps of new stuff like dense jungles (IIRC regular jungles didn't exist in the version IJA was originally designed for).
Your first post sounds like a good start - though you will want to consider the minimap (It would be strange to add a volcano hex that looks like an ocean!)
- BNC
Ryan O'Shea - Developer - Strategic Command American Civil War
Re: Adding new terrain types?
Based on his LayerTerrain.png I`m guessing he simply replaced the overlay graphics for the forest and thick forest. Which would be in line with the rest of the things he implemented in IJA (the new factions replace existing factions; the new amphibious movement replaces the alpine movement).Bebro added heaps of new stuff like dense jungles (IIRC regular jungles didn't exist in the version IJA was originally designed for).
Now that you`ve mentioned it...though you will want to consider the minimap
EDIT: does anyone know what this comment (from terrain.pzdat) mean?
# Terrain features are directional (i. e. there is a 6-bit direction mask associated with each in map files)
-
BiteNibbleChomp
- Lieutenant-General - Do 217E

- Posts: 3231
- Joined: Mon Jul 01, 2013 6:35 am
Re: Adding new terrain types?
In Graphics/MiniMap, there is a file called terrain.png. I imagine you would just add an iron-cross-shaped blob of your colour of choice at the end, but you may have to replace something. I don't think anyone has tried before.
- BNC
That relates to roads and railroads. I don't think it will apply in what you are doing.Mark50 wrote: EDIT: does anyone know what this comment (from terrain.pzdat) mean?# Terrain features are directional (i. e. there is a 6-bit direction mask associated with each in map files)
- BNC
Ryan O'Shea - Developer - Strategic Command American Civil War
Re: Adding new terrain types?
Thank you! I hadn`t noticed that.BiteNibbleChomp wrote:In Graphics/MiniMap, there is a file called terrain.png.
Re: Adding new terrain types?
I`m starting to think the terrain types are hardcoded. I`ve made a test.
- in movement.pzdat I`ve added a new effect for the new terrain at the end of each movement type set of entries.
- in strings.pzdat I`ve added an entry for the new terrain at the end of the file.
- in Graphics/MiniMap I`ve edited the terrain.png to add a new colour "plus" at the end of the file for the new terrain.
- I`ve even edited the three LayerTerrain files to have a new set of overlays, just in case it will load them for any new terrain entered.
- in Graphics/Editor I`ve edited the terrain.png file to have a new hex for the new terrain.
- most importantly, in terrain.pzdat I`ve added a new entry for the terrain.
Everything showed up fine in the Editor apart from the string of the new terrain hexes which said Major River. Apparently that was because I had inserted the new terrain line before the # Terrain features tag that continued to list the terrain features. Ok, I`ve edited the file again and placed the new terrain line after the entry Road which meant it was literally at the end of the file. The effect was that there was no string associated with it in the editor and the validate terrain option was finding this problem for the new terrain hexes. The generate terrain option was making the new hexes look like clear terrain with no other overlays and I`m guessing this is basically the default.
Unless I`ve missed something, my conclusion is that the terrain is defined somewhere internally and you can`t just add new entries in terrain.pzdat.
- in movement.pzdat I`ve added a new effect for the new terrain at the end of each movement type set of entries.
- in strings.pzdat I`ve added an entry for the new terrain at the end of the file.
- in Graphics/MiniMap I`ve edited the terrain.png to add a new colour "plus" at the end of the file for the new terrain.
- I`ve even edited the three LayerTerrain files to have a new set of overlays, just in case it will load them for any new terrain entered.
- in Graphics/Editor I`ve edited the terrain.png file to have a new hex for the new terrain.
- most importantly, in terrain.pzdat I`ve added a new entry for the terrain.
Everything showed up fine in the Editor apart from the string of the new terrain hexes which said Major River. Apparently that was because I had inserted the new terrain line before the # Terrain features tag that continued to list the terrain features. Ok, I`ve edited the file again and placed the new terrain line after the entry Road which meant it was literally at the end of the file. The effect was that there was no string associated with it in the editor and the validate terrain option was finding this problem for the new terrain hexes. The generate terrain option was making the new hexes look like clear terrain with no other overlays and I`m guessing this is basically the default.
Unless I`ve missed something, my conclusion is that the terrain is defined somewhere internally and you can`t just add new entries in terrain.pzdat.
Re: Adding new terrain types?
Hi Mark50, after some experimenting the past few days, I can't get it to work either, unfortunately. I'm calling it quits for the time being because my ancient Photoshop has become very unstable after some recent Windows updates, and it took me forever to make some simple graphics that weren't corrupted (the editor failed to load sometimes because of it). If I figure out a way to get PS going again I might give it a try again in the future.
But I was thinking while going through the terrain entries, with Afrika Korps extra terrain types were added (about five I think, all the desert types), maybe comparing the original file structure with the newer one will give some clues on how it is supposed to work?
But I was thinking while going through the terrain entries, with Afrika Korps extra terrain types were added (about five I think, all the desert types), maybe comparing the original file structure with the newer one will give some clues on how it is supposed to work?
Re: Adding new terrain types?
That`s one of the reasons I think it`s hardcoded. The new terrain types (desert, dunes etc.) were not added after all the other entries in terrain.pzdat, but before the major river and river entries. Doing similarly seems to confuse the reading of the strings when modding the file. Hence my conclusion that they are referred to somewhere internally.ThvN wrote: But I was thinking while going through the terrain entries, with Afrika Korps extra terrain types were added (about five I think, all the desert types), maybe comparing the original file structure with the newer one will give some clues on how it is supposed to work?
Thanks for looking into it too!
-
BiteNibbleChomp
- Lieutenant-General - Do 217E

- Posts: 3231
- Joined: Mon Jul 01, 2013 6:35 am
Re: Adding new terrain types?
With all this in mind, nothing is stopping you from replacing one with another. Some terrains are only used in very specific cases and can be replaced for a custom mod - rough desert/dunes and shallow sea would be the first two to go in my mind.
- BNC
- BNC
Ryan O'Shea - Developer - Strategic Command American Civil War
-
Neubaufahrzeug
- Lance Corporal - Panzer IA

- Posts: 19
- Joined: Wed Dec 21, 2011 7:12 pm
- Location: Germany
Re: Adding new terrain types?
As far as I understand it is not possible to create new terrain types like these???
# Name Traits Initiative cap Base entrenchment
IDS_TRN_VILLAGE close, glow 100 1
IDS_TRN_TOWN close, glow 2 2
IDS_TRN_INDUSTRIAL close, glow 1 4
Greetings
Neubaufahrzeug
Sorry - should be a question...
# Name Traits Initiative cap Base entrenchment
IDS_TRN_VILLAGE close, glow 100 1
IDS_TRN_TOWN close, glow 2 2
IDS_TRN_INDUSTRIAL close, glow 1 4
Greetings
Neubaufahrzeug
Sorry - should be a question...
-
Neubaufahrzeug
- Lance Corporal - Panzer IA

- Posts: 19
- Joined: Wed Dec 21, 2011 7:12 pm
- Location: Germany
Re: Adding new terrain types?
Nobody likes to help? 

