Units Positions

Discussing the game, editor (Suite) and the related tools.
Post Reply
danadi712
Private
Private
Posts: 10
Joined: 2022-06-15 11:21, Wednesday

Units Positions

Post by danadi712 » 2022-06-15 11:29, Wednesday

Hello.
First i want to say thank you for this wonderful mod.
Then i have a question.
It is possible to make a mod that keep the orientation of the units only in two positions like in PANZER GENERAL 1 (or PANZER CORPS 1)?
I mean i dont want units to rotate when i move them.
I want just two orientation :LEFT and RIGHT.
(Or at least one orientation LEFT OR RIGHT)

User avatar
randowe
Lieutenant Colonel
Lieutenant Colonel
Posts: 2895
Joined: 2019-09-20 19:02, Friday
Location: Germany

Re: Units Positions

Post by randowe » 2022-06-17 11:31, Friday

danadi712 wrote:
2022-06-15 11:29, Wednesday
Hello.
First i want to say thank you for this wonderful mod.
Then i have a question.
It is possible to make a mod that keep the orientation of the units only in two positions like in PANZER GENERAL 1 (or PANZER CORPS 1)?
I mean i dont want units to rotate when i move them.
I want just two orientation :LEFT and RIGHT.
(Or at least one orientation LEFT OR RIGHT)
Welcome to the forum :howdy

As far as i know it is not possible. Even if you cut all icons down to show only the side view of an unit and set FaceOffset so that a unit would not turn when initiating an attack, it still could turn around 180° when moving.
If the FaceOffset setting also comes into consideration when a unit is being attacked i don't know.
Image Slava Ukraini!

User avatar
LuisGuzman
General, Special Forces
General, Special Forces
Posts: 639
Joined: 2019-03-10 08:35, Sunday
Location: Spain
Contact:

Re: Units Positions

Post by LuisGuzman » 2022-06-17 11:45, Friday

randowe wrote:
2022-06-17 11:31, Friday
danadi712 wrote:
2022-06-15 11:29, Wednesday
Hello.
First i want to say thank you for this wonderful mod.
Then i have a question.
It is possible to make a mod that keep the orientation of the units only in two positions like in PANZER GENERAL 1 (or PANZER CORPS 1)?
I mean i dont want units to rotate when i move them.
I want just two orientation :LEFT and RIGHT.
(Or at least one orientation LEFT OR RIGHT)
Welcome to the forum :howdy

As far as i know it is not possible. ...
:yes

For efiles using standard icons' png made with 9 images, is not possible to show only 2 faces for the unit' icon in game.

But if the efile uses icons' png made with just a single image (see EFILE_SON) then it shows only 2 faces like old PG.

:howdy
  Visit my website to get my latest tools.
* Click Open General banner to get more info about the game
Image

danadi712
Private
Private
Posts: 10
Joined: 2022-06-15 11:21, Wednesday

Re: Units Positions

Post by danadi712 » 2022-06-19 12:04, Sunday

So if i made unit png with one image and overwrite the original one it should work?
In original campaign of Panzer General 2?

User avatar
LuisGuzman
General, Special Forces
General, Special Forces
Posts: 639
Joined: 2019-03-10 08:35, Sunday
Location: Spain
Contact:

Re: Units Positions

Post by LuisGuzman » 2022-06-19 16:10, Sunday

danadi712 wrote:
2022-06-19 12:04, Sunday
So if i made unit png with one image and overwrite the original one it should work?
In original campaign of Panzer General 2?
No need to overwrite anything if you only want 2 faces for EFILE_PG2 (or for only a few ones).

If you only want 2 faces units for only a few efiles, it's better to create a single png for each unit with just one image and locate them in the efile's OPENDAT folder.

Alternatively (If you want to use in many efiles), you can pack all the png files into a "OpenIconsLoc.dat" file and copy this file in the main efile's folder you want to use units with only 2 faces.

OG will detect it is a single unit image if eighth is less than 240 or width is less that 150 pixels of any of them are not multiple of 3.
I mean 241x150 will be loaded as a single face icon and 120x60 too

:howdy
  Visit my website to get my latest tools.
* Click Open General banner to get more info about the game
Image

danadi712
Private
Private
Posts: 10
Joined: 2022-06-15 11:21, Wednesday

Re: Units Positions

Post by danadi712 » 2022-06-27 12:59, Monday

So this is what i did.
I use EFILE_CC03
Made a png size 241x150 of Pz IIA (german tanc) with this name
Pz IIA.png
Put this png in OPENDAT folder of EFILE_CC03.
Begin new campaign BLITZ
Buy the unit.
Unit is still rotate 360 degree.
What is wrong?

User avatar
randowe
Lieutenant Colonel
Lieutenant Colonel
Posts: 2895
Joined: 2019-09-20 19:02, Friday
Location: Germany

Re: Units Positions

Post by randowe » 2022-06-27 13:41, Monday

danadi712 wrote:
2022-06-27 12:59, Monday
So this is what i did.
I use EFILE_CC03
Made a png size 241x150 of Pz IIA (german tanc) with this name
Pz IIA.png
Put this png in OPENDAT folder of EFILE_CC03.
Begin new campaign BLITZ
Buy the unit.
Unit is still rotate 360 degree.
What is wrong?
You have to rename your icon (png file) so it matches the original icon's designation of the icon used for a specific unit in the efile. In the case of your Pz IIA it has to be g113.
I tested with this icon, with all other views cut off, Image in CC03 and it works. Only two views are shown, either the unit will look to the right or left.
Image Slava Ukraini!

danadi712
Private
Private
Posts: 10
Joined: 2022-06-15 11:21, Wednesday

Re: Units Positions

Post by danadi712 » 2022-06-27 14:17, Monday

Thank you.
I can confirm that is working.
But i have some questions
-How did you obtain that png?And what width x length pixels did you have?
-How to make an OpenIconsLoc.dat file?
-I wonder if will be possible to insert equipement icon on highter resolution.
Like those in PANZER CORPS 1.

User avatar
randowe
Lieutenant Colonel
Lieutenant Colonel
Posts: 2895
Joined: 2019-09-20 19:02, Friday
Location: Germany

Re: Units Positions

Post by randowe » 2022-06-27 14:40, Monday

danadi712 wrote:
2022-06-27 14:17, Monday
-How did you obtain that png?And what width x length pixels did you have?
First i checked in the efile which icon is used for the unit: icon ID.
I loaded the original icon (240x150 pixel, all views) with photoshop. Then i set the working space to 80x50 pixel, center of the picture.
Then the rest of the icon picture becomes invisible (but is still there) and the image is centered on the central view of the unit.
Then i can save the new icon file, showing only the central view.
danadi712 wrote:
2022-06-27 14:17, Monday
-How to make an OpenIconsLoc.dat file?
You have to download the Icons Tool from Luis website. With this tool you can add icon pictures and save as dat file / work on dat files.
danadi712 wrote:
2022-06-27 14:17, Monday
-I wonder if will be possible to insert equipement icon on highter resolution.
Like those in PANZER CORPS 1.
Technically it is possible to use bigger icons, but then the units, adjacent to each other, are overlapping.
Keep in mind that the size of the hex grid and the size of the icons are coordinated/harmonious.
Bigger icons also overlap in buy screen, etc.
(Some players (with big screens) play with 200% zoom to get bigger icons.)
Image Slava Ukraini!

danadi712
Private
Private
Posts: 10
Joined: 2022-06-15 11:21, Wednesday

Re: Units Positions

Post by danadi712 » 2022-06-27 19:48, Monday

I use another way.
With OpenSuite i open equipment file
Then using button View i see the png file for tank.
Print screen
Using Paint i isolate the central position of the tank
Then save.

I dont understand how do you get the icons
It is a pack of icons in game folder?

User avatar
randowe
Lieutenant Colonel
Lieutenant Colonel
Posts: 2895
Joined: 2019-09-20 19:02, Friday
Location: Germany

Re: Units Positions

Post by randowe » 2022-06-27 20:45, Monday

When i need a specific icon i download it from the database from the Open General homepage. To me it is the most comfortable way. But i only need few icons every now and then when i rework them to create new icons.

The icons are stored in openicons.dat file.
But you need to rework thousands of icons and i guess you should try to extract them all at once from the openicons.dat using the icons tool.
But then you have like 15 thousand icons or so. I don't know what is the most efficient way to get only the icons you need :dunno
And for example, if you rework all icons from CC3 according to your needs, other CC/efiles may use different or more icons and you then have to rework them too. All of this will take a very long time.
Image Slava Ukraini!

danadi712
Private
Private
Posts: 10
Joined: 2022-06-15 11:21, Wednesday

Re: Units Positions

Post by danadi712 » 2022-06-28 10:40, Tuesday

Ok
When i try to load OpenIcons.dat using OpenGen suite says "No flag loaded" and does nothing.
Any idea why?

User avatar
randowe
Lieutenant Colonel
Lieutenant Colonel
Posts: 2895
Joined: 2019-09-20 19:02, Friday
Location: Germany

Re: Units Positions

Post by randowe » 2022-06-28 13:19, Tuesday

Did you use this option when you tried to load the openicons in suite?

Image
Image Slava Ukraini!

danadi712
Private
Private
Posts: 10
Joined: 2022-06-15 11:21, Wednesday

Re: Units Positions

Post by danadi712 » 2022-06-28 16:56, Tuesday

Yes i did and it was loaded.
It gives a file similar with Excel table.
But there is a way to extract all png from that table?
I mean to obtain png like in database from the Icons section on the site.

User avatar
randowe
Lieutenant Colonel
Lieutenant Colonel
Posts: 2895
Joined: 2019-09-20 19:02, Friday
Location: Germany

Re: Units Positions

Post by randowe » 2022-06-28 17:16, Tuesday

You need to download the icons tool i mentioned earlier. Download it from Luis' site. For link klick on banner under his post.
With the icons tool you can extract single icons from any dat file you load with the tool. I don't know if it is possible to extract all icons at once, because i never was lookingfor such an option. You have to check it out.
Image Slava Ukraini!

danadi712
Private
Private
Posts: 10
Joined: 2022-06-15 11:21, Wednesday

Re: Units Positions

Post by danadi712 » 2022-06-29 08:53, Wednesday

Ok
Thank you again.

Post Reply