Quick Modding Questions Thread

Hi everyone, I would like to fix this small issue (you can see on attached pic.) in Beyond The Sword, Rise Of Mankind mode.

On the scoreboard (right bottom) when I moving the mouse over the civilization name which I want to contact with , pop-up widget appears (left bottom) and shows both full and short names ('descriptions') of the civs.

As doubling it looks little bit silly for me...

How can I remove one of them?
Actually how can I edit this widget? Where can I find the moddable file for this?

I would appreciate for any help. :)

Thanks
 

Attachments

  • Clipboard02b.jpg
    Clipboard02b.jpg
    100.8 KB · Views: 173
If I were you, first, I would have a look at Python\Screens\CvMainInterface.py. That's the file responsible for the display of the main screen + the city screen.

But if you can't change it there, then it was changed in the dll (probably by the mod itself).

PS: I don't have the mod so it's up to you.
 
Could anyone tell me how to give cities to a certain civilization through python? I want to spawn the Byzantines (using Spawn a Civ) and then give a bunch of the Roman cities to them.
 
How to make foreign borders to change where units spawn in the certain plot or set borders without city?
 
I want to adjust Platy's Pantheon wonder to apply the extra happiness only to the city in which it's built.

I think one or both of these are the relevant sections of the python code; anybody know how to limit it to the city the Pantheon is in?
Code:
	def onTechAcquired(self, argsList):
		'Tech Acquired'
		iTechType, iTeam, iPlayer, bAnnounce = argsList
		# Note that iPlayer may be NULL (-1) and not a refer to a player object
## The Pantheon Start ##
		if iTechType == gc.getBuildingInfo(gc.getInfoTypeForString("BUILDING_PANTHEON")).getObsoleteTech():
			pTeam = gc.getTeam(iTeam)
			if pTeam.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_PANTHEON")) == 1:
				for iPlayerX in range(gc.getMAX_CIV_PLAYERS()):
					pPlayerX = gc.getPlayer(iPlayerX)
					if pPlayerX.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_PANTHEON")) == 1:
						(loopCity, iter) = pPlayerX.firstCity(false)
						while(loopCity):
							for iReligion in range(gc.getNumReligionInfos()):
								if loopCity.isHasReligion(iReligion):
									loopCity.changeExtraHappiness(-1)
							(loopCity, iter) = pPlayerX.nextCity(iter, false)
						break
## The Pantheon End ##
Code:
	def onReligionSpread(self, argsList):
		'Religion Has Spread to a City'
		iReligion, iOwner, pSpreadCity = argsList
		player = PyPlayer(iOwner)
## The Pantheon Start ##
		pPlayer = gc.getPlayer(iOwner)
		if pPlayer.getBuildingClassCount(gc.getInfoTypeForString("BUILDINGCLASS_PANTHEON")) == 1:
			obsoleteTech = gc.getBuildingInfo(gc.getInfoTypeForString("BUILDING_PANTHEON")).getObsoleteTech()
			pTeam = gc.getTeam(pPlayer.getTeam())
			if pTeam.isHasTech(obsoleteTech) == false or obsoleteTech == -1:
				pSpreadCity.changeExtraHappiness(1)
## The Pantheon End ##
 
Why does civilization die if autoplay has been triggered in "def onGameStart"?
Code:
	def onGameStart(self, argsList):
		'Called at the start of the game'
##autoplay
		if (con.pAssyria.isHuman() == 1):
			CyGame().setAIAutoPlay(20)
 
I want to adjust Platy's Pantheon wonder to apply the extra happiness only to the city in which it's built.

I think one or both of these are the relevant sections of the python code; anybody know how to limit it to the city the Pantheon is in?

None of them actually.

onTechAcquired checks if the building has been obsoleted by the tech acquired to cancel its effects.

onReligionSpread adds the effect each time a religion has spread to one of your cities.

onBuildingBuilt is the place to start and the code to change in the first place.

onTechAcquired, onReligionSpread and onCityAcquired should be changed then.

onCityRazed would become useless then since the effect would be cancelled anyway.
 
How hard is it to create a mod? I am asking because I have no programming experience other than in one year of school.

I would like to alter gameplay but not graphics. How much work would it take and how much time spent learning the programming languages?
 
There are 3 'levels' of code in civ modding.

XML:
This is where most of the basic changing happens for things like adding units, buildings, techs, civics, etc. and where you change their stats.

This takes as long as it takes to read a few turtorials on doing specific things.

Python:
This lets you do more things and in differing levels of dificulty, this controls a lot of the HUD and screen interface stuff. Along with being able to do many other things. (look at some of the python based mods/mod components to see what people have been able to do (and sometimes not do) with python.

SDK/C++(I think I can never remember if it is C+ or C++!):
This is the source code of the game, and allows you to do the biggest and baddest things, and affect just about everything in the game. (Mods Like RoM:AND, C2C and the amazing Fallout: Tame The Waste :P Have custom Source Code.)

As for how long it would take you to learn the code, that really depends on how long it takes you to learn coding languages. You could read a few tutorials and start playing around with some things fairly quickly, other things may take a whole lot longer to learn.

It really depends on how big you want your changes to be, and whether or not there are mods/mod components to do what you want. So whether you would just mod mods, or whether you would be coding content from scratch.

If all you want is to make new units, buildings, techs, etc. or change their existing stats, then all of that can be done in the XML and is no more difficult than word processing, once you had read a few tutorials or the modiki to see how it works and what things you need or want to change.
 
debatable, it is 'supposed' to be easier to mod civ 5, or at least they tried to approach it with modding in mind.

I tried modding Civ 5 before and got just about no where with it. That could mean I am rubbish, or I approached Civ 4 when I had more energy, but I found Civ 4 to be more straight forward.

I think part of it with Civ 5 is that it was more complicated to get started, I vaguely remember having a real headache trying to get the files and mod setup and ready to be fiddled with, where as Civ 4 you just make a folder in the mods and then copy the folder/file structure of the bits you want to change and it is game on.

I think some of that comes from the auto-install, auto-find, steam workshop type stuff with Civ 5.

Civ 5 also replaced python with LUA, which is supposed to be a less 'greedy' programming language, so you can do more and maintain performance.

I think the big question is, how deep do you want your changes to be, and which game do you enjoy playing more.

I actually prefer Civ 4. So if they were the same difficulty I would stick with 4.

One thing would be to read a 'how to' tutorial for both civ 4 and 5 on adding a building, and then decide for yourself which sounds easier.

In Civ 4 adding a building and adding a unit are more or less the same task, especially if you are not interested in graphics.

With Civ 5 I don't know.
 
That would be either CyPlot.setCulture(iPlayer, iNewValue) or CyPlot.changeCulture(iPlayer, iChange).

Not sure how the Python API works here but you might need to add additional parameters that affect if cultural control and unit presences should be updated as well.

Also, note that city culture and plot culture are two entirely independent values.
 
Back
Top Bottom