How let the CvReligionScreen be larger?

Liambane

Rome's Praetorian
Joined
Aug 14, 2007
Messages
289
Location
West Roman Empire, Italy.
Hi all.

An easy question for python skilled modders.

In my mod I've included JARM and I'm using new techs that found religion but i need a larger screen from left to right and I dunno what I need to edit. Wich numers I need to modify for let the screen be more LARGE and display all the 9 religions founded witout use a scrollbar?

This is my CvReligionScreen. I need it more large:

Code:
class CvReligionScreen:
	"Religion Advisor Screen"

	def __init__(self):
		
		self.SCREEN_NAME = "ReligionScreen"
		self.BUTTON_NAME = "ReligionScreenButton"
		self.TITLE_TOP_PANEL = "ReligionsTopPanel"
		self.TITLE_BOTTOM_PANEL = "ReligionsBottomPanel"
		self.AREA_NAME = "ReligionsScreenArea"
		self.HELP_IMAGE_NAME = "CivicsScreenCivicOptionImage"
		self.RELIGION_NAME = "ReligionText"
		self.CONVERT_NAME = "ReligionConvertButton"
		self.CANCEL_NAME = "ReligionCancelButton"
		self.CITY_NAME = "ReligionCity"
		self.HEADER_NAME = "ReligionScreenHeader"
		self.DEBUG_DROPDOWN_ID =  "ReligionDropdownWidget"
		self.AREA1_ID =  "ReligionAreaWidget1"
		self.AREA2_ID =  "ReligionAreaWidget2"
		self.BACKGROUND_ID = "ReligionBackground"
		self.RELIGION_PANEL_ID = "ReligionPanel"
		self.RELIGION_ANARCHY_WIDGET = "ReligionAnarchyWidget"

		self.HEADINGS_TOP = 0
		self.HEADINGS_BOTTOM = 220
		self.HEADINGS_LEFT = 0
		self.HEADINGS_RIGHT = 320
		self.HELP_TOP = 20
		self.HELP_BOTTOM = 610
		self.HELP_LEFT = 350
		self.HELP_RIGHT = 950
		self.BUTTON_SIZE = 48
		self.BIG_BUTTON_SIZE = 64
		self.BOTTOM_LINE_TOP = 630
		self.BOTTOM_LINE_HEIGHT = 60
		self.TEXT_MARGIN = 13

		self.BORDER_WIDTH = 2
		self.HIGHLIGHT_EXTRA_SIZE = 4

		self.Z_SCREEN = -6.1

		self.Y_TITLE = 8		
		self.Z_TEXT = 0 ##self.Z_SCREEN - 0.2
		self.DZ = -0.2
		self.Z_CONTROLS = self.Z_TEXT

	def setValues(self):
		screen = CyGInterfaceScreen("MainInterface", CvScreenEnums.MAIN_INTERFACE)
		resolutionWidth = 1024
		resolutionHeigth = 768

## johny smith
## this sets the resoultion below
#		if (resolutionWidth >= 1440):
#			self.HEADINGS_WIDTH = 204	# original = 199
#			self.X_SCREEN = 718		# original = 500
#			self.X_CANCEL = 717		# original = 552

#		elif (resolutionWidth >= 1280):
#			self.W_SCREEN = 1280
#			self.HEADINGS_WIDTH = 182
#			self.X_SCREEN = 638
#			self.X_CANCEL = 637

#		elif (resolutionWidth >= 1152):
#			self.W_SCREEN = 1152
#			self.HEADINGS_WIDTH = 164
#			self.X_SCREEN = 574
#			self.X_CANCEL = 573

#		elif (resolutionWidth >= 1024):
#			self.W_SCREEN = 1024
#			self.HEADINGS_WIDTH = 146
#			self.X_SCREEN = 510
#			self.X_CANCEL = 509

		self.W_SCREEN = resolutionWidth
		self.H_SCREEN = resolutionHeigth
		
		self.X_CANCEL = 20
		self.X_POSITION = 0
		self.Y_POSITION = 0		
		self.PANEL_HEIGHT = 55
		self.PANEL_WIDTH = 0
		self.INITIAL_SPACING = 30		
		self.HEADINGS_WIDTH = 340		
		self.HEADINGS_HEIGHT = 64
		self.BOTTOM_LINE_HEIGHT = 60
		self.RIGHT_LINE_WIDTH = 0
		self.SCROLL_BAR_SPACING = 40
		self.BOTTOM_LINE_TEXT_SPACING = 150		
		
		self.X_EXIT = self.W_SCREEN - 30
		self.Y_EXIT = self.H_SCREEN - 40

		self.X_CANCEL = 552
		self.X_SCREEN = self.W_SCREEN / 2		 
		self.Y_SCREEN = 396
		self.Y_CANCEL = self.H_SCREEN - 40
		self.Y_EXIT = self.H_SCREEN - 40
		self.HELP_BOTTOM = self.H_SCREEN - 2 * self.PANEL_HEIGHT - self.BOTTOM_LINE_HEIGHT

		self.BOTTOM_LINE_WIDTH = self.W_SCREEN
		self.BOTTOM_LINE_TOP = self.H_SCREEN - self.PANEL_HEIGHT - 70		
		self.X_EXIT = self.W_SCREEN - 30
		self.X_ANARCHY = 21
		self.Y_ANARCHY = 726
		
		self.LEFT_EDGE_TEXT = 10
		self.X_RELIGION_START = 154
		self.Y_RELIGION_START = 154
		self.DX_RELIGION = 116
		self.DY_RELIGION = 116
		self.DX_RELIGION_OFFSET = self.DX_RELIGION
		self.X_RELIGION = 0
		self.Y_RELIGION = 35
		self.Y_FOUNDED = 90
		self.Y_HOLY_CITY = 115
		self.Y_INFLUENCE = 140
		self.Y_RELIGION_NAME = 70
		self.X_RELIGION_DIFF = self.X_RELIGION_START - self.X_RELIGION
		self.X_RELIGION_AREA = 0
		self.Y_RELIGION_AREA = 0
		self.W_RELIGION_AREA = 1008 + self.BUTTON_SIZE
		self.H_RELIGION_AREA = 180

		self.X_CITY1_AREA = 45
		self.X_CITY2_AREA = 522
		self.Y_CITY_AREA = 250
		self.W_CITY_AREA = 457
		self.H_CITY_AREA = 460
		
		self.X_CITY = 10
		self.DY_CITY = 38

		self.iReligionExamined = -1
		self.iReligionSelected = -1
		self.iReligionOriginal = -1
		self.iActivePlayer = -1
		
		self.bScreenUp = False
		
		self.ReligionScreenInputMap = {
			self.RELIGION_NAME		: self.ReligionScreenButton,
			self.BUTTON_NAME		: self.ReligionScreenButton,
			self.CONVERT_NAME		: self.ReligionConvert,
			self.CANCEL_NAME		: self.ReligionCancel,
			}
 
In the Fury Road mod (see sig), there is one religion for every civ. Refar gave me a religion screen, which he said was based on work done by johny smith. Please find it attached. I am not sure if it works all by itself; I just pulled out the one file from the Fury Road distribution. This screen has a scrollbar and automatically grows to fit the number of religions needed. You may also want to look at johny smith's newer work on the Rapture mod, which has its own subforum also. It has more than 50 religions, so they must have done something similar to this screen.
 

Attachments

ok, similar question to the OP but I do want the scroll bar. i don't know python that well and cant seem to figure out how to add a horizontal scroll bar to the bottom of the religions. I'm trying to add more religions to the game and am trying to make sure the graphics are working right but cant tell on the religions past the edge of the screen. while nice, the two screens mentioned in the last post (the attached one and the rapture mod) both seem to only show you the religions you have access to. I want to do a quick check, not play through a game to get the religion just to test graphics. Any help?
 
while nice, the two screens mentioned in the last post (the attached one and the rapture mod) both seem to only show you the religions you have access to. I want to do a quick check, not play through a game to get the religion just to test graphics. Any help?

I'm using the johny smith one: it shows progressively all religions founded in the game, even if you're not in contact with the Civ that founded one.
 
Thanks The_J, it's indeed better to reference the original page of download for the Johny Smith screen. But my understanding was that he already got it through the post of davidlallen above. I just wanted to say that all religions in the game appear on that screen, not just the ones you're in contact with as he was saying.
 
Thanks The_J! didn't see that download before, it had exactly what I was looking for in it.

and thanks for the clarification isenchine, I misunderstood how that screen worked. sorry.
 
No worry, you're welcome... :)
 
Back
Top Bottom