Custom Terrain Types?
Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design
Custom Terrain Types?
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?
Where else do I need to dot the i's to get my custom terrain in?
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
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.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
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. =/
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
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).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
Re: Custom Terrain Types?
Did you try to add new hex picture in graphics/editor/terrain.png ?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?
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 ?
Re: Custom Terrain Types?
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.
As for a word from the devs, sadly Rudankort got his forum-posting privileges cancelled some months ago.
_____
rezaf
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.

As for a word from the devs, sadly Rudankort got his forum-posting privileges cancelled some months ago.

_____
rezaf
Re: Custom Terrain Types?
What does this mean?rezaf wrote:As for a word from the devs, sadly Rudankort got his forum-posting privileges cancelled some months ago.
Searching Rudankort's posts, you'll find his most recent post was made five days ago:
viewtopic.php?p=258903#258903
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
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
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).
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).
-
- Site Admin
- Posts: 13558
- Joined: Fri Apr 01, 2005 10:19 am