Platyping's Python

Hmm i replaced the original river.nif with this new _river.nif but it gives me this error though.
Any idea what else I need to change?
 
Yup, I tried renaming it as river.nif and changed nothing else, that is how i got the error :D
 
Something simple in case someone wondering where I gone :D

Peterhof Palace
Spoiler :
Civ4ScreenShot0011-5.jpg

National Palace

Actually Pillaging is more for Vikings, but I cannot find a Viking Palace, so it becomes this :goodjob:
As for the Russian Palace name, based on the colour of the Palace, I guess this should be the one Hrochland based the art model on. (Seems quite famous anyway :D)

Artwork by Hrochland


Countdown to 200: 12
 
Hmm, I can definitely add a % chance instead of 100% for the XP part.
But is it really alot for 1 XP when pillaging?

The unbalanced part I found out after uploading is the no movement part.
Because you can pillage a town all the way to nothing since you can pillage continuously on the spot...

This part is the one I wanna fix first lol

Edit:
Come to think of it, maybe I should just remove the movement part :D
Because Gate of the Sun which makes farms unpillagable will conflict with it, allowing units to stand on the same spot and keep pillaging forever...

Maybe if I remove the movement part, just the 1 XP alone without % chance is much better?
 
I dont think 1 xp is to much, i think its fine the way it is personally. Maybe you could give a bonus to fast units. Instead of taking the whole units movements, it just takes one, so if it is 2 or more it only looses one (maybe civ does that already, i dont use pillaging a lot)

like what lol?
Post 1604 in my ttt: ma thread :goodjob:
 
All along, pillaging only takes 1 move point, not all move points
 
That's the problem. I also use a little pillaging . With this wonder will my units will use more pillaging and it do very experienced units.
It is uneven.
These units should be experienced by battle. If have some exporience more, may be it not always. It is necessary to balance the game :)
 
Hi,

first of all thank you very much for all these great ideas and your work. I´m really new to modding and I´ve a question about the techtree. I´m adding many of your wonders one by one and I´ve seen, that the boxes in the techtree are only made for 6 Squares of Icons like Buildings, Ressources etc. With your wonders, I´ve some techs with 7 Squares, so that the last one overlaps the edge of the box.

Is there any possibilty to change the dimension of the boxes of the techs? If yes, where?

Thank you for your help und I´m very sorry for my englisch. I hope you understand what I´m looking for.

Alrik
 
Hi, thanks for trying.

I added an extra CvTechChooser file for Gigapack and Megapack to extend the techtree to 7 squares. Didn't include that in standalones
 
CvTechChooser.py

Search for:

PHP:
		self.PIXEL_INCREMENT = 7
		self.BOX_INCREMENT_WIDTH = 48 # Used to be 33 #Should be a multiple of 3...
		self.BOX_INCREMENT_HEIGHT = 9 #Should be a multiple of 3...
		self.BOX_INCREMENT_Y_SPACING = 6 #Should be a multiple of 3...
		self.BOX_INCREMENT_X_SPACING = 9 #Should be a multiple of 3...

As you can see, I have increased the width from 33 to 48 pixels.
 
Platyping, so i gave the codes a go, and i can't seem to get it to work. I set it to display messages as well so I could see where it doesnt work, and no messages played anywere. I wrote this for default bts not my mod

Basically if the map is named 1914, on turn 5 russia and india go to war (if they are both there) then 5 turns later, peace
Code:
def onBeginGameTurn(self, argsList):
		'Called at the beginning of the end of each turn'
		iGameTurn = argsList[0]
		pPlayer = gc.getPlayer(iPlayer)
		cPlayer = gc.getPlayer(iPlayer)
		pCity = gc.getCity()
		##start war
		if CyMap().getMapScriptName () =="1914.CivBeyondSwordWBSave":
				if iGameTurn == 5:
					if pPlayer.getCivilizationType() == gc.getInfoTypeForString("CIVILIZATION_RUSSIA"):
						iTeam = pPlayer.getTeam()
						pTeam = gc.getTeam(iTeam)
						if cPlayer.getCivilizationType()== gc.getInfoTypeForString("CIVILIZATION_INDIA"):
							zTeam = cPlayer.getTeam()
							xTeam = gc.getTeam(zTeam)
							pTeam.declareWar(xTeam, true, -1)
						 
		##end war
		##start peace
		if CyMap().getMapScriptName () =="1914.CivBeyondSwordWBSave":
				if iGameTurn == 10:
					if pPlayer.getCivilizationType() == gc.getInfoTypeForString("CIVILIZATION_RUSSIA"):
						if cPlayer.getCivilizationType()== gc.getInfoTypeForString("CIVILIZATION_INDIA"):
							pPlayer.forcePeace(Cplayer)
		##End Peace
 
Thank you very much for your help. Since I use the Better BAT Mod I couldn´t exactly merge and change it, but with your help I knew what I had to look for. Looks great now and btw I´ve added the era colors for the techs.

I´ve discovered a new problem. It seems that the part cannotConstruct in my CvGameUtils.py doesn´t work. For example:

Code:
def cannotConstruct(self,argsList):
	pCity = argsList[0]
	eBuilding = argsList[1]
	bContinue = argsList[2]
	bTestVisible = argsList[3]
	bIgnoreCost = argsList[4]

## Swords of Qadisiyah Start ##
if eBuilding == gc.getInfoTypeForString("BUILDING_SWORDS_OF_QADISIYAH"):
	if CyGame().getProjectCreatedCount(gc.getInfoTypeForString("PROJECT_MANHATTAN_PROJECT")) == 0:
return True
## Swords of Qadisiyah End ##

In my PythonCallbackDefines the point is activated too:
Code:
<Define>
	<DefineName>USE_CANNOT_CONSTRUCT_CALLBACK</DefineName>
	<iDefineIntVal>1</iDefineIntVal>
</Define>

But I can build the Swords of Qadisiyah without Manhattan Project...:confused:

Other wonders like Mesa Verde, Assembly of Experts are the same. I can build them if I´ve the techs which are needed.

Do you have any idea what I´m making wrong?

Thank you for your help!
 
@Alrik
Try them in standalone first without any other mods or BUG.
If they don't work then the fault lies in the wonder codes themselves, then I will see what went wrong.

But if they work in standalone, but not in your mod, my guess is because of BUG. I heard BUG uses its own Cv.GameUtils file, which is why the original file was not called. Not too sure since I don't use BUG.

Cybah seems to have found a way to use the original files together with BUG, perhaps you can ask him for advice.

@dacubz145
Too many errors, did you activate python exceptions?
1) If you are using it in BeginGameTurn, iPlayer is not defined, so you have to define it yourself.
2) pCity = gc.getCity() is definitely wrong as well.
3) pPlayer and cPlayer are the same
4) Indentation looks wrong as well
 
Dacubz:

when making variables those lowercase letters are meant to represent their type.

c doesn't mean anything to a python programmer

iVar = a whole number Var
sVar = string Var
bVar = a Var with value True False
eVar = a Var which represents indexes in civ4
pVar = a pointer to a class
fVar = a floating (decimal) Var

so instead of z and x teams use more descript variables

iAttackingTeam
pAttackingTeam
iDefendingTeam
pDefendingTeam

these are not nessicary but it helps to keep code understandable
 
Dacubz:

when making variables those lowercase letters are meant to represent their type.

c doesn't mean anything to a python programmer

iVar = a whole number Var
sVar = string Var
bVar = a Var with value True False
eVar = a Var which represents indexes in civ4
pVar = a pointer to a class
fVar = a floating (decimal) Var

so instead of z and x teams use more descript variables

iAttackingTeam
pAttackingTeam
iDefendingTeam
pDefendingTeam

these are not nessicary but it helps to keep code understandable

Thanks for that hint, sinceright now im spitballing it between my java skills and the list of methods, beside that i got no idea:lol:
Platyping told me which of his wonder to look at for help so im going to give it another go and see how it goesi
 
@platyping: thx a lot. With your hint I found an old thread about the problem. After a lot of testing I made it!:)

Here is the link for all who want to merge the wonders which are using CvGameUtils into a Mod with BUG:

http://forums.civfanatics.com/showthread.php?t=330233

and some others which helped me with this problem as a beginner in modding

http://forums.civfanatics.com/showthread.php?t=323808

Explains how GameUtils are used in BUG:
http://sourceforge.net/apps/mediawiki/civ4bug/index.php?title=Core_GameUtils

XML-Reference, here especially point 8 <gameutils>
http://sourceforge.net/apps/mediawiki/civ4bug/index.php?title=Core_XML_Reference#.3Cgameutils.3E
 
CvTechChooser, with megapack and gigapack as mentioned
 
Back
Top Bottom