Animal Placement

I tested the Dancing Hoskuld's version and after animal husbandry I build a pasture on cows and then build cows to the next plot. It seems to work fine. One thing that doesn't work are the new descriptions (both builds and improvements). It shows the TXT_KEY.. thing instead of the text.
Also I think I spotted another bug in my code. In canBuild all those isAdjacentPlotGroupConnectedBonus should be isPlotGroupConnectedBonus. Sorry.
 
One thing i have notice in ALL of the one's that you'll use "load mod =" is that i cant get any of them to work, none.

Post your config.ini and I will see if there is something different between mine and yours.

While getting the female missionary mod converted I found a couple of bugs in this one. I have fixed them but not tested yet.
 
"mod=\Rise of Mankind" should be all you need to add onto the command line of your RoM short-cut.
 
Sorry that should have been the config\init.xml file that I requested. I was posting three other things at the same time - bad idea!

I knew what you meant. (This isnt the one I used for AnimalPlacement but its all the same just that one entry is all.

Spoiler :
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
	Main BUG Mod Initialization

	This file initializes the BUG Core and all mods.

	Copyright (c) 2008 The BUG Mod.
-->
<bug>
	
	<!-- BUG Core -->
	
	<load mod="BUG Config"/>
	<load mod="BUG Core"/>
	
	
	<!-- Civilization Core -->
	
	<!-- Domestic and Military Advisors and Civilopedia are chosen by options -->
	<init module="CvScreensInterface"/>
	
	
	<!-- Utility Modules -->
	
	<init module="FontUtil" immediate="True"/>
	<symbol id="war" from="COMMERCE_GOLD" offset="25"/>
	<symbol id="peace"/>
	<symbol id="space"/>  <!-- blank symbol the same size as other standard symbols -->
	<symbol id="militaryinstructor" name="MILITARY_INSTRUCTOR"/>
	<symbol id="land" name="DOMAIN_LAND"/>
	<symbol id="sea" name="DOMAIN_SEA"/>
	<symbol id="air" name="DOMAIN_AIR"/>
	<symbol id="sentry" name="ORDER_SENTRY"/>
	<symbol id="fortify" name="ORDER_FORTIFY"/>
	<symbol id="wait" name="ORDER_WAIT"/>
	<symbol id="upgrade"/>
	<symbol id="cancel"/>
	<symbol id="ss casing" from="HAPPY" offset="-25"/>
	<symbol id="ss cockpit"/>
	<symbol id="ss docking bay"/>
	<symbol id="ss engine"/>
	<symbol id="ss life support"/>
	<symbol id="ss stasis chamber"/>
	<symbol id="ss thruster"/>
	<symbol id="citizen" from="POWER" offset="1"/>
	<symbol id="greatgeneral" name="GREAT_GENERAL"/>
	
	<init module="AttitudeUtil">
		<!-- Furious, Annoyed, Cautious, Pleased, Friendly -->
		<arg name="colors" type="tuple">
			"COLOR_RED", 
			"COLOR_CYAN", 
			"COLOR_CLEAR", 
			"COLOR_GREEN", 
			"COLOR_YELLOW"
		</arg>
		<!-- Non-memory attitude modifier keys -->
		<arg name="modifiers" type="tuple">
			"TXT_KEY_MISC_ATTITUDE_LAND_TARGET",
			"TXT_KEY_MISC_ATTITUDE_WAR",
			"TXT_KEY_MISC_ATTITUDE_PEACE",
			"TXT_KEY_MISC_ATTITUDE_SAME_RELIGION",
			"TXT_KEY_MISC_ATTITUDE_DIFFERENT_RELIGION",
			"TXT_KEY_MISC_ATTITUDE_BONUS_TRADE",
			"TXT_KEY_MISC_ATTITUDE_OPEN_BORDERS",
			"TXT_KEY_MISC_ATTITUDE_DEFENSIVE_PACT",
			"TXT_KEY_MISC_ATTITUDE_RIVAL_DEFENSIVE_PACT",
			"TXT_KEY_MISC_ATTITUDE_RIVAL_VASSAL",
			"TXT_KEY_MISC_ATTITUDE_SHARE_WAR",
			"TXT_KEY_MISC_ATTITUDE_FAVORITE_CIVIC",
			"TXT_KEY_MISC_ATTITUDE_TRADE",
			"TXT_KEY_MISC_ATTITUDE_RIVAL_TRADE",
			"TXT_KEY_MISC_ATTITUDE_FREEDOM",
			"TXT_KEY_MISC_ATTITUDE_EXTRA_GOOD",
			"TXT_KEY_MISC_ATTITUDE_EXTRA_BAD"
		</arg>
	</init>
	<event type="LanguageChanged" module="AttitudeUtil" function="initModifiers"/>
	<symbol id="furious" name="ATTITUDE_FURIOUS" from="POWER" offset="4"/>
	<symbol id="annoyed" name="ATTITUDE_ANNOYED"/>
	<symbol id="cautious" name="ATTITUDE_CAUTIOUS"/>
	<symbol id="pleased" name="ATTITUDE_PLEASED"/>
	<symbol id="friendly" name="ATTITUDE_FRIENDLY"/>
	
	<init module="ColorUtil">
		<!--
			You can safely modify this list to change the color dropdown menus
			for color options. You can change the text displayed in the menus by
			adding translations for your new colors to Colors_CIV4GameText.xml
			in the XML/Text directory. 
		-->
		<arg name="colors" type="tuple">
			"COLOR_RED",
			"COLOR_YELLOW",
			"COLOR_CYAN",
			"COLOR_GREEN",
			"COLOR_BLUE",
			"COLOR_MAGENTA",
			"COLOR_WHITE",
			"COLOR_LIGHT_GREY",
			"COLOR_GREY",
			"COLOR_DARK_GREY",
			"COLOR_BLACK"
		</arg>
	</init>
	<event type="LanguageChanged" module="ColorUtil" function="createColors"/>
	
	<events module="DealUtil" function="addEvents"/>
	<events module="DiplomacyUtil" function="addEvents"/>
	<extend how="after" module="DiplomacyUtil" function="handleAIComment" to="CvDiplomacyInterface" as="beginDiplomacy"/>
	<extend how="after" module="DiplomacyUtil" function="handleUserResponse" to="CvDiplomacyInterface" as="handleUserResponse"/>

	<!-- Rise of Mankind -->
	<events module="WarPrizes">	</events>
	<events module="ScreenResolutionSize">	</events>
	<events module="CvWaterAnimalsModEventManager">	</events>
	<events module="NukeAfterEffects">	</events>
	<events module="WarriorsOfGod">	</events>
	<events module="SubdueAnimals">	</events>
	<events module="CaptureSlaves">	</events>
	<events module="Espionage">	</events>
	<events module="Militia">	</events>
	<events module="CvEnhancedTechConquestEventManager">
	</events>
	<!-- Rise of Mankind end -->
	<init module="GGUtil"/>
	<init module="GPUtil"/>
	<init module="ReligionUtil"/>
	<init module="TechUtil"/>
	<init module="TradeUtil"/>
	<init module="TraitUtil"/>
	<init module="UnitUtil"/>
    <gameutils module="WidgetUtil" handler="getWidgetHelp"/>
    
	<event type="OnLoad" module="CvTechChooser" function="resetTechPrefs"/>
	<event type="GameStart" module="CvTechChooser" function="resetTechPrefs"/>
	
	
	<!-- Mods -->
	
	<load mod="BUG Main Interface"/>
	<load mod="BUG City Screen"/>
	<load mod="BUG Advisors"/>
	
	<load mod="Customizable Domestic Advisor"/>
	<load mod="Better Espionage"/>
	<load mod="All Eras Dawn of Man Screen"/>
	<load mod="TechWindow"/>
	
	<load mod="Not Just Another Game Clock"/>
	<load mod="Advanced Scoreboard"/>
	<load mod="Plot List Enhancements"/>
	
	<load mod="Autolog"/>
	<load mod="Reminder"/>  <!-- requires Autolog -->
	<load mod="Civ4lerts"/>
	<load mod="MoreCiv4lerts"/>
	<load mod="Unit Naming"/>
	<load mod="FavoriteCivicDetector"/>
	<load mod="EventSigns"/>
	<load mod="Strategy Overlay"/>
	<load mod="StatusDump"/>
	<load mod="MovieMod"/>
  
<!--RevolutionDCM start - mod components -->
	<load mod="RevDCM"/>
	<load mod="Revolution"/>
<!--RevolutionDCM end-->
	<load mod="Abandon City Mod"/>
	
	<!-- BULL -->
	
	<load mod="BULL Core"/>
	<load mod="BULL Actions"/>
	<load mod="BULL City Bar"/>
	<load mod="BULL Misc Hovers"/>
	
	<load mod="AutoSave"/>
	<load mod="MapFinder"/>
	<load mod="Advanced Combat Odds"/>
	
	<!-- BUFFY -->
	
	<load mod="BUFFY"/>

	<load mod="RoMSettings"/>
	<load mod="DiplomacySettings"/>
	<!--<load mod="EnhancedTechConquest"/> -->

	<!-- Options Screen -->
	
	<screen id="BUGFull">
		<tab module="BugGeneralOptionsTab"/>
		<tab module="RevDCMOptionsTab"/>
		<tab module="RoMOptionsTab"/>
		<tab module="ANDDiplomacyTab"/>
		<tab module="BugMapOptionsTab"/>
		<tab module="BugCityScreenOptionsTab"/>
		
		<tab module="BugAdvisorOptionsTab"/>
		
		<tab module="BugAlertsOptionsTab"/>
		<tab module="BugScoreOptionsTab"/>
		<tab module="BugNJAGCOptionsTab"/>
		
		<tab module="BugPleOptionsTab"/>
		<tab module="BugACOOptionsTab"/>
		<tab module="BugUnitNameOptionsTab"/>
		
		<tab module="BugAutologOptionsTab"/>
		
		<tab module="BugSystemOptionsTab"/>
		<tab module="BugCreditsOptionsTab"/>
	</screen>
</bug>
 
:blush:I can't find Animal Placement in that code anywhere?

This is mine. I put the loads at the bottom and I have converted Capture Slaves to this form also.

Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!--
	Main BUG Mod Initialization

	This file initializes the BUG Core and all mods.

	Copyright (c) 2008 The BUG Mod.
-->
<bug>
	
	<!-- BUG Core -->
	
	<load mod="BUG Config"/>
	<load mod="BUG Core"/>
	
	
	<!-- Civilization Core -->
	
	<!-- Domestic and Military Advisors and Civilopedia are chosen by options -->
	<init module="CvScreensInterface"/>
	
	
	<!-- Utility Modules -->
	
	<init module="FontUtil" immediate="True"/>
	<symbol id="war" from="COMMERCE_GOLD" offset="25"/>
	<symbol id="peace"/>
	<symbol id="space"/>  <!-- blank symbol the same size as other standard symbols -->
	<symbol id="militaryinstructor" name="MILITARY_INSTRUCTOR"/>
	<symbol id="land" name="DOMAIN_LAND"/>
	<symbol id="sea" name="DOMAIN_SEA"/>
	<symbol id="air" name="DOMAIN_AIR"/>
	<symbol id="sentry" name="ORDER_SENTRY"/>
	<symbol id="fortify" name="ORDER_FORTIFY"/>
	<symbol id="wait" name="ORDER_WAIT"/>
	<symbol id="upgrade"/>
	<symbol id="cancel"/>
	<symbol id="ss casing" from="HAPPY" offset="-25"/>
	<symbol id="ss cockpit"/>
	<symbol id="ss docking bay"/>
	<symbol id="ss engine"/>
	<symbol id="ss life support"/>
	<symbol id="ss stasis chamber"/>
	<symbol id="ss thruster"/>
	<symbol id="citizen" from="POWER" offset="1"/>
	<symbol id="greatgeneral" name="GREAT_GENERAL"/>
	
	<init module="AttitudeUtil">
		<!-- Furious, Annoyed, Cautious, Pleased, Friendly -->
		<arg name="colors" type="tuple">
			"COLOR_RED", 
			"COLOR_CYAN", 
			"COLOR_CLEAR", 
			"COLOR_GREEN", 
			"COLOR_YELLOW"
		</arg>
		<!-- Non-memory attitude modifier keys -->
		<arg name="modifiers" type="tuple">
			"TXT_KEY_MISC_ATTITUDE_LAND_TARGET",
			"TXT_KEY_MISC_ATTITUDE_WAR",
			"TXT_KEY_MISC_ATTITUDE_PEACE",
			"TXT_KEY_MISC_ATTITUDE_SAME_RELIGION",
			"TXT_KEY_MISC_ATTITUDE_DIFFERENT_RELIGION",
			"TXT_KEY_MISC_ATTITUDE_BONUS_TRADE",
			"TXT_KEY_MISC_ATTITUDE_OPEN_BORDERS",
			"TXT_KEY_MISC_ATTITUDE_DEFENSIVE_PACT",
			"TXT_KEY_MISC_ATTITUDE_RIVAL_DEFENSIVE_PACT",
			"TXT_KEY_MISC_ATTITUDE_RIVAL_VASSAL",
			"TXT_KEY_MISC_ATTITUDE_SHARE_WAR",
			"TXT_KEY_MISC_ATTITUDE_FAVORITE_CIVIC",
			"TXT_KEY_MISC_ATTITUDE_TRADE",
			"TXT_KEY_MISC_ATTITUDE_RIVAL_TRADE",
			"TXT_KEY_MISC_ATTITUDE_FREEDOM",
			"TXT_KEY_MISC_ATTITUDE_EXTRA_GOOD",
			"TXT_KEY_MISC_ATTITUDE_EXTRA_BAD"
		</arg>
	</init>
	<event type="LanguageChanged" module="AttitudeUtil" function="initModifiers"/>
	<symbol id="furious" name="ATTITUDE_FURIOUS" from="POWER" offset="4"/>
	<symbol id="annoyed" name="ATTITUDE_ANNOYED"/>
	<symbol id="cautious" name="ATTITUDE_CAUTIOUS"/>
	<symbol id="pleased" name="ATTITUDE_PLEASED"/>
	<symbol id="friendly" name="ATTITUDE_FRIENDLY"/>
	
	<init module="ColorUtil">
		<!--
			You can safely modify this list to change the color dropdown menus
			for color options. You can change the text displayed in the menus by
			adding translations for your new colors to Colors_CIV4GameText.xml
			in the XML/Text directory. 
		-->
		<arg name="colors" type="tuple">
			"COLOR_RED",
			"COLOR_YELLOW",
			"COLOR_CYAN",
			"COLOR_GREEN",
			"COLOR_BLUE",
			"COLOR_MAGENTA",
			"COLOR_WHITE",
			"COLOR_LIGHT_GREY",
			"COLOR_GREY",
			"COLOR_DARK_GREY",
			"COLOR_BLACK"
		</arg>
	</init>
	<event type="LanguageChanged" module="ColorUtil" function="createColors"/>
	
	<events module="DealUtil" function="addEvents"/>
	<events module="DiplomacyUtil" function="addEvents"/>
	<extend how="after" module="DiplomacyUtil" function="handleAIComment" to="CvDiplomacyInterface" as="beginDiplomacy"/>
	<extend how="after" module="DiplomacyUtil" function="handleUserResponse" to="CvDiplomacyInterface" as="handleUserResponse"/>

	<!-- Rise of Mankind -->
	<events module="WarPrizes">	</events>
	<events module="ScreenResolutionSize">	</events>
	<events module="CvWaterAnimalsModEventManager">	</events>
	<events module="NukeAfterEffects">	</events>
	<events module="SubdueAnimals">	</events>
	<events module="Militia">	</events>
	<events module="CvEnhancedTechConquestEventManager">
	</events>
	<!-- Rise of Mankind end -->
	<init module="GGUtil"/>
	<init module="GPUtil"/>
	<init module="ReligionUtil"/>
	<init module="TechUtil"/>
	<init module="TradeUtil"/>
	<init module="TraitUtil"/>
	<init module="UnitUtil"/>
    <gameutils module="WidgetUtil" handler="getWidgetHelp"/>
    
	<event type="OnLoad" module="CvTechChooser" function="resetTechPrefs"/>
	<event type="GameStart" module="CvTechChooser" function="resetTechPrefs"/>
	
	
	<!-- Mods -->
	
	<load mod="BUG Main Interface"/>
	<load mod="BUG City Screen"/>
	<load mod="BUG Advisors"/>
	
	<load mod="Customizable Domestic Advisor"/>
	<load mod="Better Espionage"/>
	<load mod="All Eras Dawn of Man Screen"/>
	<load mod="TechWindow"/>
	
	<load mod="Not Just Another Game Clock"/>
	<load mod="Advanced Scoreboard"/>
	<load mod="Plot List Enhancements"/>
	
	<load mod="Autolog"/>
	<load mod="Reminder"/>  <!-- requires Autolog -->
	<load mod="Civ4lerts"/>
	<load mod="MoreCiv4lerts"/>
	<load mod="Unit Naming"/>
	<load mod="FavoriteCivicDetector"/>
	<load mod="EventSigns"/>
	<load mod="Strategy Overlay"/>
	<load mod="StatusDump"/>
	<load mod="MovieMod"/>
  
<!--RevolutionDCM start - mod components -->
	<load mod="RevDCM"/>
	<load mod="Revolution"/>
<!--RevolutionDCM end-->
	<load mod="Abandon City Mod"/>
	
	<!-- BULL -->
	
	<load mod="BULL Core"/>
	<load mod="BULL Actions"/>
	<load mod="BULL City Bar"/>
	<load mod="BULL Misc Hovers"/>
	
	<load mod="AutoSave"/>
	<load mod="MapFinder"/>
	<load mod="Advanced Combat Odds"/>
	
	<!-- BUFFY -->
	
	<load mod="BUFFY"/>

	<load mod="RoMSettings"/>
	<load mod="DiplomacySettings"/>
	<!--<load mod="EnhancedTechConquest"/> -->

	<!-- Options Screen -->
	
	<screen id="BUGFull">
		<tab module="BugGeneralOptionsTab"/>
		<tab module="RevDCMOptionsTab"/>
		<tab module="RoMOptionsTab"/>
		<tab module="ANDDiplomacyTab"/>
		<tab module="BugMapOptionsTab"/>
		<tab module="BugCityScreenOptionsTab"/>
		
		<tab module="BugAdvisorOptionsTab"/>
		
		<tab module="BugAlertsOptionsTab"/>
		<tab module="BugScoreOptionsTab"/>
		<tab module="BugNJAGCOptionsTab"/>
		
		<tab module="BugPleOptionsTab"/>
		<tab module="BugACOOptionsTab"/>
		<tab module="BugUnitNameOptionsTab"/>
		
		<tab module="BugAutologOptionsTab"/>
		
		<tab module="BugSystemOptionsTab"/>
		<tab module="BugCreditsOptionsTab"/>
	</screen>

	<load mod="AnimalPlacing" />
	<load mod="Capture Slaves" />
	<load mod="Female Missionaries" />
</bug>
 
This is now working for me.

Installation:-
1. Edit init.xml and add <load mod=AnimalPlacing"/>
2. Edit Assets/XML/PythonCallbackDefines.xml and change USE_CAN_BUILD_CALLBACK tag to 1.

Note. the RoM PythonCallbackDefines is different to the AND one so I did not include the file here.


Edit: Rats it doesn't quite work :(.

Edit 2: It does not work on all terrains (rivers only). Could it be something to do with cart paths instead of roads?
 
Hmm, I can't really say much. For me it's working as it should exept those info texts. :confused:

Are you using it in RoM? If so can you d/l it to a site so i can look at it then?

I am still getting this????:(


On a good note the Captures Slaves works good.:p
 
Actually I'm using using AND too. Do you want me to upload the entire mod or just part of it?

That's good to hear.

I forgot to put the python CallBacks in, thats why it took so long to get back to you sorry, but it didnt help, l still had nothing in the workers area, other than the normal stuff:(


If you have a site that can load it all sure, and that means if you have anything you want tried also, or if you have extra stuff in yours thats ok also, i like all kinds of extra goodies.;)





EDIT: I got it to work, i changed the name of the folder when i tried back to my normal game, then i realized i needed to put back the folder that had AP in it, DUH!!

And my horses are not by any rivers either.


EDIT EDIT: I wonder how Afforess gets the pythoncallback to work without changing it in the MAIN pythoncallback area?
 
That's great! What about your hover texts, do they display correct? (I mean in the build improvement help info text what ever... :lol: :crazyeye:)

No they are still CAPITAL. (Maybe "we" will just have to put in the Description there ourselves in the BuildInfos?

Also i figured out why i was having trouble before also, i have a worker that i went thru on WB and a worker that i built? See the difference? One has the horse (the one i built) and one worker does NOT (the WB one).
 
No they are still CAPITAL. (Maybe "we" will just have to put in the Description there ourselves in the BuildInfos?
I think that way it should work.

Also i figured out why i was having trouble before also, i have a worker that i went thru on WB and a worker that i built? See the difference? One has the horse (the one i built) and one worker does NOT (the WB one).

Could you explain little more? I'm not a native english speaker so I don't get what you mean, sorry.
 
I think that way it should work.



Could you explain little more? I'm not a native english speaker so I don't get what you mean, sorry.

OK, when i first started the game i went into the WorldBuilder (WB) and had two workers that i put in my civ, to see if everything was working correctly, but i also had a worker being built in the city. (I hope this is clearer, i am NOT very good in writing either, my mind wonders to fast, and things dont come out the wat they should sometimes).

EDIT: OK i figured out a way to fix the TXT stuff:

1. Change the modules folder name to: AnimalPlacing
2. Change the Civ4GameText file to this: AnimalPlacing_CIV4GameText

It will work correctly then.
 
You got the texts work?! Awesome!
One minor note, I don't think you should be able to place the bonus if it already exist on the plot. Something like this:
Spoiler :
Code:
	plot = CyMap.plot(iX, iY)
	bonusHorse = gc.getInfoTypeForString("BONUS_HORSE")
	bonusCow = gc.getInfoTypeForString("BONUS_COW")
	bonusDeer = gc.getInfoTypeForString("BONUS_DEER")
	bonusPig = gc.getInfoTypeForString("BONUS_PIG")
	bonusSheep = gc.getInfoTypeForString("BONUS_SHEEP")
	bonusFur = gc.getInfoTypeForString("BONUS_FUR")
	bonusIvory = gc.getInfoTypeForString("BONUS_IVORY")
		
	if iBuild == gc.getInfoTypeForString("BUILD_BONUS_HORSE"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusHorse) and plot.getBonusType() != bonusHorse:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_COW"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusCow) and plot.getBonusType() != bonusCow:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_DEER"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusDeer) and plot.getBonusType() != bonusDeer:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_PIG"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusPig) and plot.getBonusType() != bonusPig:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_SHEEP"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusSheep) and plot.getBonusType() != bonusSheep:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_FUR"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusFur) and plot.getBonusType() != bonusFur:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_IVORY"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusIvory) and plot.getBonusType() != bonusIvory:
			return 1
		else:
			return 0
 
You got the texts work?! Awesome!
One minor note, I don't think you should be able to place the bonus if it already exist on the plot. Something like this:
Spoiler :
Code:
	plot = CyMap.plot(iX, iY)
	bonusHorse = gc.getInfoTypeForString("BONUS_HORSE")
	bonusCow = gc.getInfoTypeForString("BONUS_COW")
	bonusDeer = gc.getInfoTypeForString("BONUS_DEER")
	bonusPig = gc.getInfoTypeForString("BONUS_PIG")
	bonusSheep = gc.getInfoTypeForString("BONUS_SHEEP")
	bonusFur = gc.getInfoTypeForString("BONUS_FUR")
	bonusIvory = gc.getInfoTypeForString("BONUS_IVORY")
		
	if iBuild == gc.getInfoTypeForString("BUILD_BONUS_HORSE"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusHorse) and plot.getBonusType() != bonusHorse:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_COW"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusCow) and plot.getBonusType() != bonusCow:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_DEER"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusDeer) and plot.getBonusType() != bonusDeer:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_PIG"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusPig) and plot.getBonusType() != bonusPig:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_SHEEP"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusSheep) and plot.getBonusType() != bonusSheep:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_FUR"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusFur) and plot.getBonusType() != bonusFur:
			return 1
		else:
			return 0
	elif iBuild == gc.getInfoTypeForString("BUILD_BONUS_IVORY"):
		if plot.isAdjacentPlotGroupConnectedBonus(iPlayer, bonusIvory) and plot.getBonusType() != bonusIvory:
			return 1
		else:
			return 0

Now i completely agree with that. So the code above does just that?
 
Back
Top Bottom