Assorted U.N. Modding Questions

hehe, Aussie_Lurker, I don't suppose you have any extra time, and an interest in a present day mod? ;-)

Someone with your skills could really help the world 2009 mod get finished faster. Our team members who have an understanding of the SDK are backlogged at the present time.


I apologize for the imposition. If you don't have the time, don't worry about it. Just thought I'd ask.
 
I wish, DVS ;). I don't even have the time to sort out the issues I encountered when I tried porting my mod into BtS. That's why I'm happy to look at merging these mods, but I'm not necessarily promising anything. As long as they merge without incident, then it'll be all good though!

Aussie.
 
I wish, DVS ;). I don't even have the time to sort out the issues I encountered when I tried porting my mod into BtS. That's why I'm happy to look at merging these mods, but I'm not necessarily promising anything. As long as they merge without incident, then it'll be all good though!

Aussie.
 
are you going to add python and sdk modding to it too? I really wanted a UN peacekeeper unit that could go into rival territory and prevent units from moving into its square.

I've got something similar, in UnitClassInfos.xml, UnitInfos.xml and Promotions.xml (or whatever it's called)

1. Make a promotion availiable to nobody called peacemaker with the revoltprotection tag attribute at 100

2. Make a unit called UN Trooper with the BuildingPreq tag as Building_UnitedNations, OnlyDefensive as 1, ExploreRivalTerritory (or whatever that's called) as 1, HiddenNationality as 1 and a Free Promotion of Peacekeeper.

What that means is that he can move into all countries without flying a flag, can open fire only in self-defense and any city he moves into will never revolt.
 
Well, Aussie-Lurker, i may not need the merge:
http://forums.civfanatics.com/showthread.php?t=224038#C2
I tried to place it in my mod, and it loads up right, the GUI is still there, and i enabled CANNOT_TRAIN_UNIT callback in the pythoncallbacks, but to test it, i made one of my civics the only way to produce a unit. After switching to said civic however, i ended turn and got an immediate CTD.
Here's my code, any errors?
Code:
	def cannotTrain(self,argsList):
		pCity = argsList[0]
		eUnit = argsList[1]
		bContinue = argsList[2]
		bTestVisible = argsList[3]
		bIgnoreCost = argsList[4]
		bIgnoreUpgrades = argsList[5]
        ## If The Civ Doesn't Have The Correct Civic Tell the SDK Not To Allow The Player To Train This Unit
		if eUnit == gc.getInfoTypeForString('UNIT_GUNSHIP'):
			if not gc.getPlayer(pCity.getOwner()).isCivic(gc.getInfoTypeForString('CIVIC_ATHEISM')):
					return True
		pPlayer = gc.getPlayer(pCity.getOwner())
		iStateReligion = pPlayer.getStateReligion()
		if not self.isInquisitionConditions(pCity.getOwner()):
			if eUnit == gc.getInfoTypeForString('UNIT_INQUISITOR'):
					return true
		if not pCity.isHasReligion(iStateReligion):
			if eUnit == gc.getInfoTypeForString('UNIT_INQUISITOR'):
					return true
		return False
 
Top Bottom