Help Wanted Ads

Which one is loaded first?

It's not deterministic (well, no determined by game code anyway). It depends on filesystem enumeration order, which in turn could vary with the version of Windows, and the order the files were created during whatever copy process you used to install the mod. It will NOT be the same for every person.

That's why we strongly encourage unique schema names, or else ALL copies need updating (for any given name) when one is.
 
It's not deterministic (well, no determined by game code anyway). It depends on filesystem enumeration order, which in turn could vary with the version of Windows, and the order the files were created during whatever copy process you used to install the mod. It will NOT be the same for every person.

That's why we strongly encourage unique schema names, or else ALL copies need updating (for any given name) when one is.

Well, I figured out what was going on, Praetyre did not make his building Schema in Project Hades have a unique name. :mischief: I've changed that and will include that change in my next SVN update.
 
Well, I figured out what was going on, Praetyre did not make his building Schema in Project Hades have a unique name. :mischief: I've changed that and will include that change in my next SVN update.

Yeah... that was a nono Praetyre. Especially reusing the core. I don't mind if the modular schemas like Hydro and DH's schemas are reused in a number of spots but the core should never be. Messes with us and causes headaches like this ;)

Good job on sorting out the issue ls!
 
Yeah... that was a nono Praetyre. Especially reusing the core. I don't mind if the modular schemas like Hydro and DH's schemas are reused in a number of spots but the core should never be. Messes with us and causes headaches like this ;)

Good job on sorting out the issue ls!

And the only reason DH and I can do that is because we maintain our schemas and if we update one we update them all.
 
OK, I a having a look. BTW the only stuff I can find of yours I can find is to do with the Lawyer and Statesman units. The Lawyer has been in C2C since v25/6 and I should start writing that tutorial using the Statesman mod soonish, maybe next year (December is a write off with Family stuff and Jan-Feb is too hot).

Edit there are a couple of problems with it
1) minor - no line return on the last return means that it is not a valid statement - go figure :)
2) You already have a GreatPersonEvents class in your Great People mod
3) I would have gone one BUG step further. I think it just speeds stuff up a bit is all.

I'll test my changes and put them up - should they go under your name or another person's folder, ie is this Platyping's wonder?
 
It was brought to my attention that Machu Picchu does not place the Machu Picchu improvement if the only Peaks in the city's radius are in the 3rd culture ring.

This is the current code to generate the list of tiles to get the bonuses from the construction of the Wonder and potentially place the Machu Picchu improvement:
Code:
for x in range(iX - 2, iX + 3):
	for y in range(iY - 2, iY + 3):
		pPlot = CyMap().plot(x, y)
		if abs(x - iX) != 2 or abs(y - iY) != 2:
			if pPlot.getOwner() == iPlayer and pPlot.isPeak():
				CyGame().setPlotExtraYield(x, y, YieldTypes.YIELD_COMMERCE, 1)
				PeakPlot.append(pPlot)

The issue with raising the radius to 3 is that you should be able to work the third ring before you can place the Machu Picchu improvement there. I came up with two possible ways of doing this:

The first is to actually check that the city is eligible for working third-ring tiles by having a Metropolitan Administration or Capital Administration or having the Larger Cities option turned on:
Code:
iMetro = gc.getInfoTypeForString("BUILDING_METROPOLITAN_ADMINISTRATION")
iCapital = gc.getInfoTypeForString("BUILDING_CAPITAL_ADMINISTRATION")
iLarger = gc.getInfoTypeForString("GAMEOPTION_LARGER_CITIES")

for x in range(iX - 3, iX + 4):
	for y in range(iY - 3, iY + 4):
		pPlot = CyMap().plot(x, y)
		if abs(x - iX) != 3 or abs(y - iY) != 3:
			if CyGame().isOption(iLarger) == 1 or CyCity().getNumActiveBuilding(iMetro) == 1 or CyCity().getNumActiveBuilding(iCapital) == 1:
				if pPlot.getOwner() == iPlayer and pPlot.isPeak():
					CyGame().setPlotExtraYield(x, y, YieldTypes.YIELD_COMMERCE, 1)
					PeakPlot.append(pPlot)

The second is just to check if the city can work the tile:
Code:
for x in range(iX - 3, iX + 4):
	for y in range(iY - 3, iY + 4):
		pPlot = CyMap().plot(x, y)
		if abs(x - iX) != 3 or abs(y - iY) != 3:
			if CyCity().canWork(pPlot) == 1 and pPlot.isPeak():
					CyGame().setPlotExtraYield(x, y, YieldTypes.YIELD_COMMERCE, 1)
					PeakPlot.append(pPlot)

I think the second one is better because it's shorter and cleaner, but I thought I would ask the Python experts to just look at the code and see if there is anything I missed. Does the canWork function work properly with a city radius of 3 and Usable Mountains? Is there a reason to prefer one over the other?
 
@ DH:

Can you take a look at this and see if i messed up anything, and if so what and where?? Thx.

What is this Python routine supposed to do? I think you need a <Help> text addition to Lascaux Paints to explain the bonus so it isn't hidden from the player.
 
What is this Python routine supposed to do? I think you need a <Help> text addition to Lascaux Paints to explain the bonus so it isn't hidden from the player.

Correct, thx.
 
Can someone point me at the python code for adding new concepts - thanks.

No python is needed. All that you need to do is add an entry to the CIV4NewConceptInfos or the CIV4ANDConceptInfos, like this

Code:
		<NewConceptInfo>
			<Type>CONCEPT_STRATEGY_NAVAL</Type>
			<Description>TXT_KEY_STRATEGY_NAVAL</Description>
			<Civilopedia>TXT_KEY_STRATEGY_NAVAL_PEDIA</Civilopedia>
		</NewConceptInfo>

and then add the text in a GameText file.
 
Rats it is worse than I thought!

OK so is CIV4NewConceptInfos the one for BtS? I know the base Civ IV one is CIV4GameText_Civilopedia_Concepts.

CIV4ANDConceptInfos and CIV4DCMConceptInfos contain the concepts added by RevDCM, RoM, RoM:AND and C2C.

I am trying to tidy the concepts up by making just the two Civ IV and C2C. Then we will need to go through and fix the text. ;)
 
Rats it is worse than I thought!

OK so is CIV4NewConceptInfos the one for BtS? I know the base Civ IV one is CIV4GameText_Civilopedia_Concepts.

CIV4ANDConceptInfos and CIV4DCMConceptInfos contain the concepts added by RevDCM, RoM, RoM:AND and C2C.

I am trying to tidy the concepts up by making just the two Civ IV and C2C. Then we will need to go through and fix the text. ;)

I tried that before, and was told not to mess with it, some of it is tided into the dll? Am i wrong there or not Koshling/AIAndy??
 
The Sevopedia display is all in Python. The category sorting is done in SevoPediaMain.py with a little help from the data in SevoScreenEnums.py. (The AND concept category has been renamed "C2C Concepts" via changing the text key, TXT_KEY_PEDIA_CATEGORY_AND.)

Each category type has a list generation function defined in the self.mapListGenerators dict. This produces the list of topics when the categories are selected, for those that have lists (everything except the upgrade/promotion/unit/building trees and the index, I think.)

The DLL does have new Info types for DCMConeceptInfos and ANDConeceptInfos which store the relevant data and are retrieved by the Python to make the lists for these categories.

So to add concepts to an existing category, you'd put them in the matching file.

There is at least one complication. A set of types, Traits, Strategy, and Shortcuts, gets split out into different categories although they are listed in the CIV4NewConceptInfos.xml file. This split is done based on the key name: any that start with "CONCEPT_TRAIT_" go to the Trait category, "CONCEPT_SHORTCUTS_" to the Shortcuts, and "CONCEPT_STRATEGY_" to the Strategy. This was a way to get more categories without modifying the DLL to have more Info types parsed out of more XML files (since the Sevopedia itself includes no DLL component, it works with what was already available - the Sevopedia as modified for C2C, or AND or DCM, would not work with the regular BtS DLL).
 
The Sevopedia display is all in Python. The category sorting is done in SevoPediaMain.py with a little help from the data in SevoScreenEnums.py. (The AND concept category has been renamed "C2C Concepts" via changing the text key, TXT_KEY_PEDIA_CATEGORY_AND.)

Each category type has a list generation function defined in the self.mapListGenerators dict. This produces the list of topics when the categories are selected, for those that have lists (everything except the upgrade/promotion/unit/building trees and the index, I think.)

The DLL does have new Info types for DCMConeceptInfos and ANDConeceptInfos which store the relevant data and are retrieved by the Python to make the lists for these categories.

So to add concepts to an existing category, you'd put them in the matching file.

There is at least one complication. A set of types, Traits, Strategy, and Shortcuts, gets split out into different categories although they are listed in the CIV4NewConceptInfos.xml file. This split is done based on the key name: any that start with "CONCEPT_TRAIT_" go to the Trait category, "CONCEPT_SHORTCUTS_" to the Shortcuts, and "CONCEPT_STRATEGY_" to the Strategy. This was a way to get more categories without modifying the DLL to have more Info types parsed out of more XML files (since the Sevopedia itself includes no DLL component, it works with what was already available - the Sevopedia as modified for C2C, or AND or DCM, would not work with the regular BtS DLL).

Thanks, I had sort of figured out some of that. I could not see where the files were read in Python but could see a link to the dll where it gets its lists from.

There are Game concepts which are Civ IV, New concepts which are BtS then DCM concepts which are RevDCM and RoM then AND concepts which are RoM:AND and C2C. It was suggested that we should just have two Civ IV/BtS and C2C the latter containing the RevDCN, RoM, RoM:AND and C2C concepts.

Also just looking at the Animals concept in Civ IV/BtS shows that it is completely wrong for C2C so an overhaul is needed. ;)
 
Also just looking at the Animals concept in Civ IV/BtS shows that it is completely wrong for C2C so an overhaul is needed. ;)

Now i am 100% in agreement with you there.:goodjob:
 
Thanks, I had sort of figured out some of that. I could not see where the files were read in Python but could see a link to the dll where it gets its lists from.

There are Game concepts which are Civ IV, New concepts which are BtS then DCM concepts which are RevDCM and RoM then AND concepts which are RoM:AND and C2C. It was suggested that we should just have two Civ IV/BtS and C2C the latter containing the RevDCN, RoM, RoM:AND and C2C concepts.

Also just looking at the Animals concept in Civ IV/BtS shows that it is completely wrong for C2C so an overhaul is needed. ;)

What would you like done in the DLL? I personally think that the BtS and Game Concepts should be merged into a Basic Concepts tab, and the mod-related concepts should go into an Advanced concepts tab. All of the others could be left empty and hidden. Would that require any changes to the DLL?
 
Back
Top Bottom