Graphics positioned incorrectly w/ mod.

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

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

Post Reply
BiteNibbleChomp
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3231
Joined: Mon Jul 01, 2013 6:35 am

Graphics positioned incorrectly w/ mod.

Post by BiteNibbleChomp »

I've been having some issues with the graphics in my WIP mod "The Path to Rearmament". I set up the purchase pictures today, which are supposed to be identical in both the Wehrmacht + Alliedcorps campaign selection screens, and when Wehrmacht is selected, they appear as normal:
Normal.JPG
Normal.JPG (149.5 KiB) Viewed 861 times
But in the Allied corps section, some appear in silly locations:
AC_glitched.JPG
AC_glitched.JPG (147.33 KiB) Viewed 861 times
note that the files in the AC ones are carbon-copies of the Wehrmacht icons, so I am unsure why they are differently positioned.

Can someone please tell me what files I need to edit so that the 2 are identical in positioning?

note that this has nothing to do with any other files I have added (or at least I can't see why they would have)

- BNC
Ryan O'Shea - Developer - Strategic Command American Civil War
ThvN
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 1408
Joined: Fri Jul 06, 2012 8:55 pm

Re: Graphics positioned incorrectly w/ mod.

Post by ThvN »

BiteNibbleChomp wrote:I've been having some issues with the graphics in my WIP mod "The Path to Rearmament". I set up the purchase pictures today, which are supposed to be identical in both the Wehrmacht + Alliedcorps campaign selection screens
Hi BNC, I moved your topic into another subforum, this is more a question for modders.
note that the files in the AC ones are carbon-copies of the Wehrmacht icons, so I am unsure why they are differently positioned.
...note that this has nothing to do with any other files I have added (or at least I can't see why they would have)
This isn't true, so this is probably why it seems so strange to you? They are actually different, easy example is to check the positions of the 'Tutorial' for the PzC campaign vs. the 'Torch' campaign in AC.
Can someone please tell me what files I need to edit so that the 2 are identical in positioning?
Good news, if you go to the Panzer Corps/UI subfolder, there are three files that determine the placement and names of the pictures: gamesetup.htm , gamesetup_ac.htm and gamesetup_ak.htm. Open them, and compare the offsets (like in the efx file) and names for the 'button' sections. I've copy/pasted the relevant section from the files here for you to compare, first the offsets of regular PzC campaign selection buttons:

Code: Select all

button
{
	cursor: default;
	transition: none;
}

button#StartTutorial
{
	width: 191px;
	height: 252px;
	background-image:url(gamesetup/0_default.png);
	position: relative;
	left: 169px;
	top: -113px;
}

button#Poland
{
	width: 307px;
	height: 210px;
	background-image:url(gamesetup/1_default.png);
	position: relative;
	left: -80px;
	top: 2px;
}

button#Barbarossa
{
	width: 311px;
	height: 210px;
	background-image:url(gamesetup/2_default.png);
	position: relative;
	left: 82px;
	top: 2px;
}

button#Italy
{
	width: 307px;
	height: 223px;
	background-image:url(gamesetup/3_default.png);
	position: relative;
	left: -250px;
	top: -266px;
}

button#Kursk
{
	width: 311px;
	height: 223px;
	background-image:url(gamesetup/4_default.png);
	position: relative;
	left: 140px;
	top: -6px;
}
Now compare the picture offsets with the ones in AC, you'll notice they are slightly different. So you'll need to edit these files to make the pictures match, or prevent the AC campaign option to be selected.

Code: Select all

button
{
	cursor: default;
	transition: none;
}

button#BorderRaids
{
	width: 271px;
	height: 210px;
	background-image:url(gamesetup/ac_0_default.png);
	position: relative;
	left: -116px;
	top: 2px;
}

button#Crete
{
	width: 275px;
	height: 199px;
	background-image:url(gamesetup/ac_1_default.png);
	position: relative;
	left: 118px;
	top: 2px;
}

button#Torch
{
	width: 265px;
	height: 211px;
	background-image:url(gamesetup/ac_2_default.png);
	position: relative;
	left: 149px;
	top: -95px;
}

button#Sicily
{
	width: 271px;
	height: 223px;
	background-image:url(gamesetup/ac_3_default.png);
	position: relative;
	left: -415px;
	top: -6px;
}

button#D-Day
{
	width: 275px;
	height: 234px;
	background-image:url(gamesetup/ac_4_default.png);
	position: relative;
	left: 268px;
	top: -248px;
}
I hope this helps?
BiteNibbleChomp
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3231
Joined: Mon Jul 01, 2013 6:35 am

Re: Graphics positioned incorrectly w/ mod.

Post by BiteNibbleChomp »

your fix worked when I was editing Kaiserschlacht/GC'14 today! :D :D

BTW, I put it in tech support because I imagined that something had stuffed up the files, rather than them being set to be positioned differently.

- BNC
Ryan O'Shea - Developer - Strategic Command American Civil War
Post Reply

Return to “Panzer Corps : Scenario Design”