Modmodding Q&A Thread

CvPlot::canHaveImprovement().
 
Area indicator - which let you know where your UHV targets are - is coded in cpp? It seems like not coded in python.

Well in fact, I cannot figure out how this bunch of codes and XML text are connected each other and works.

image.png
 
Should work ... have you double checked that you didn't delete a row from the exceptions list so that the ids don't match up?

Yes. I did.
 
Area indicator - which let you know where your UHV targets are - is coded in cpp? It seems like not coded in python.

Well in fact, I cannot figure out how this bunch of codes and XML text are connected each other and works.

Spoiler :
image.png
Okay, you have two different things on your hand here.

The text for the UHV area display doesn't require DLL changes. You can find the text keys for them at the end of CIV4GameText_Victory2.xml. As you see, they all have the format TXT_KEY_UHV_AREA_[id]. The texts are assigned in Python\EntryPoints\CvScreensInterface.py, by the method getUHVTileInfo(). You have to make sure to return the id of the text key you want to have displayed.

The text keys you've found there are from the UHV progress screen. They are used by the getUHVHelp() method in Victory.py. You should be able to use the same code as for the UHV itself here, just follow the existing examples.

Yes. I did.
I'm out of ideas then, sorry. The exceptions definitely work because I've just played around with them when I made all these core changes.
 
What's your question? I haven't tried it.
 
Leoreth, this guy (Fierabras) did modification to the CNM and able to add the special character easily. I can't understand what he's doing but probably you can :)
Perhaps with this way we will actually see Tōkyō and Kyōto soon in the game haha

His result is in the attachment, using the vanilla version of CityNameManager.py

This one haha. Just realized that there's really no question mark there -_- *facepalm*

well.. my question is.. if Fierabras' method of adding special character can be applied to DoC's CNM, can we have Tōkyō and Kyōto in-game in lieu of Toukyou and Kyouto respectively?
but since you've said you haven't tried it yet then okay I'll wait haha
 
I suggest you try it yourself, I can really only answer questions about DoC here.
 
Spoiler :
Civ4_Screen_Shot1092.jpg


Do you have any ideas about why this happens? When I open the victory condition window, it shows only first UHV condition and list ends there.

I cannot sure whether it related with getUHVHelp codes, but here's my code.

Code:
elif iPlayer == iAustralia:
 	if iGoal == 0:
  		iWA = self.getNumCitiesInArea(iAustralia, con.tWATL, con.WABR)
  		iNT = self.getNumCitiesInArea(iAustralia, con.tNTTL, con.tNTBR)
  		iSA = self.getNumCitiesInArea(iAustralia, tSATL, tSABR)
  		iQld = self.getNumCitiesInArea(iAustralia, tQldTL, tQldBR)
  		iNSW = self.getNumCitiesInArea(iAustralia, tNSWTL, tNSWBR)
  		aHelp.append(self.getIcon(iWA >= 3) + localText.getText("TXT_KEY_VICTORY_AUSTRALIA_CONTROL_WA", (iWA, 3)) + ' ' + self.getIcon(iNT >= 1) + localText.getText("TXT_KEY_VICTORY_AUSTRALIA_CONTROL_NT", (iNT, 1)) + ' ' + self.getIcon(iSA >= 1) + localText.getText("TXT_KEY_VICTORY_AUSTRALIA_CONTROL_SA", (iSA, 1)))
  		aHelp.append(self.getIcon(iQld >= 2) + localText.getText("TXT_KEY_VICTORY_AUSTRALIA_CONTROL_Qld", (iQld, 2)))
  		aHelp.append(self.getIcon(iNSW >= 2) + localText.getText("TXT_KEY_VICTORY_AUSTRALIA_CONTROL_NSW", (iNSW, 2)))
			
 	elif iGoal == 1:
  		iAirport = self.getNumBuildings(iAustralia, con.iAirport)
  		iImmigration = self.getNumBuildings(iAustralia, con.iAustralianImmigrationOffice)
  		aHelp.append(self.getIcon(iAirport >= 7) + localText.getText("TXT_KEY_VICTORY_NUM_AIRPORTS", (iAirport, 6)) + ' ' + self.getIcon(iImmigration >= 7) + localText.getText("TXT_KEY_VICTORY_NUM_IMMIGRATION", (iImmigration, 6)))

 	elif iGoal == 2:
  		iForestPreserves = self.countImprovements(iAustralia, con.iForestPreserve)
  		aHelp.append(self.getIcon(iForestPreserves >= 25) + localText.getText("TXT_KEY_VICTORY_NUM_IMPROVEMENTS", (gc.getImprovementInfo(con.iForestPreserve).getText(), iForestPreserves, 25)))
 
Two things:
- use [code][/code] to quote code, that preserves the formatting and uses a monospace font which makes it easier to read
- I'm pretty sure you're getting an exception that isn't displayed because the display is turned off. The bug reports thread explains how to enable exceptions. (It's actually pretty amazing that you've come this far without ever encountering one.)
 
Cities I would found in Australia: Melbourne or Adelaide, Canberra or Sydney, Brisbane, Perth, maybe Darwin, something on the northwestern coast to grab the resources there. Maybe something on Tasmania to grab the whale. Makes 5-7.

A cities goal isn't that interesting anyway because it is already implied by the building goal. I liked the suggestion that was related to unit gifting actually.
 
Spoiler :
Civ4_Screen_Shot1089.jpg

This was my intention, as current UP makes Australia available to build preserves on desert. Eastern city locations can be altered anyway.


I didn't solved the UHV problem yet, and I'm trying to make a playable one first. I'll keep change and try to make them better, and I think these process will become much faster after once I finished whole required works - which I couldn't make all yet.
 
Did you get an exception?

By the way I would suggest Sydney as the starting plot and capital.
 
I got some, but they were related with Event manager and Dynamic civ names.


I am planning general overhaul, especially make them born in 1788 and change starting plot to Sydney. I think that will be much better when 1.12v is published and we can use independence born mechanism there.

Yes but now, I'm concentrating on publishing 0.1v which starts in 1900 AD.
 
I got the same errors. You can solve the dynamic names error by adding the peoples name and default name in dynamiccivs.py. Just add an entry for australia and the errors are gone. (You don't even need to add the TXT_KEY in the xml to make it work, although that isn't much effort)

I don't remember exactly what the eventmanager error was and how I solved it. Can you post a screenshot of that error?
 
Back
Top Bottom