Editor's Technical Questions
Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design
-
- Corporal - Strongpoint
- Posts: 66
- Joined: Thu Apr 15, 2021 11:41 am
Editor's Technical Questions
As i can't find the answers i'm looking for, and in order to separate them from my other topic (on the French Grand Campaign), i'm starting a new topic here. If it's not the right place, just let me know. But i think it's better to have a specific topic for technical questions.
So, i have few questions about the editor:
1- For now, i can't link my scenarios in a campaign. I've readen many things on this subject, but i don't know what i miss to make it work. If you have a complete list of what is needed, would be nice to share.
2- I would like to change an hex during a scenario (it's a bridge at the start, and i would like it to be destroyed during the battle). I've tried some things, but nothing seems to work as intended.
3- As i'm planning to make some changes in the equip file, how can use the "new" equip file in the editor, without modifying the original one (i mean, keeping the original in the original folder, and the new one in my mod folder) ?
So, i have few questions about the editor:
1- For now, i can't link my scenarios in a campaign. I've readen many things on this subject, but i don't know what i miss to make it work. If you have a complete list of what is needed, would be nice to share.
2- I would like to change an hex during a scenario (it's a bridge at the start, and i would like it to be destroyed during the battle). I've tried some things, but nothing seems to work as intended.
3- As i'm planning to make some changes in the equip file, how can use the "new" equip file in the editor, without modifying the original one (i mean, keeping the original in the original folder, and the new one in my mod folder) ?
https://www.twitch.tv/ainkatsiss
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
Re: Editor's Technical Questions
Hi,
I think I can help you on some of your issues.
Concerning the bridge, as far as I know what actually makes the bridge is the road feature running over the river. I see two different ways to deal with that. The harder one would be to make a script through "scenario parameters" and when the conditions you want for the bridge to be destroyed are met, use a "hex action" to change the road feature (I never did it before... but maybe setting the road value, I guess the fourth box in features' line, to -1 would work ? -1 works for removing a land transport from a unit so...).
The easier one would be to create a unit (with the "beng" trait) belonging to the side that originally controls the bridge and remove the unit when you want the bridge to disappear (via a script : give that unit a specific name like "that location's bridge" when placing it in the editor and use this name as a filter to remove the unit via"unit action"). If you choose this option then you should avoid drawing a road over the river in the editor, leave a road-free hex just where the river runs.
Btw, if you want to allow the enemy to capture the bridge intact then use a script to make the bridge unit switching sides (via unit action and the same name filter trick).
For the campaigns, I think you can either erase an existing one or create a brand new one (I don't exactly know how to do the latter, never tried yet). Let's assume you want to erase German Poland campaign for the base game. All is done in the "campaign.pzdat" file. You'll just need to replace that campaign's scenario & briefings names by yours, respecting the order. Also specify the player's nation index in the header of the file (where there is a 0 in Poland line put a 4 for France by example). The campaign file is pretty self-explanatory, just take the time to read how the base game's campaigns are built and then adapt to yours.
Eventually, what did you exactly mean with the two equip files ? Afaik, you cannot have two different equipment files read at the same time by the game, so you'll need to copy all you want to keep from the original one into your new equipment file or simply adding your new stuff at the end of the original one (watching not to use twice the same id for different units). But maybe that's not the question
...
I hope this helps, I've tried not to dive too deep into details but if you want me to be more specific let me know !
Greetings,
Maths
I think I can help you on some of your issues.
Concerning the bridge, as far as I know what actually makes the bridge is the road feature running over the river. I see two different ways to deal with that. The harder one would be to make a script through "scenario parameters" and when the conditions you want for the bridge to be destroyed are met, use a "hex action" to change the road feature (I never did it before... but maybe setting the road value, I guess the fourth box in features' line, to -1 would work ? -1 works for removing a land transport from a unit so...).
The easier one would be to create a unit (with the "beng" trait) belonging to the side that originally controls the bridge and remove the unit when you want the bridge to disappear (via a script : give that unit a specific name like "that location's bridge" when placing it in the editor and use this name as a filter to remove the unit via"unit action"). If you choose this option then you should avoid drawing a road over the river in the editor, leave a road-free hex just where the river runs.
Btw, if you want to allow the enemy to capture the bridge intact then use a script to make the bridge unit switching sides (via unit action and the same name filter trick).
For the campaigns, I think you can either erase an existing one or create a brand new one (I don't exactly know how to do the latter, never tried yet). Let's assume you want to erase German Poland campaign for the base game. All is done in the "campaign.pzdat" file. You'll just need to replace that campaign's scenario & briefings names by yours, respecting the order. Also specify the player's nation index in the header of the file (where there is a 0 in Poland line put a 4 for France by example). The campaign file is pretty self-explanatory, just take the time to read how the base game's campaigns are built and then adapt to yours.
Eventually, what did you exactly mean with the two equip files ? Afaik, you cannot have two different equipment files read at the same time by the game, so you'll need to copy all you want to keep from the original one into your new equipment file or simply adding your new stuff at the end of the original one (watching not to use twice the same id for different units). But maybe that's not the question

I hope this helps, I've tried not to dive too deep into details but if you want me to be more specific let me know !
Greetings,
Maths
-
- Brigadier-General - 15 cm Nblwf 41
- Posts: 1912
- Joined: Thu Sep 13, 2012 7:42 am
Re: Editor's Technical Questions
Bridges are changed by hex actions, which are quite tricky as they require several things to be altered. There are examples in the first US corps DLC, and in one of the Sealion scenarios. Soviet corps includes an example of destroying rail links.
Personally I would follow Maths' advice and create a bridge unit (structure with BEng trait). Changing nationality is relatively easy, so you can, for example set a mission to defend your bridge for x turns then change it to an enemy unit and make it your mission to destroy it (to simulate placing charges, then demolishing it).
The main limitation of this is that you can't put a unit on the bridge, but you do have the option of creating different types of bridges. Eg big solid bridges with higher Str and D and passive attacks to reflect AA and ground defences, low Str or low D bridges with no or low passive attacks for lightweight wooden structures.
Personally I would follow Maths' advice and create a bridge unit (structure with BEng trait). Changing nationality is relatively easy, so you can, for example set a mission to defend your bridge for x turns then change it to an enemy unit and make it your mission to destroy it (to simulate placing charges, then demolishing it).
The main limitation of this is that you can't put a unit on the bridge, but you do have the option of creating different types of bridges. Eg big solid bridges with higher Str and D and passive attacks to reflect AA and ground defences, low Str or low D bridges with no or low passive attacks for lightweight wooden structures.
-
- Corporal - Strongpoint
- Posts: 66
- Joined: Thu Apr 15, 2021 11:41 am
Re: Editor's Technical Questions
Thanks for your answers !
Destroying a bridge
I was going for the hex action, but i didn't manage to make it work as i would like. Main issue for me now (with the hex action and some others editor's features) is to understand which number mean what. Is there any place where i can find a list (f.e. 00 clear, 01 countryside, ...) because i'm just blind testing things, which really don't help me :-/
The bridge unit solution could have some advantages, but it's not really what i initialy want. I'll work on this if i can't do what i would like the other way.
Creating a Campaign
What i've done so far is copy/paste a campaign file (from GC 39 i think), and try to change everything inside, but for now it doesn't work. I probably miss some minor detail, but i do'n know which ones. This lead me to others problem/questions
Scenario vs Campaign
For now, i can only test my scenarios as standalone scenario, which mean i haven't deployment phase, and i can't test the core progression. How exactly work the difference between scenario played alone and campaign ? I've opened some, and it seems that core unit placed on deployment hexes are the way to "simulate" a core when playing the scenario alone. Am i right ?
The equip files
What i've readen so far is that any equip file placed on Mods folder will be used instead of the original when playing the mod. But i can't see the new units in the editor, because i think it use the original equip file. Ofc i can make a backup, change the original to my custom, but if a "cleaner" solution exist, i'd prefer it. I don't really like to modify original files.
The mines
Do you have the name of the US scenario with mines ? It will help me to saerch for it faster ^^
Destroying a bridge
I was going for the hex action, but i didn't manage to make it work as i would like. Main issue for me now (with the hex action and some others editor's features) is to understand which number mean what. Is there any place where i can find a list (f.e. 00 clear, 01 countryside, ...) because i'm just blind testing things, which really don't help me :-/
The bridge unit solution could have some advantages, but it's not really what i initialy want. I'll work on this if i can't do what i would like the other way.
Creating a Campaign
What i've done so far is copy/paste a campaign file (from GC 39 i think), and try to change everything inside, but for now it doesn't work. I probably miss some minor detail, but i do'n know which ones. This lead me to others problem/questions
Scenario vs Campaign
For now, i can only test my scenarios as standalone scenario, which mean i haven't deployment phase, and i can't test the core progression. How exactly work the difference between scenario played alone and campaign ? I've opened some, and it seems that core unit placed on deployment hexes are the way to "simulate" a core when playing the scenario alone. Am i right ?
The equip files
What i've readen so far is that any equip file placed on Mods folder will be used instead of the original when playing the mod. But i can't see the new units in the editor, because i think it use the original equip file. Ofc i can make a backup, change the original to my custom, but if a "cleaner" solution exist, i'd prefer it. I don't really like to modify original files.
The mines
Do you have the name of the US scenario with mines ? It will help me to saerch for it faster ^^
https://www.twitch.tv/ainkatsiss
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
-
- Brigadier-General - 15 cm Nblwf 41
- Posts: 1912
- Joined: Thu Sep 13, 2012 7:42 am
Re: Editor's Technical Questions
There was a hex action guide posted a while back, I'll have a look tomorrow - at least I know what I'm looking for.
I'd recommend a look in the stickies/faq and early scenario design posts as there is some good basic info from when everybody was new to modding. It might take a while as thee is some interestong stuff there.
I'd recommend a look in the stickies/faq and early scenario design posts as there is some good basic info from when everybody was new to modding. It might take a while as thee is some interestong stuff there.
Re: Editor's Technical Questions
Hello,
Glad this helped a little !
What I do when I use hex action to change something to another is :
I think the best idea for your equip file pbm would be to copy the original file ; paste it into Your Mod\Data ; open it (in a spreadsheet if possible : way better than raw text editor, I've had a lot of issues doing this without spreadsheet) ; add your stuff at the end and be careful not to leave an empty space between the lines : the game stops reading the file after it first runs into a space and then the units beyond that space are not visible in the editor and don't exist in the game. Use # in the first cell of lines you don't want to write into.
Mines ? Can't remember that scenario... what're you looking for actually ? Icon ? Stats ?
Btw, forget about the three 1 digits in the list, I couldn't make it as 1, 2, 3...
, but who cares ? you got it
Greetings,
Maths
Glad this helped a little !
What I do when I use hex action to change something to another is :
- find the relevant box in hex action window. terrain -> terrain, features -> features, as for "Tiles" there are nine boxes for the nine different layers with Tiles - whatever in their name, ordered the same as in the edit menu.
- find the index of the new thing to be implemented : in the corresponding layer, count from 0 starting with the first item in the list on the left of your screen until you reach the marker/icon/whatever you want (for example, terrain layer : sea is index 0, airfield is index 13 and so on. It works the same with all other layers.
- put that index number in the good box
I think the best idea for your equip file pbm would be to copy the original file ; paste it into Your Mod\Data ; open it (in a spreadsheet if possible : way better than raw text editor, I've had a lot of issues doing this without spreadsheet) ; add your stuff at the end and be careful not to leave an empty space between the lines : the game stops reading the file after it first runs into a space and then the units beyond that space are not visible in the editor and don't exist in the game. Use # in the first cell of lines you don't want to write into.
Mines ? Can't remember that scenario... what're you looking for actually ? Icon ? Stats ?
Btw, forget about the three 1 digits in the list, I couldn't make it as 1, 2, 3...


Greetings,
Maths
Re: Editor's Technical Questions
The campaign and equip files are TSV files [Tab Separated Value]. Keeping track of tabs in the files can be difficult.Ainkatsiss wrote: ↑Sat Nov 20, 2021 7:50 am Creating a Campaign
What i've done so far is copy/paste a campaign file (from GC 39 i think), and try to change everything inside, but for now it doesn't work. I probably miss some minor detail, but i do'n know which ones. This lead me to others problem/questions
The equip files
What i've readen so far is that any equip file placed on Mods folder will be used instead of the original when playing the mod. But i can't see the new units in the editor, because i think it use the original equip file. Ofc i can make a backup, change the original to my custom, but if a "cleaner" solution exist, i'd prefer it. I don't really like to modify original files.
Opening the file in a spreadsheet can be a good way of checking Tabs.
The new equip file should be in the Data folder of a Campaign, not at the Mods folder level.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
-
- Corporal - Strongpoint
- Posts: 66
- Joined: Thu Apr 15, 2021 11:41 am
Re: Editor's Technical Questions
I know that, but the problem is with the editor. It doesn't take into account the files in Mods subfolder (at least it never worked for me). Maybe i'm doing something wrong ?
https://www.twitch.tv/ainkatsiss
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
Re: Editor's Technical Questions
Use the "ElasticTabstops" plugin for notepad++, for quick overview and access. Easier to save as well. If you have trouble, the coding should be "UTF-16 LE-BOM". The only bad thing compared to eg LibreOffice is, that so far you can not fix the lines with the labels or alter the width of the displayed Tab-columns without changing the widest displayed content of those columns.
After each editing of the file in the mods folder, you have to load it into the non mods folder using the mod manager. So that it can be used by the editor.Ainkatsiss wrote: ↑Sat Nov 20, 2021 6:48 pmI know that, but the problem is with the editor. It doesn't take into account the files in Mods subfolder (at least it never worked for me). Maybe i'm doing something wrong ?
longer, alternative "PG" like Campaign new version 0.34 from 2011.08.02 (another bugfix & now in zip format)
-
- Corporal - Strongpoint
- Posts: 66
- Joined: Thu Apr 15, 2021 11:41 am
Re: Editor's Technical Questions
Thanks a lot. For now i didn't manage to do what i want for the bridge, because i don't have any destroyed bridge tile for now, but i've done many test, changing many hexes, so thanks again !Maths wrote: ↑Sat Nov 20, 2021 9:22 am What I do when I use hex action to change something to another is :
- find the relevant box in hex action window. terrain -> terrain, features -> features, as for "Tiles" there are nine boxes for the nine different layers with Tiles - whatever in their name, ordered the same as in the edit menu.
- find the index of the new thing to be implemented : in the corresponding layer, count from 0 starting with the first item in the list on the left of your screen until you reach the marker/icon/whatever you want (for example, terrain layer : sea is index 0, airfield is index 13 and so on. It works the same with all other layers.
- put that index number in the good box
I don't have the custom campaign button in game, so i can't start it. If you know how to do a campaign file, i could send mine to you, maybe you'll be able to see what is missing.
It's a bit frustrating because it's the major problem i have now. i have some scenarios quite ready, but it would be really better to test them in a campaign.
https://www.twitch.tv/ainkatsiss
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
-
- Corporal - Strongpoint
- Posts: 66
- Joined: Thu Apr 15, 2021 11:41 am
Re: Editor's Technical Questions
Yes, sadly that's what i'm doing. But it will be a bit complicated when i'll have to centralize all the modified stuff it the mods folder.
https://www.twitch.tv/ainkatsiss
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
Re: Editor's Technical Questions
I don't quite understand with the centralizing. Everything from the mod should be in the mods folder. After changing something, reload the mod with the mods manager. Reloading the mod is unfortunately unnecessarily complicated with the mod manager. You have to click the activated mod, then "Disable selected mod", then click it again in the available mods list, then "Enabel selected mod" again. There should be a button to simply reload the last mod in the "activated" list and another button to relaod all mods in the "activated" list. Would make life so much simpler...Ainkatsiss wrote: ↑Sat Nov 20, 2021 7:13 pmYes, sadly that's what i'm doing. But it will be a bit complicated when i'll have to centralize all the modified stuff it the mods folder.
longer, alternative "PG" like Campaign new version 0.34 from 2011.08.02 (another bugfix & now in zip format)
-
- Corporal - Strongpoint
- Posts: 66
- Joined: Thu Apr 15, 2021 11:41 am
Re: Editor's Technical Questions
Thanks for all your answers, i managed to do quite every thing i wanted.
Destroying bridges with hex change: OK EDIT: it works visually, but i think i wasn't able to delete the terrain feature, so the game still consider a road here. I've tried both "0" and "-1" value in the 4th box (in the hex action window).
Creating a Campaign: OK
Scenario vs Campaign: not tested, but as i can run my scenario as a campain, it should be OK
Equip file: i have found a solution, even if it's not the one i would have liked... but still OK
Mines: i haven't found the way to do it, but i will probably go in another direction (but if i find a way, i'll do it)
I have a new question:
Unit transports:
I am not able to assign the good transport to the unit i put on the map. I have 2 german and 2 british option when i shift click on the unit to give it a transport, but i don't have any of the buyable option. Any idea how to solve it ?
EDIT:
Destroying bridges: It works visually, but i think i wasn't able to delete the terrain feature, so the game still consider a road here. I've tried both "0" and "-1" value in the 4th box (in the hex action window). Any suggestion ?
Destroying bridges with hex change: OK EDIT: it works visually, but i think i wasn't able to delete the terrain feature, so the game still consider a road here. I've tried both "0" and "-1" value in the 4th box (in the hex action window).
Creating a Campaign: OK
Scenario vs Campaign: not tested, but as i can run my scenario as a campain, it should be OK
Equip file: i have found a solution, even if it's not the one i would have liked... but still OK
Mines: i haven't found the way to do it, but i will probably go in another direction (but if i find a way, i'll do it)
I have a new question:
Unit transports:
I am not able to assign the good transport to the unit i put on the map. I have 2 german and 2 british option when i shift click on the unit to give it a transport, but i don't have any of the buyable option. Any idea how to solve it ?
EDIT:
Destroying bridges: It works visually, but i think i wasn't able to delete the terrain feature, so the game still consider a road here. I've tried both "0" and "-1" value in the 4th box (in the hex action window). Any suggestion ?
https://www.twitch.tv/ainkatsiss
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
-
- Field Marshal - Elefant
- Posts: 5953
- Joined: Mon Aug 15, 2011 12:48 pm
- Location: the land of freedom
-
- Corporal - Strongpoint
- Posts: 66
- Joined: Thu Apr 15, 2021 11:41 am
Re: Editor's Technical Questions
I've readen this topic already. I just tried your solution (putting 0 int the 3rd box, instead of the 4th i've tried), but it doesn't work :-/
As said in the post you mention, i suspect the number in the terrain featues to be more complicated to find, because rivesr/roads/rails are dependent to multiple hexes. Maybe i should try to change more than 1 hex... (Or maybe just avoid this and think this scenario differently ^^)
As said in the post you mention, i suspect the number in the terrain featues to be more complicated to find, because rivesr/roads/rails are dependent to multiple hexes. Maybe i should try to change more than 1 hex... (Or maybe just avoid this and think this scenario differently ^^)
https://www.twitch.tv/ainkatsiss
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
-
- Field Marshal - Elefant
- Posts: 5953
- Joined: Mon Aug 15, 2011 12:48 pm
- Location: the land of freedom
Re: Editor's Technical Questions
I am not authorised to read this forumAinkatsiss wrote: ↑Sun Nov 21, 2021 6:35 pm I've readen this topic already. I just tried your solution (putting 0 int the 3rd box, instead of the 4th i've tried), but it doesn't work :-/
As said in the post you mention, i suspect the number in the terrain featues to be more complicated to find, because rivesr/roads/rails are dependent to multiple hexes. Maybe i should try to change more than 1 hex... (Or maybe just avoid this and think this scenario differently ^^)

-
- Corporal - Strongpoint
- Posts: 66
- Joined: Thu Apr 15, 2021 11:41 am
Re: Editor's Technical Questions
Same here :-/
In his scenario, he crate a bridge linked to nothing. In "real" modder life, bridges are linked to other's hex roads.
I've made few test, and I have really strange result. Changing the "road" in one hex seems to change also other hexes. To be honest, I think I will give up for this scenario, but if some of you would help me to search and test further, I think it could be a great contribution for the community to explain the the hex action work for terrain feature. I'm probably not the first to try to destroy some bridges !
In his scenario, he crate a bridge linked to nothing. In "real" modder life, bridges are linked to other's hex roads.
I've made few test, and I have really strange result. Changing the "road" in one hex seems to change also other hexes. To be honest, I think I will give up for this scenario, but if some of you would help me to search and test further, I think it could be a great contribution for the community to explain the the hex action work for terrain feature. I'm probably not the first to try to destroy some bridges !

https://www.twitch.tv/ainkatsiss
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
https://www.youtube.com/channel/UCRH5W5mKN6Ds___bnsxYyzg
-
- Field Marshal - Elefant
- Posts: 5953
- Joined: Mon Aug 15, 2011 12:48 pm
- Location: the land of freedom
Re: Editor's Technical Questions
Logically, it would also be necessary to change the other contiguous hexagons with connected routes.Ainkatsiss wrote: ↑Mon Nov 22, 2021 8:53 am Same here :-/
In his scenario, he crate a bridge linked to nothing. In "real" modder life, bridges are linked to other's hex roads.
I've made few test, and I have really strange result. Changing the "road" in one hex seems to change also other hexes. To be honest, I think I will give up for this scenario, but if some of you would help me to search and test further, I think it could be a great contribution for the community to explain the the hex action work for terrain feature. I'm probably not the first to try to destroy some bridges !![]()
If only I could open the damn fsx link

-
- Brigadier-General - 15 cm Nblwf 41
- Posts: 1912
- Joined: Thu Sep 13, 2012 7:42 am
Re: Editor's Technical Questions
I downloaded a hex action instruction pdf some time ago. I can have a look for it, but I won't be able to get at the pc for a couple of days, so don't hold your breath.
-
- Field Marshal - Elefant
- Posts: 5953
- Joined: Mon Aug 15, 2011 12:48 pm
- Location: the land of freedom
Re: Editor's Technical Questions
I hope you find that precious pdf file, captainjack !captainjack wrote: ↑Mon Nov 22, 2021 9:56 am I downloaded a hex action instruction pdf some time ago. I can have a look for it, but I won't be able to get at the pc for a couple of days, so don't hold your breath.