is it possible to create new nations in the editor?

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

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

Post Reply
DHvampire
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 2
Joined: Wed Aug 17, 2011 11:06 am

is it possible to create new nations in the editor?

Post by DHvampire »

Hi!

Ive been browsing this forum for a while now but cant find a solution to this problem. How do you create a new nation so that it would appear in the scenario editors nations list? I tried adding it to the nations.pzdat file but nothing happened. Also I cant make a custom flag to appear in the editor (is it possible to add new flags or I just have to change the old ones?). Otherwise it's a great product and everything is working well.

Thanx

P
rezaf
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1487
Joined: Mon Aug 15, 2011 3:27 pm

Post by rezaf »

Well, adding a flag to the flags.png works flawlessly for me. I just put a blank one after the Turkey flag and it appeared just fine in the editor.

Getting the actual nation names is a bit complicated since - wait for it - they HARDCODED the lists.
This means you have to manually edit the htm files that are responsible for filling those fields, they are in the UI subdirectory and start with editor_ (such as editor_scnparams.htm).
Just search for an existing nation (Free France is the last entry in the existing list) and it should be pretty easy to add entries.
_____
rezaf
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Post by El_Condoro »

Just a caution: I did this and PzC would not run (at work and can't remember the error - something about arrays). I knew what I had changed and was able to revert back. Strongly suggest back up of any files that are modified. That said, like rezaf has indicated, I think editing the right files and adding images to the right folders will allow new nations. Personally, I would start by modding an existing one that is not used much, like Sweden.
naturesheva
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 273
Joined: Mon Aug 01, 2011 11:18 pm

Post by naturesheva »

El_Condoro wrote:Personally, I would start by modding an existing one that is not used much, like Sweden.
Agree, that will save a lot of time.
rezaf
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1487
Joined: Mon Aug 15, 2011 3:27 pm

Post by rezaf »

El_Condoro wrote:Just a caution: I did this and PzC would not run (at work and can't remember the error - something about arrays). I knew what I had changed and was able to revert back. Strongly suggest back up of any files that are modified. That said, like rezaf has indicated, I think editing the right files and adding images to the right folders will allow new nations. Personally, I would start by modding an existing one that is not used much, like Sweden.
That's odd, I could swear I ran the game afterwards. But maybe I will also have to revert my changes ... thanks for the head's up.
I will report when/if I manage to pull this off.

Those hardcoded list are a bit of an embarassment for the developers, imo, though...
_____
rezaf
DHvampire
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 2
Joined: Wed Aug 17, 2011 11:06 am

Post by DHvampire »

Thanx guys, ill try this out
Ranta
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 87
Joined: Thu Jul 14, 2011 6:35 am

Post by Ranta »

Hi

I tried to add a new nation to the editor and the program itselfe, and it worked - halfway

I added a flag in ui/flags as well as one in ui/purchase/flags

I added / copied the corresponding entries in ui/
editor_condmap
editor_scnparams
editor_unitfilter
editor_unitparam

and added an entry in data/nations.pzdat and a unit in the equipment file for that nation

I could choose the country in the editor and deplay it in the map. In pc, this unit is displayed correctly, with the correct (new) (round) flag. But when I conquer a city, the old flag disappears and no new one is set (it seems there is none available).

The problem is, I can not add the new flag for hex-fields in the editor, it is not displayed there (I can not even choose it as an option). Even when I try to replace an existing flag with my new one (name wise), there is no change to be seen in the editor 0o). So my question is: what did i miss? In which file can i add the correpsonding flags or entries for my new nation, for "territorial" issues?

Best regards

Ranta
Ranta
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 87
Joined: Thu Jul 14, 2011 6:35 am

Post by Ranta »

ahhh, I am stupid

There is a file graphics/overlay/flags.png

If one adds the flag there, every thing works :)
rezaf
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1487
Joined: Mon Aug 15, 2011 3:27 pm

Post by rezaf »

Ok, I created this mainly for rivvendarke, but it might be of use to somebody else as well, so here goes.
This is an achive containing all neccessary files and changes to add Switzerland, Turkey and Denmark to the game.
Just unzip in your PC folder and you're good to go.
_____
rezaf
zombiehunter1977
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 22
Joined: Fri Aug 19, 2011 1:51 am

Post by zombiehunter1977 »

Ranta, thank you for that explanation about which files to change! It works perfectly!
zombiehunter1977
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 22
Joined: Fri Aug 19, 2011 1:51 am

Post by zombiehunter1977 »

Actually I have found an issue. Not sure if I missed an entry in the .htm files or not but.... when you go to create scenarios using Nations added, the scenario editor will not save for some reason whether the are axis or allied. you can set it, but as soon as you tab away from it in scenario parameters, it immediately forgets what you just set. I'm not sure how to fix that...
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1433
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

How it works?

Post by Uhu »

I tried to create a new nation. But it was not successful. :)

1.,
- Modified the four editor_.....htm files, inserted the new nation (copied + modified an existing one + gave a new number for it).
- Added the new row to the nations.pzdat file
Still the scenario editor shows only "IDS_NATION30" (used already a modified version with plus nations).

2., Tried to modify an existing one. Overwrote all name entries in the four editor_ file + in tha nation.pzdat file (from "Denmark" to "Etiophia"). Still the scenario editor shows Denmark.
Why? Where else has to be an entry given? I know, that flags has to be also added/changed, but I think, the scenario editor don't looks into graphical files, when it search for nations.


+ Otherways, I also tried to draw a plus flag to the graphics/overlays/flags.png - of cause in the next place, with the same size -, but when I than used the scenario editor, there were no flags (not even another ones) shown, but black hexes.
Is there a spezial method, how to insert a new flag in this file?
bebro
Slitherine
Slitherine
Posts: 4388
Joined: Sun Nov 19, 2006 12:50 pm

Re: How it works?

Post by bebro »

Had similar probs a while ago, got it to work with hints from rezaf.
Uhu wrote:I tried to create a new nation. But it was not successful. :)

1.,
- Modified the four editor_.....htm files, inserted the new nation (copied + modified an existing one + gave a new number for it).
- Added the new row to the nations.pzdat file
Still the scenario editor shows only "IDS_NATION30" (used already a modified version with plus nations).
Did you also edit the "Strings" file? Look for "IDS_NATION##" entries and add your own below.
2., Tried to modify an existing one. Overwrote all name entries in the four editor_ file + in tha nation.pzdat file (from "Denmark" to "Etiophia"). Still the scenario editor shows Denmark.
Why? Where else has to be an entry given? I know, that flags has to be also added/changed, but I think, the scenario editor don't looks into graphical files, when it search for nations.
This occured to me after I had done everything correctly, but had all my files as custom campaign under My files/etc, because the editor accesses certain files from the main game. Do you use GME? Well, could still be needed to put your edited flag files etc in the main game folder (I'm still not very routined with this, but got it to work somehow).

In any case better backup anything before changing original game files. I hope that when the new DLC comes monday it means we also get the new patch then, so there could be further improvements for modding or the editor specifically.
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1433
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: How it works?

Post by Uhu »

Thanks for helping!
In the meantime, I found out, that in the strings.pzdat, the entry of the given nation has also to be placed.
At least, now I see the new nation. Now I will look for the flags...

bebro wrote:Had similar probs a while ago, got it to work with hints from rezaf.
Uhu wrote:I tried to create a new nation. But it was not successful. :)

1.,
- Modified the four editor_.....htm files, inserted the new nation (copied + modified an existing one + gave a new number for it).
- Added the new row to the nations.pzdat file
Still the scenario editor shows only "IDS_NATION30" (used already a modified version with plus nations).
Did you also edit the "Strings" file? Look for "IDS_NATION##" entries and add your own below.
2., Tried to modify an existing one. Overwrote all name entries in the four editor_ file + in tha nation.pzdat file (from "Denmark" to "Etiophia"). Still the scenario editor shows Denmark.
Why? Where else has to be an entry given? I know, that flags has to be also added/changed, but I think, the scenario editor don't looks into graphical files, when it search for nations.
This occured to me after I had done everything correctly, but had all my files as custom campaign under My files/etc, because the editor accesses certain files from the main game. Do you use GME? Well, could still be needed to put your edited flag files etc in the main game folder (I'm still not very routined with this, but got it to work somehow).

In any case better backup anything before changing original game files. I hope that when the new DLC comes monday it means we also get the new patch then, so there could be further improvements for modding or the editor specifically.
Post Reply

Return to “Panzer Corps : Scenario Design”