Advertisement
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Modpacks

Notices

Reply
 
Thread Tools
Old Oct 24, 2009, 07:56 AM   #301
PieceOfMind
Drill IV Defender
 
PieceOfMind's Avatar
 
Join Date: Jan 2006
Location: Australia
Posts: 9,142
I've just uploaded a very quick update - v0.52. This is mainly for you AveiMil.

Changes made in 0.52
Quote:
-Fixed the cost of Divine Right back to 1200 (not 1000) as it was meant to be.
-Removed the archer's 25% defense bonus vs. axemen. They really don't need it I don't think, especially now that axemen are more expensive.
-Made the change suggested in this post by jdog http://forums.civfanatics.com/showpo...&postcount=414
This should prevent the MP related crash (though I can't personally guarantee it).
The potential issue relating to the AIs misunderstanding the 1 from slavery will be left alone for now. As said earlier, at worst this will make AIs want to stay in slavery for longer, which is not actually that big a problem I think. I'll ask EmperorFool to what extent he fixed that bug and what to change.

EDIT... There's always one thing I forget - the flag hover will still read v0.51. Ignore that. I also forgot to remove the 25% archer bonus vs. axemen from the included documentation.
__________________
Tip: Forcing Steam's Offline Mode
Civ4 Mods: Advanced Combat Odds, PIG Mod(discontinued), HEX Mod(discontinued)
Suggestion: Try karadoc's K-Mod: Far Beyond the Sword
Read if bored: Zoom-To-Cursor, Good advice from Kaell for DX11 users, Nvidia beats AMD in Civ V

Last edited by PieceOfMind; Oct 24, 2009 at 08:08 AM.
PieceOfMind is offline   Reply With Quote
Old Oct 24, 2009, 08:06 AM   #302
AveiMil
Prince
 
Join Date: Jul 2009
Posts: 365
Thanks a lot PoM for your effort
AveiMil is offline   Reply With Quote
Old Oct 24, 2009, 08:23 AM   #303
PieceOfMind
Drill IV Defender
 
PieceOfMind's Avatar
 
Join Date: Jan 2006
Location: Australia
Posts: 9,142
One thing I'd like to hear some opinions/comments about is how to fix the No Espionage setting.

I wouldn't mind sometimes playing games that have that vanilla feel where there was no espionage worries, but at the moment with No Esp meaning espionage points getting converted to culture and great spy points being converted to neutral points (and Firaxis' bandaid fix of increasing the Legendary city requirements under the setting) I find the game is too different and broken.

There are a many things that will be done...
-Spies must be disallowed as specialists.
-For any wonder that produces spy points, we'll either need to make the wonder void of any great people points or use an alternative great person type when No Esp is enabled.
- will not get converted to culture.
-Buildings that generate esp points will not anymore.

-Remove the espionage screen?
-Remove the espionage ratio from leader tooltips.
-Do something about the spy unit...It will no longer be able to perform missions. Perhaps make it a bit less likely to be captured since it can't do as much any more except gather intel. Removing the spy altogether is another option, though a drastic one.
-Remove the great spy from Fascism.
-Remove the sec bureau and itel agency altogether. Will the castle need a new boost of some sort? Probably not IMO now that it obsoletes at Corp.
-Any random events that involve espionage would need to be disabled somehow.
-Legendary culture reqs returned to normal levels.

A lot of these changes are currently beyond what I know how to do easily but it was one of my original goals and if I have a plan for what I'm actually going to do and we think about some of the implications of these changes will be, it'll make my job easier. Please remind me of anything I missed from the list above.

Is anyone aware of a mod which attempts any of the above?

Also, the ideas in this post could serve as a stand alone mod and if it works well enough I'd release it as a modcomp for other modders to use.
__________________
Tip: Forcing Steam's Offline Mode
Civ4 Mods: Advanced Combat Odds, PIG Mod(discontinued), HEX Mod(discontinued)
Suggestion: Try karadoc's K-Mod: Far Beyond the Sword
Read if bored: Zoom-To-Cursor, Good advice from Kaell for DX11 users, Nvidia beats AMD in Civ V

Last edited by PieceOfMind; Oct 24, 2009 at 08:26 AM.
PieceOfMind is offline   Reply With Quote
Old Oct 24, 2009, 09:42 AM   #304
AveiMil
Prince
 
Join Date: Jul 2009
Posts: 365
Quote:
Originally Posted by PieceOfMind View Post
One thing I'd like to hear some opinions/comments about is how to fix the No Espionage setting.
Disable the setting :P

Do people actually play with No Espionage?
AveiMil is offline   Reply With Quote
Old Oct 24, 2009, 12:00 PM   #305
EmperorFool
Deity
 
EmperorFool's Avatar
 
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
The problem with removing/modifying things on Buildings/Units/etc is that the XML files are loaded before the user chooses their game options. You will either have to add setXXX() functions for all these fields on the CvFooInfo classes and hope Civ handles calls to those functions correctly or find some other solution.

Having the points go nowhere or be transmuted to something else is easy. Same I think for having the birth of a Great Spy be nullified. But I don't think you'll be able to remove the spy-related buildings.
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground.
Silly monkeys, give them thumbs they make a club and beat their brother down.


BUG Mod - BTS Unaltered Gameplay
[ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ]

BAT 3.0.1 QuickFix™ released Oct 24th
EmperorFool is offline   Reply With Quote
Old Oct 24, 2009, 01:07 PM   #306
TheWilltoAct
I am observe
 
TheWilltoAct's Avatar
 
Join Date: Sep 2007
Location: Exiled from Fribbulus Xax
Posts: 1,873
Quote:
Originally Posted by PieceOfMind View Post
Regarding corps, Sid's sushi might still be considered the superior but Cereal does get 1 per resource consumed and is a better conversion of gold to food, if you don't want the culture. Let's just see how sugar goes first, and then re-assess whether it needs more boost.
Small correction: Cereal Mills actually gives + 0.75 per resource.

That's interesting about Divine Right... I think I actually self-researched it, though I can't remember why!! lol! Part of the reason was that no one had it yet and I wanted to found Islam I guess. Anyway, that's something that its beaker cost was lowered... does the AI realize that it's less valuable? If so it does make me feel better about trading it away since it isn't worth as much as I thought.
No time to ponder on it as you've patched it away. ^.^

Bravo on this quick update
__________________
"Doesn't make much sense though. Banana science!! "
Banana resources.!
TheWilltoAct is offline   Reply With Quote
Old Oct 24, 2009, 02:36 PM   #307
TheLazyHase
King
 
Join Date: Sep 2009
Posts: 867
I had a game with the new version. (with the De gaulle LHC 2 to be precise).

The -1 unhealthiness can really hit hard on some start, that's for sure . -1 food can really hit hard, especially when you are neither expansive not with numerous health source. I think it work well, because if you have few health source and / or few food, then you have good production and consequently don't need slavery that hard.

Edit : BTW, the plant changes had nerfed the japanese UB. Since it's not too shaby a civ for now, it's not a real concern.

Re-Edit : for the no-espionnage thingie, I would just make a simple change :
_+x EP convert into culture
_+x% EP voided.

That remove most of the problem of the no-espionnage setting, without nullifying too much the buildings.

Last edited by TheLazyHase; Oct 24, 2009 at 02:50 PM.
TheLazyHase is offline   Reply With Quote
Old Oct 24, 2009, 06:53 PM   #308
AveiMil
Prince
 
Join Date: Jul 2009
Posts: 365
Just finished a game that ended with Space Race victory for me (Emperor, Normal game speeed) that took about 6 hours. Everything appeared to work fine, I did not encounter any bugs.

Personally I found the +1 Unhealth to Slavery is a good change. Slavery is very powerful and I'm normally reluctant to move away from it. However, this game around I switched to Caste System earlier to get away from health problems.
AveiMil is offline   Reply With Quote
Old Oct 24, 2009, 07:43 PM   #309
TheLazyHase
King
 
Join Date: Sep 2009
Posts: 867
I am in the middle of a game with Korea. Access to medic with drill may only be a quality of life improvement, but it's really sweet in the end. Hwacha + drill 3 xbow + a medic = clean conquest.

I still can't make work Influence-driven war. What is strange is, when I delete PIG mod and reinstall it, the IDW_ENABLED is already on 1 in the globaldefine.

Granary show "50% retained food", shouldn't be 40% instead ? Or have you reverted the change ?
TheLazyHase is offline   Reply With Quote
Old Oct 25, 2009, 02:10 AM   #310
PieceOfMind
Drill IV Defender
 
PieceOfMind's Avatar
 
Join Date: Jan 2006
Location: Australia
Posts: 9,142
Quote:
Originally Posted by TheLazyHase View Post
I am in the middle of a game with Korea. Access to medic with drill may only be a quality of life improvement, but it's really sweet in the end. Hwacha + drill 3 xbow + a medic = clean conquest.

I still can't make work Influence-driven war. What is strange is, when I delete PIG mod and reinstall it, the IDW_ENABLED is already on 1 in the globaldefine.

Granary show "50% retained food", shouldn't be 40% instead ? Or have you reverted the change ?
I reverted that change. This was mainly because I nerfed slavery. Nerfing slavery and nerfing the granary at the same time would be a bit much for one update, I think. That change should not have made it into any of the documenation, only "unofficial" posts in this thread.

I'll look into the issue with IDW. I haven't noticed any problems with it but I haven't been enabling it recently.

Quote:
Originally Posted by AveiMil View Post
Disable the setting :P

Do people actually play with No Espionage?
I would, if it worked in a better way.

Quote:
Originally Posted by EmperorFool View Post
The problem with removing/modifying things on Buildings/Units/etc is that the XML files are loaded before the user chooses their game options. You will either have to add setXXX() functions for all these fields on the CvFooInfo classes and hope Civ handles calls to those functions correctly or find some other solution.

Having the points go nowhere or be transmuted to something else is easy. Same I think for having the birth of a Great Spy be nullified. But I don't think you'll be able to remove the spy-related buildings.
If I made it a separate mod it would be ok, right? I'll leave these ideas for another mod idea in that case. PIG Mod will be left alone.

Loading up a mod every time I wanted to play a No Espionage game would still be acceptable IMO. I'll maybe make another thread about it when I have more time.

On a side note, I've already actually altered the No Espionage setting (without documenting it (woops)) by disallowing the espionage to be converted to culture. On the other hand, I haven't changed the Legendary thresholds for such a case. I'll add it to my todo list to fix that for the next release i.e. return it to original functionality.

Quote:
Originally Posted by TheWilltoAct View Post
Small correction: Cereal Mills actually gives + 0.75 per resource.

That's interesting about Divine Right... I think I actually self-researched it, though I can't remember why!! lol! Part of the reason was that no one had it yet and I wanted to found Islam I guess. Anyway, that's something that its beaker cost was lowered... does the AI realize that it's less valuable? If so it does make me feel better about trading it away since it isn't worth as much as I thought.
No time to ponder on it as you've patched it away. ^.^

Bravo on this quick update
You do realise the amount of food per resource depends on mapsize? I think for Normal maps its .75 for sushi and 1 for Cereal. Whatever the case, Cereal gets more food per resource.

Quote:
Originally Posted by TheLazyHase View Post
I had a game with the new version. (with the De gaulle LHC 2 to be precise).

The -1 unhealthiness can really hit hard on some start, that's for sure . -1 food can really hit hard, especially when you are neither expansive not with numerous health source. I think it work well, because if you have few health source and / or few food, then you have good production and consequently don't need slavery that hard.

Edit : BTW, the plant changes had nerfed the japanese UB. Since it's not too shaby a civ for now, it's not a real concern.

Re-Edit : for the no-espionnage thingie, I would just make a simple change :
_+x EP convert into culture
_+x% EP voided.

That remove most of the problem of the no-espionnage setting, without nullifying too much the buildings.
Thanks for the feedback. I always want to hear opinions on the actual effects of changes, since I don't get enough time to playtest all these things myself. I'm also a very slow player, which doesn't help.

I'm interested that you think the plant changes nerfed Japan's UB. Indeed the many other changes to Japan mean it wasn't overall nerfed (two new reduced price buildings and improved drill units).
But regarding the plants, I'd still say their UB is very good or at least as good as it always was, relative to the other options. The hydro's +2 is usually not going to be big enough reason to build it. The clean power is still the deciding factor and probably more than 50% of the time it's unavailable to cities. I just realised thought that 3GD has been significantly boosted so I maybe better increase its price in the next update. The nuclear plants are probably still going to avoided like the plague by many players, though the nuclear meltdowns are definitely less of a worry now.

Regarding slavery, I was thinking it might make for more interesting starts in that the player will have to think more about gaining health resources if planning to run slavery. As cities grow larger it's perhaps a good way to put pressure on civs to exit the civic.

I personally am a fan of using late-game slavery in the unmodded game but I really want to discourage that and that is probably the part of the game where the 1 from slavery will hurt most.

Quote:
Originally Posted by AveiMil View Post
Just finished a game that ended with Space Race victory for me (Emperor, Normal game speeed) that took about 6 hours. Everything appeared to work fine, I did not encounter any bugs.

Personally I found the +1 Unhealth to Slavery is a good change. Slavery is very powerful and I'm normally reluctant to move away from it. However, this game around I switched to Caste System earlier to get away from health problems.
Got any game saves I can have a peek at? Not for any particular reason but just to have a look around at how the AIs do, etc.

Hopefully everyone is not locking modified assets when they're playing, right?
__________________
Tip: Forcing Steam's Offline Mode
Civ4 Mods: Advanced Combat Odds, PIG Mod(discontinued), HEX Mod(discontinued)
Suggestion: Try karadoc's K-Mod: Far Beyond the Sword
Read if bored: Zoom-To-Cursor, Good advice from Kaell for DX11 users, Nvidia beats AMD in Civ V
PieceOfMind is offline   Reply With Quote
Old Oct 25, 2009, 03:40 AM   #311
AveiMil
Prince
 
Join Date: Jul 2009
Posts: 365
I managed to retrieve four save games throughout history, that's all I had, hope it's better than nothing. I've attached them.

I have another request for PIG, this one is aesthetic in nature. You know the super-moder newly paved road that appears when Scientific Method is researched? They are really annoying as they appear to out of place. Cannons rolling around on super-modern looking highways does not look appealing. Could you change is so that the roads graphic change occurs with Industrialism instead of Scientific Method?
Attached Files
File Type: zip America - AveiMil - PIG 0.52.zip (573.3 KB, 14 views)
AveiMil is offline   Reply With Quote
Old Oct 25, 2009, 03:55 AM   #312
PieceOfMind
Drill IV Defender
 
PieceOfMind's Avatar
 
Join Date: Jan 2006
Location: Australia
Posts: 9,142
Quote:
Originally Posted by AveiMil View Post
I managed to retrieve four save games throughout history, that's all I had, hope it's better than nothing. I've attached them.

I have another request for PIG, this one is aesthetic in nature. You know the super-moder newly paved road that appears when Scientific Method is researched? They are really annoying as they appear to out of place. Cannons rolling around on super-modern looking highways does not look appealing. Could you change is so that the roads graphic change occurs with Industrialism instead of Scientific Method?
I've got a feeling the roads graphic depends on the era. So changing this would require either putting Sci Method back a whole era (that would mean it's not purely aesthetic) or figuring out how to make the road graphics not change based on era but depending on techs (which would make a bit of sense actually). Since it's an aesthetic change, I'm not going to give high priority to it but if you figure out how it can be done I'd probably be happy to include the change.

Thanks for the saves.
__________________
Tip: Forcing Steam's Offline Mode
Civ4 Mods: Advanced Combat Odds, PIG Mod(discontinued), HEX Mod(discontinued)
Suggestion: Try karadoc's K-Mod: Far Beyond the Sword
Read if bored: Zoom-To-Cursor, Good advice from Kaell for DX11 users, Nvidia beats AMD in Civ V
PieceOfMind is offline   Reply With Quote
Old Oct 25, 2009, 04:11 AM   #313
AveiMil
Prince
 
Join Date: Jul 2009
Posts: 365
Quote:
Originally Posted by PieceOfMind View Post
I've got a feeling the roads graphic depends on the era. So changing this would require either putting Sci Method back a whole era (that would mean it's not purely aesthetic) or figuring out how to make the road graphics not change based on era but depending on techs (which would make a bit of sense actually). Since it's an aesthetic change, I'm not going to give high priority to it but if you figure out how it can be done I'd probably be happy to include the change.
Or just try to change it so that the road change occurs for the Modern Era instead.
AveiMil is offline   Reply With Quote
Old Oct 25, 2009, 04:23 AM   #314
PieceOfMind
Drill IV Defender
 
PieceOfMind's Avatar
 
Join Date: Jan 2006
Location: Australia
Posts: 9,142
Quote:
Originally Posted by AveiMil View Post
Or just try to change it so that the road change occurs for the Modern Era instead.
Can you find how to change that?
__________________
Tip: Forcing Steam's Offline Mode
Civ4 Mods: Advanced Combat Odds, PIG Mod(discontinued), HEX Mod(discontinued)
Suggestion: Try karadoc's K-Mod: Far Beyond the Sword
Read if bored: Zoom-To-Cursor, Good advice from Kaell for DX11 users, Nvidia beats AMD in Civ V
PieceOfMind is offline   Reply With Quote
Old Oct 25, 2009, 04:32 AM   #315
AveiMil
Prince
 
Join Date: Jul 2009
Posts: 365
I remember I tried too a few months back but I was unable to find any red string of logic with just the .xml files. So I assume some other code has to be modified...
AveiMil is offline   Reply With Quote
Old Oct 25, 2009, 05:39 AM   #316
TheLazyHase
King
 
Join Date: Sep 2009
Posts: 867
Printing press need machinery, but since education need machinery, it's useless to keep it as a requirement.
TheLazyHase is offline   Reply With Quote
Old Oct 25, 2009, 06:24 AM   #317
PieceOfMind
Drill IV Defender
 
PieceOfMind's Avatar
 
Join Date: Jan 2006
Location: Australia
Posts: 9,142
Quote:
Originally Posted by TheLazyHase View Post
Printing press need machinery, but since education need machinery, it's useless to keep it as a requirement.
You mean Paper, but you're right. I guess I'll remove that requirement since it's now redundant.
__________________
Tip: Forcing Steam's Offline Mode
Civ4 Mods: Advanced Combat Odds, PIG Mod(discontinued), HEX Mod(discontinued)
Suggestion: Try karadoc's K-Mod: Far Beyond the Sword
Read if bored: Zoom-To-Cursor, Good advice from Kaell for DX11 users, Nvidia beats AMD in Civ V
PieceOfMind is offline   Reply With Quote
Old Oct 25, 2009, 06:36 AM   #318
TheLazyHase
King
 
Join Date: Sep 2009
Posts: 867
Yes, it was paper, sorry for the confusion.

Some more word on the corporation topic : one of the aggravating factor with sid's sushi is that corporation costs accrue less quickly than corporation benefot. It mean that the $ per food ratio of cereal mill is often the same or worst than the sid sushi's one. For example, I have the choixe between 3 food for 6 gold with cereal and 4 food for 9 gold with sid sushi. And some culture. I will try to conquer some more sugar source, but I suppose you see the problem.
TheLazyHase is offline   Reply With Quote
Old Oct 25, 2009, 09:47 AM   #319
EmperorFool
Deity
 
EmperorFool's Avatar
 
Join Date: Mar 2007
Location: Mountain View, California
Posts: 9,624
Quote:
Originally Posted by TheLazyHase View Post
I have the choixe between 3 food for 6 gold with cereal and 4 food for 9 gold with sid sushi. And some culture.
3 for 6 is a better deal than 4 for 9 (1:2 vs. 1:2.25).

@PoM - Yes, you can always do the No Espionage changes you want with a new mod. Everything in your list would be doable. Oh, and I'm a very slow player too. 18 hours isn't atypical for my Epic Emporer games. I've been focusing on speeding up my play lately, but micromanaging each decision is what I like about the game so it's tough.
__________________
Monkeys killing monkeys killing monkeys over pieces of the ground.
Silly monkeys, give them thumbs they make a club and beat their brother down.


BUG Mod - BTS Unaltered Gameplay
[ Forum | Download | FAQ | Known Issues | Troubleshooting | Modding Tutorial ]

BAT 3.0.1 QuickFix™ released Oct 24th
EmperorFool is offline   Reply With Quote
Old Oct 25, 2009, 01:54 PM   #320
PieceOfMind
Drill IV Defender
 
PieceOfMind's Avatar
 
Join Date: Jan 2006
Location: Australia
Posts: 9,142
Quote:
Originally Posted by EmperorFool View Post
BUG and other mods use a file called CvModName.py that contains a variable called modName that gets set to the name of the mod. BUG no longer requires it to match the mod folder, but all other mods do. Try changing it to the directory name where you installed PIG.

@PoM - Can you post the whole function as it stands now? I read over the code block I posted several times without finding any problems.
CvPediaPromotion.py
Spoiler:
Code:
## Sid Meier's Civilization 4
## Copyright Firaxis Games 2005
from CvPythonExtensions import *
import CvUtil
import ScreenInput
import CvScreenEnums

# globals
gc = CyGlobalContext()
ArtFileMgr = CyArtFileMgr()
localText = CyTranslator()

class CvPediaPromotion:
	"Civilopedia Screen for Promotions"

	def __init__(self, main):
		self.iPromotion = -1
		self.top = main
	
		self.BUTTON_SIZE = 46
		
		self.X_UNIT_PANE = 50
		self.Y_UNIT_PANE = 80
		self.W_UNIT_PANE = 250
		self.H_UNIT_PANE = 210

		self.X_ICON = 98
		self.Y_ICON = 110
		self.W_ICON = 150
		self.H_ICON = 150
		self.ICON_SIZE = 64

		self.X_PREREQ_PANE = 330
		self.Y_PREREQ_PANE = 60
		self.W_PREREQ_PANE = 420
		self.H_PREREQ_PANE = 110

		self.X_LEADS_TO_PANE = 330
		self.Y_LEADS_TO_PANE = 180
		self.W_LEADS_TO_PANE = self.W_PREREQ_PANE
		self.H_LEADS_TO_PANE = 110
				
		self.X_SPECIAL_PANE = 330
		self.Y_SPECIAL_PANE = 294
		self.W_SPECIAL_PANE = self.W_PREREQ_PANE
		self.H_SPECIAL_PANE = 380

		self.X_UNIT_GROUP_PANE = 50
		self.Y_UNIT_GROUP_PANE = 294
		self.W_UNIT_GROUP_PANE = 250
		self.H_UNIT_GROUP_PANE = 380
		self.DY_UNIT_GROUP_PANE = 25
#		self.ITEMS_MARGIN = 18
#		self.ITEMS_SEPARATION = 2

	# Screen construction function
	def interfaceScreen(self, iPromotion):	
			
		self.iPromotion = iPromotion
	
		self.top.deleteAllWidgets()						
							
		screen = self.top.getScreen()
		
		bNotActive = (not screen.isActive())
		if bNotActive:
			self.top.setPediaCommonWidgets()

		# Header...
		szHeader = u"<font=4b>" + gc.getPromotionInfo(self.iPromotion).getDescription().upper() + u"</font>"
		szHeaderId = self.top.getNextWidgetName()
		screen.setLabel(szHeaderId, "Background", szHeader, CvUtil.FONT_CENTER_JUSTIFY, self.top.X_SCREEN, self.top.Y_TITLE, 0, FontTypes.TITLE_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
		
		# Top
		screen.setText(self.top.getNextWidgetName(), "Background", self.top.MENU_TEXT, CvUtil.FONT_LEFT_JUSTIFY, self.top.X_MENU, self.top.Y_MENU, 0, FontTypes.TITLE_FONT, WidgetTypes.WIDGET_PEDIA_MAIN, CivilopediaPageTypes.CIVILOPEDIA_PAGE_PROMOTION, -1)

		if self.top.iLastScreen	!= CvScreenEnums.PEDIA_PROMOTION or bNotActive:		
			self.placeLinks(true)
			self.top.iLastScreen = CvScreenEnums.PEDIA_PROMOTION
		else:
			self.placeLinks(false)
			
		# Icon
		screen.addPanel( self.top.getNextWidgetName(), "", "", False, False,
		    self.X_UNIT_PANE, self.Y_UNIT_PANE, self.W_UNIT_PANE, self.H_UNIT_PANE, PanelStyles.PANEL_STYLE_BLUE50)
		screen.addPanel(self.top.getNextWidgetName(), "", "", false, false,
		    self.X_ICON, self.Y_ICON, self.W_ICON, self.H_ICON, PanelStyles.PANEL_STYLE_MAIN)
		screen.addDDSGFC(self.top.getNextWidgetName(), gc.getPromotionInfo(self.iPromotion).getButton(),
		    self.X_ICON + self.W_ICON/2 - self.ICON_SIZE/2, self.Y_ICON + self.H_ICON/2 - self.ICON_SIZE/2, self.ICON_SIZE, self.ICON_SIZE, WidgetTypes.WIDGET_GENERAL, -1, -1 )
#		screen.addDDSGFC(self.top.getNextWidgetName(), gc.getPromotionInfo(self.iPromotion).getButton(), self.X_ICON, self.Y_ICON, self.W_ICON, self.H_ICON, WidgetTypes.WIDGET_GENERAL, self.iPromotion, -1 )

		# Place Required promotions
		self.placePrereqs()

		# Place Allowing promotions
		self.placeLeadsTo()
				
		# Place the Special abilities block
		self.placeSpecial()
		
		self.placeUnitGroups()
			

	# Place Leads To...
	def placeLeadsTo(self):

		screen = self.top.getScreen()

		panelName = self.top.getNextWidgetName()
		screen.addPanel( panelName, localText.getText("TXT_KEY_PEDIA_LEADS_TO", ()), "", false, true,
				 self.X_LEADS_TO_PANE, self.Y_LEADS_TO_PANE, self.W_LEADS_TO_PANE, self.H_LEADS_TO_PANE, PanelStyles.PANEL_STYLE_BLUE50 )
		
		screen.attachLabel(panelName, "", "  ")
		
		for j in range(gc.getNumPromotionInfos()):
			iPrereq = gc.getPromotionInfo(j).getPrereqPromotion()
			if (gc.getPromotionInfo(j).getPrereqPromotion() == self.iPromotion or gc.getPromotionInfo(j).getPrereqOrPromotion1() == self.iPromotion or gc.getPromotionInfo(j).getPrereqOrPromotion2() == self.iPromotion or gc.getPromotionInfo(j).getPrereqOrPromotion3() == self.iPromotion):
				screen.attachImageButton( panelName, "", gc.getPromotionInfo(j).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_PROMOTION, j, 1, False )
				
	# Place prereqs...
	def placePrereqs(self):

		screen = self.top.getScreen()
		
		panelName = self.top.getNextWidgetName()
		screen.addPanel( panelName, localText.getText("TXT_KEY_PEDIA_REQUIRES", ()), "", false, true,
				 self.X_PREREQ_PANE, self.Y_PREREQ_PANE, self.W_PREREQ_PANE, self.H_PREREQ_PANE, PanelStyles.PANEL_STYLE_BLUE50 )
		
		screen.attachLabel(panelName, "", "  ")

		ePromo = gc.getPromotionInfo(self.iPromotion).getPrereqPromotion()
		if (ePromo > -1):
			screen.attachImageButton( panelName, "", gc.getPromotionInfo(ePromo).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_PROMOTION, ePromo, 1, False )

		ePromoOr1 = gc.getPromotionInfo(self.iPromotion).getPrereqOrPromotion1()
		ePromoOr2 = gc.getPromotionInfo(self.iPromotion).getPrereqOrPromotion2()
		ePromoOr3 = gc.getPromotionInfo(self.iPromotion).getPrereqOrPromotion3()
		if (ePromoOr1 > -1):
			if (ePromo > -1):
				screen.attachLabel(panelName, "", localText.getText("TXT_KEY_AND", ()))
			
				if (ePromoOr2 > -1):
					screen.attachLabel(panelName, "", "(")

			screen.attachImageButton( panelName, "", gc.getPromotionInfo(ePromoOr1).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_PROMOTION, ePromoOr1, 1, False )

			if (ePromoOr2 > -1):
				screen.attachLabel(panelName, "", localText.getText("TXT_KEY_OR", ()))
				screen.attachImageButton( panelName, "", gc.getPromotionInfo(ePromoOr2).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_PROMOTION, ePromoOr2, 1, False )

				#Commented out by PieceOfMind for PIG Mod
				#if (ePromo > -1):
				#	screen.attachLabel(panelName, "", ")")
					
			if (ePromoOr3 > -1):
				screen.attachLabel(panelName, "", localText.getText("TXT_KEY_OR", ()))
				screen.attachImageButton( panelName, "", gc.getPromotionInfo(ePromoOr3).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_PROMOTION, ePromoOr3, 1, False )

			if (ePromo > -1 and ePromoOr2 > -1):
				screen.attachLabel(panelName, "", ")")
								
		eTech = gc.getPromotionInfo(self.iPromotion).getTechPrereq()
		if (eTech > -1):
			screen.attachImageButton( panelName, "", gc.getTechInfo(eTech).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_TECH, eTech, 1, False )		
						
		eReligion = gc.getPromotionInfo(self.iPromotion).getStateReligionPrereq()
		if (eReligion > -1):
			screen.attachImageButton( panelName, "", gc.getReligionInfo(eReligion).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_RELIGION, eReligion, 1, False )		
						
	def placeSpecial(self):

		screen = self.top.getScreen()
		
		panelName = self.top.getNextWidgetName()
		screen.addPanel( panelName, localText.getText("TXT_KEY_PEDIA_SPECIAL_ABILITIES", ()), "", true, false,
				 self.X_SPECIAL_PANE, self.Y_SPECIAL_PANE, self.W_SPECIAL_PANE, self.H_SPECIAL_PANE, PanelStyles.PANEL_STYLE_BLUE50 )
		
		listName = self.top.getNextWidgetName()
		
		szSpecialText = CyGameTextMgr().getPromotionHelp(self.iPromotion, True)[1:]
		screen.addMultilineText(listName, szSpecialText, self.X_SPECIAL_PANE+5, self.Y_SPECIAL_PANE+30, self.W_SPECIAL_PANE-10, self.H_SPECIAL_PANE-35, WidgetTypes.WIDGET_GENERAL, -1, -1, CvUtil.FONT_LEFT_JUSTIFY)	

	def placeUnitGroups(self):
		screen = self.top.getScreen()
		
		panelName = self.top.getNextWidgetName()
		screen.addPanel( panelName, localText.getText("TXT_KEY_PEDIA_PROMOTION_UNITS", ()), "", true, true,
			self.X_UNIT_GROUP_PANE, self.Y_UNIT_GROUP_PANE, self.W_UNIT_GROUP_PANE, self.H_UNIT_GROUP_PANE, PanelStyles.PANEL_STYLE_BLUE50 )
		
		szTable = self.top.getNextWidgetName()
		screen.addTableControlGFC(szTable, 1,
			self.X_UNIT_GROUP_PANE + 10, self.Y_UNIT_GROUP_PANE + 40, self.W_UNIT_GROUP_PANE - 20, self.H_UNIT_GROUP_PANE - 50, False, False, 24, 24, TableStyles.TABLE_STYLE_EMPTY)
		
		i = 0
		for iI in range(gc.getNumUnitCombatInfos()):
			if (0 != gc.getPromotionInfo(self.iPromotion).getUnitCombat(iI)):
				iRow = screen.appendTableRow(szTable)
				screen.setTableText(szTable, 0, i, u"<font=2>" + gc.getUnitCombatInfo(iI).getDescription() + u"</font>", gc.getUnitCombatInfo(iI).getButton(), WidgetTypes.WIDGET_PEDIA_JUMP_TO_UNIT_COMBAT, iI, -1, CvUtil.FONT_LEFT_JUSTIFY)
				i += 1

	def placeLinks(self, bRedraw):

		screen = self.top.getScreen()

		if bRedraw:		               
			screen.clearListBoxGFC(self.top.LIST_ID)
		
		# sort techs alphabetically
		listSorted=[(0,0)]*gc.getNumPromotionInfos()
		for j in range(gc.getNumPromotionInfos()):
			listSorted[j] = (gc.getPromotionInfo(j).getDescription(), j)
		listSorted.sort()
			
		i = 0
		iSelected = 0
		for iI in range(gc.getNumPromotionInfos()):
			if (not gc.getPromotionInfo(listSorted[iI][1]).isGraphicalOnly()):
				if bRedraw:
					screen.appendListBoxStringNoUpdate( self.top.LIST_ID, listSorted[iI][0], WidgetTypes.WIDGET_PEDIA_JUMP_TO_PROMOTION, listSorted[iI][1], 0, CvUtil.FONT_LEFT_JUSTIFY )
				if listSorted[iI][1] == self.iPromotion:
					iSelected = i			
				i += 1
				
		if bRedraw:
			screen.updateListBox(self.top.LIST_ID)

		screen.setSelectedListBoxStringGFC(self.top.LIST_ID, iSelected)

	# Will handle the input for this screen...
	def handleInput (self, inputClass):
		return 0


Quote:
Oh, in the XML do the tags have 1, 2, and 3 in the element name as in <OrPrereq1>? If so, make sure that you are using 1 before you use 2 before you use 3. The code as I wrote it assumes that if you don't have the 1 field you can't have the 2 or 3 field; same for 3 requiring 2.
Yep, for every promotion I have the 3 fields. Some of them have all 3 fields as NONE. For promos where there are one or two prereqs the second two or the last one (respectively) would be NONE.

e.g.

Code:
<PromotionPrereq>NONE</PromotionPrereq>
<PromotionPrereqOr1>PROMOTION_MEDIC1</PromotionPrereqOr1>
<PromotionPrereqOr2>NONE</PromotionPrereqOr2>
<PromotionPrereqOr3>NONE</PromotionPrereqOr3>
<TechPrereq>NONE</TechPrereq>
__________________
Tip: Forcing Steam's Offline Mode
Civ4 Mods: Advanced Combat Odds, PIG Mod(discontinued), HEX Mod(discontinued)
Suggestion: Try karadoc's K-Mod: Far Beyond the Sword
Read if bored: Zoom-To-Cursor, Good advice from Kaell for DX11 users, Nvidia beats AMD in Civ V
PieceOfMind is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - Creation & Customization > Civ4 - Modpacks > [BTS] Probably Improved Gameplay Mod

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
New Mod Idea: Improved Military Mod Sebiche Civ4 - Creation & Customization 1 Jan 10, 2013 03:45 PM
Improved AI mod? robyextreme Civ4 - Creation & Customization 4 Jul 03, 2009 05:40 AM
Improved Nuke Mod neepster Civ4 - Creation & Customization 7 Mar 04, 2006 04:01 PM
Improved Civ 3 Mod SK138 Civ3 - Completed Modpacks 16 Jul 11, 2003 10:18 AM


Advertisement

All times are GMT -6. The time now is 01:41 AM.


Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
This site is copyright © Civilization Fanatics' Center.
Support CFC: Amazon.com | Amazon UK | Amazon DE | Amazon CA | Amazon FR