Female Missionaries ModComp

Thanks for the link. I'll put that code in my functions.

As promised, here is some of the code that I was talking about. This is still a WIP for BAT, but here is the XML that fixes the naming problem, and the Python for the Sevopedia, and for the BUG Python that creates the units.

Enjoy! :)

View attachment SLFEMBAT.zip
 
Hooray for me, I've finally finished the last female Missionary. :D
Spoiler :



I still had a rather hard time to come up with suitable clothes for her. In the end I've based her on the character of Rebecca from the '52 Ivanhoe movie. She is the daugther of a jewish merchant after all. ;) However, she looks quite medieval because of that, but I guess it should work out. :)
So, now enjoy this fully operational modcomp! :D
 

Attachments

  • FemJewMiss.jpg
    FemJewMiss.jpg
    156.7 KB · Views: 430
Thanks for the link. I'll put that code in my functions.

As promised, here is some of the code that I was talking about. This is still a WIP for BAT, but here is the XML that fixes the naming problem, and the Python for the Sevopedia, and for the BUG Python that creates the units.

Enjoy! :)

View attachment 257020

Thanks for the files. I hope you have used a script to fill the FGP_CIV4GameText.xml, otherwise this must have been a lot of very boring work. :eek: I've seen that you are still missing out on some of the male replacement names in that file and have added them. I've put that file in the attachments. I've also (re)added some other names and removed one, so you should not directly use that file for your mod (Btw I removed Jane Goodall, but only because she is still alive).
I've also tried to use the naming format of yours with my modcomp, but the game still uses the original name for the birth message. :( Did you change more python code than is in the 'Fem GP Mod.py' file for the great people part?
And last but not least: Good work! :goodjob:
 

Attachments

  • FGP_CIV4GameText.zip
    10.7 KB · Views: 208
Thanks for the files. I hope you have used a script to fill the FGP_CIV4GameText.xml, otherwise this must have been a lot of very boring work. :eek:
Boring. Like watching paint dry. :lol:
I've also tried to use the naming format of yours with my modcomp, but the game still uses the original name for the birth message. :( Did you change more python code than is in the 'Fem GP Mod.py' file for the great people part?
It's weird that it doesn't work for you. I haven't changed any other Python code, and I eliminated all of the screen.py files. Remember that to use my Python, you need to have a standard BUG Mod CvEventManager.py file. It can't be modified like yours is in the modcomp.

I just put the finishing touches on some DLL work tonight, to eliminate the "Replaces Great..." unit message, and to prevent the double "Can be built by" message that happens when the mod is used with BUG. The Female units now don't require any 'pedia code, and they show up as a standard unit with the appropriate 'pedia entry. I think I like it that way for BAT, and I'm going to write up a more "female specific" 'pedia entry for the girls.

It's beginning to look wonderful with all of your units in the game. I'm going to add the Female Missionaries tomorrow, and see how that goes. Wish me luck. :)


And last but not least: Good work! :goodjob:
Aw, shucks... :blush:
 
BUG/WoC version updated - Buddhist and Jewish female missionaries added and python updated.

Sorry for the delay, I have not been well.:(
 
BUG/WoC version updated - Buddhist and Jewish female missionaries added and python updated.

Sorry for the delay, I have not been well.:(

As long as you're well now, all's well. ;)
And of course thanks for the great work. :goodjob:
 
Let all be known that from now onwards shadered versions of all missionary units are included in this modcomp! :)
 
Hi, SaibotLieh. I have added two your modular mods in my no-modular HrochMod.
First FemaleUniquePeoples : functional - perfect.
Second Female Misssionaries : here is problem. In many test games I not see female body :(

Have you some experiency how works both modcomps combined?

thanks

HROCHland
 
I have combined them myself before and they work with no problem. You have combined the code of both CvEventManager.py files into one file for your mod, right? The two necessary entries for the modcomps should look like this then:
Spoiler :

Code:
	[COLOR="Lime"][B]def onGreatPersonBorn(self, argsList):[/B][/COLOR]
		'Unit Promoted'
		pUnit, iPlayer, pCity = argsList
		player = PyPlayer(iPlayer)
		if pUnit.isNone() or pCity.isNone():
			return
			
[COLOR="Red"]# Female Great People - saibotlieh - start[/COLOR]

		UnitName = pUnit.getName()
		iUnitType = pUnit.getUnitType()
		UnitInfo = gc.getUnitInfo(iUnitType)
		sUnitType = UnitInfo.getType()
		sFemaleUnitType = 'UNIT_FEMALE'+sUnitType[4:]
		iFemaleUnitType = gc.getInfoTypeForString(sFemaleUnitType)

		if iFemaleUnitType > -1:
			Owner = gc.getPlayer(iPlayer)
			if Owner.isCivic(gc.getInfoTypeForString("CIVIC_EMANCIPATION")):
				iFemaleChance = 50
			else:
				iFemaleChance = 15
				if gc.getInfoTypeForString('BONUS_AMAZONS') > 0:
					iNumAmazonBonuses = pCity.getNumBonuses(gc.getInfoTypeForString('BONUS_AMAZONS'))
					iFemaleChance += iNumAmazonBonuses*15
					if iFemaleChance > 50:
						iFemaleChance = 50
					
			iRnd = CyGame().getSorenRandNum(100, "Female unit")
			if iRnd < iFemaleChance:

				pFemaleUnit = Owner.initUnit(iFemaleUnitType,pUnit.getX(),pUnit.getY(),UnitAITypes.NO_UNITAI,DirectionTypes.DIRECTION_SOUTH)
				pUnit.kill(false,iPlayer)
				UnitName = pFemaleUnit.getName()
	 
[COLOR="Red"]# Female Great People - saibotlieh - end[/COLOR]
			
		if (not self.__LOG_GREATPERSON):
			return
		CvUtil.pyPrint('A %s was born for %s in %s' %(UnitName, player.getCivilizationName(), pCity.getName()))


	[COLOR="Lime"][B]def onUnitBuilt(self, argsList):[/B][/COLOR]
		'Unit Completed'
		city = argsList[0]
		unit = argsList[1]
		player = PyPlayer(city.getOwner())
		iplayer = gc.getPlayer(city.getOwner())
		
[COLOR="Red"]# Female Missionaries - saibotlieh - start[/COLOR]

		
		iUnitType = unit.getUnitType()
		UnitInfo = gc.getUnitInfo(iUnitType)
		if UnitInfo.getDefaultUnitAIType() == gc.getInfoTypeForString('UNITAI_MISSIONARY'):
			sUnitType = UnitInfo.getType()
			sFemaleUnitType = 'UNIT_FEMALE'+sUnitType[4:]
			iFemaleUnitType = gc.getInfoTypeForString(sFemaleUnitType)
		
			if iFemaleUnitType > -1:
				if iplayer.isCivic(gc.getInfoTypeForString('CIVIC_EMANCIPATION')):
					iFemaleChance = 50
				else:
					iFemaleChance = 15
			
				iRnd = CyGame().getSorenRandNum(100, "Female unit")
				if iRnd < iFemaleChance:
					oldunit = unit				
					pFemaleUnit = iplayer.initUnit(iFemaleUnitType,oldunit.getX(),oldunit.getY(),UnitAITypes.NO_UNITAI,DirectionTypes.DIRECTION_SOUTH)
					pFemaleUnit.convert(oldunit)
					if oldunit.getGroup().isAutomated():
						pFemaleUnit.getGroup().setAutomateType(AutomateTypes.AUTOMATE_RELIGION)
					oldunit.kill(false,oldunit.getOwner())
							 
[COLOR="Red"]# Female Missionaries - saibotlieh - end[/COLOR]

		CvAdvisorUtils.unitBuiltFeats(city, unit)
	
		if (not self.__LOG_UNITBUILD):
			return
		CvUtil.pyPrint('%s was finished by Player %d Civilization %s' 
			%(PyInfo.UnitInfo(unit.getUnitType()).getDescription(), player.getID(), player.getCivilizationName()))

Did you try to put the "iFemaleChance" to 100 for testing? Maybe you were just unlucky. If that doesn't do the trick, please post your python code for both events so that I can take a look at it.
 
Hi
Here is my file. Many thanks for error check :) and help general
sorry for my english

BTW your work as I wrote many times over is excellent. I have not succes with change old model to new model over original bones. I´m working with Blender and NifSkope. My work is stational models and point editing by NS :) It is usseles for heads and improvements :(
 
Thanks, I'm always happy to hear that my work is appreciated. Digging thru some tutorials was necessary to learn how to boneswap with Blender. I don't have them at hand at the moment, but I could see if I find them again if you want.

From the first look at your code I would say you miss the definition for the iplayer variable. The Topkapi Palace addition uses the same variable without being defined, does that modcomp work? It's interesting that your code doesn't trigger an python error message. Have you set the "; Set to 1 for no python exception popups" in the Civ4Config to 0? Otherwise these errors will go unnoticed. Btw, even if you have changed that setting at some time, I would check again, because at least my setting got reset from time to time for reasons unknown.

For fixing my part of the code I would suggest to replace everything between the "# Female Missionaries" tags with the respective code I posted before, because your code is not the latest version. Further you should add the line
Code:
		iplayer = gc.getPlayer(city.getOwner())
directly under the
Code:
		player = PyPlayer(city.getOwner())
line, similar to the posted code. This might also fix the possible problem with the Topkapi Palace addition.
 
I edited code and girls now are running across my screen :)

Many thanks. You can see I have python in my mod but my programming is called copypasting :) for now I have functional missionaries, next I will try allow python error message. Now I must look on female bodies in my civilization :)

Thank you very much, SaibotLieh

Hroch
 
I am assuming it is just the art you have changed, is that so? If so I should be able to put up a newer BUG/WoC version quickly.
 
Aye, just the art was changed. Each missionary directory contains now an additonal ..._fx.nif file and in the CIV4ArtDefines_Unit.xml file the necessary <SHADERNIF> entries were added.
 
have you seen this thread?

I changed the unit schema and I tried out the bGraphicalOnly for the units. the result is perfect in my view, the female units do nit appear in the pedia index but do appear as unique units for the religion and have their own page. This means that there is no need for the code screens python which means that I do not have to have four versions (BUG, RoM, Rom/AND and RoM - AND).
 
Okay, all four female units modcomps are updated to the <bGraphicalOnly> solution now, thanks again! :)
 
I merged the BUG/WOC version and I still get the girls showing up in my civilopedia. Talk about an uncivilopedia! I did change the unit schema and add the bgraphical.

Edit: fixed it, the only thing that has to be changed is in SevoPediaMain.py

Code:
	def placeUnits(self):
		newList = self.getUnitList()
		self.list = []
	
# Female Missionaries - saibotlieh - start
		for i in range(newList.__len__()):
			item = newList[i]
			if not (gc.getUnitInfo(item[1]).isGraphicalOnly()):
				self.list.append(item)
# Female Missionaries - saibotlieh - end		
		
		self.placeItems(WidgetTypes.WIDGET_PEDIA_JUMP_TO_UNIT, gc.getUnitInfo)
 
Top Bottom