UGO
Civilization Fanatics' Center  

Welcome to Civilization Fanatics' Center.

You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support.

Go Back   Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - General Discussions

Notices

Reply
 
Thread Tools
Old Oct 05, 2007, 02:53 PM   #1
Bhruic
Emperor
 
Join Date: Nov 2005
Posts: 1,410
Unofficial BTS 3.13 patch

Similar to Solver's patch for 3.02, this patch modifies the CvGameCoreDLL.dll file. As with his version, it's best to make a backup of the dll before overwriting it. The source code for the changes is included (multiple files with a .cpp extension). These are only necessary if you will be making your own revisions to the code. Otherwise, you can either delete or ignore them.

I've added a "versioning" system so people can figure out if they have the latest.

Changelog:
  • Fixed bug where culture/espionage would not display for building popups
  • Fixed bug where spies would be ejected from a square when declaring war
  • Fixed bug that caused the AI to trade for resources it already had (appears as grossly uneven trades)
  • Refixed trade bug
  • Refixed culture/espionage display bug
  • Fixed bug with Warlords attaching to units when the Great General is part of a selection group
  • Prevented new Colonies from overwriting previously existing Civs
  • No longer displays new Colony message if player hasn't met Master Civ
  • Workers on Transports no longer perform capture of cities (thereby displacing all other units) when city is captured
  • Units considered "unsuitable" for city defense will no longer be prevented from healing in cities
  • No longer able to base an unlimited number of air units in vassal's cities
  • Can found Corporations under Mercantilism
  • Vassal's spies will no longer be "caught" in your territory
  • Amount of time worked taken into consideration by city plot selection (thanks SevenSpirits)
  • The Vassal of a Capitulating Civ is freed before peace treaty
  • Mouse-over for Worker actively working a plot no longer counts Worker twice
  • Automated Workers will no longer idle when railroading is possible
  • Mouse-over for Join City now displays extra bonuses for Great People
  • Vassals freed by Capitulating Master no longer refuse to talk
  • Privateers can only enter team members' or vassals' cities
  • Automated Workers will no longer idle in cities within 2 squares of a hostile border
  • Refixed Vassal/capitulation
  • AIs less likely to build Executives if they can't afford to use them or already have sufficient
  • Buildings that grant both heathiness and unhealthiness will display both instead of neither in building popups
  • Vassals can no longer be their Master's worst enemy
  • Espionage ratio for humans now displayed in score tooltip (thanks morbus)
  • Improved worker threat assessment from units able to move multiple squares
  • Spies no longer interrupt their mission when moving next to an enemy unit
  • Fixed AI turn slowdown caused by change to worker threat assessment
  • Relationship penalty for declaring war on a friend checks if Civs are at war
  • Altered previous worker threat assessment check so it's less useful, but more efficient
  • Fixed bug (introduced) causing endless loop at "waiting for players"
  • Fixed bug (introduced) causing the Great Persons civilopedia entries to be blank
  • Stolen techs can no longer be traded with No Tech Brokering enabled
  • New Colonies mirror their Master's tech status with No Tech Brokering enabled
  • New Colonies mirror their Master's exploration (map) status
  • Healthy/Unhealthy bonuses will display properly under more circumstances (events, etc)
  • Extended spy ejection protection to Great Spies (and any other unit considered "always invisible")
  • AI Civs under Theocracy will no longer accept gifted Missionaries
  • Units withdrawing from combat will be removed from selection group (thanks Moctezuma)
  • When bumping naval units from cities, preference will be given to water tiles
  • Tweaks/bugfixes to improve starting city locations (thanks SevenSpirits)
  • Cities no longer require a Monument to allow Spies to sabotage buildings
  • Rivers added for starting locations will generate flood plains if they pass through desert tiles
  • Spy unit help popup will display the percentage espionage cost decrease from fortification

v1.21
http://forums.civfanatics.com/downlo...o=file&id=7288

I'm also including a supplementary fix dealing with XML/Python issues. This patch is not necessary to use the dll patch.

Changelog:
  • Reactivated the Glance diplomatic screen
  • Fixed a bug preventing war declarations via Worldbuilder
  • Civilopedia promotions no longer display a unit class if only a subsection of that class can get the promotion
  • Partisans only appear when Civ is running Emancipation

v1.03
http://forums.civfanatics.com/downlo...o=file&id=7301

Bh

Last edited by Bhruic; May 17, 2008 at 03:11 PM.
Bhruic is offline   Reply With Quote
Old Oct 05, 2007, 03:02 PM   #2
LiDDiS
Warlord
 
Join Date: Sep 2007
Location: Canada
Posts: 125
Nice, good thing you're here to patch the patch D:

Last edited by LiDDiS; Oct 07, 2007 at 05:36 PM.
LiDDiS is offline   Reply With Quote
Old Oct 05, 2007, 03:14 PM   #3
Solver
Civ4 beta tester
 
Solver's Avatar
 
Join Date: Mar 2002
Location: Latvia, Riga
Posts: 1,179
Yaaaay now I don't have to do anything!
__________________
Solver, WePlayCiv Co-Administrator

Civilization V Info Center | Guide to event modding in BtS

I can kill you whenever I please... but not today - The Cigarette Smoking Man
Solver is offline   Reply With Quote
Old Oct 05, 2007, 04:49 PM   #4
LiDDiS
Warlord
 
Join Date: Sep 2007
Location: Canada
Posts: 125
Would I be wrong in assuming that whatever is causing the out of sync stuff isn't fixable 'unofficially' and is probably hard-coded? It's nice to see you've fixed pretty much all of the annoyance issues though. Good job!
LiDDiS is offline   Reply With Quote
Old Oct 05, 2007, 04:50 PM   #5
Bhruic
Emperor
 
Join Date: Nov 2005
Posts: 1,410
Updated:
  • Fixed bug that caused the AI to trade for resources it already had (appears as grossly uneven trades)

Bh
Bhruic is offline   Reply With Quote
Old Oct 05, 2007, 04:51 PM   #6
lulu135
Warlord
 
Join Date: Aug 2007
Posts: 135
Cool thanks! One thing tho, could you include the .cpp files in the zip as well?
lulu135 is offline   Reply With Quote
Old Oct 05, 2007, 04:53 PM   #7
Bhruic
Emperor
 
Join Date: Nov 2005
Posts: 1,410
Oops, yes, I meant to do that with this version... I'll make sure to do it for the next one. For now, you can see the changes I've made in posts in the bugs forum.

Bh
Bhruic is offline   Reply With Quote
Old Oct 05, 2007, 04:53 PM   #8
jray
King
 
jray's Avatar
 
Join Date: Jan 2006
Location: North Carolina (USA)
Posts: 917
Woot, Bhruic for president!

How 'bout collecting everything together here (like your fix to restore the Glance tab) and asking a moderator to sticky it?
__________________
jray - purveyor of 2 cents (3 if financial)
Settings: BtS Monarch Marathon 8Civs Hemispheres
jrayUGH Unaltered Gameplay Hodgepodge for Warlords
jray is offline   Reply With Quote
Old Oct 05, 2007, 04:54 PM   #9
Teg_Navanis
King
 
Join Date: Jan 2006
Posts: 737
Quote:
Originally Posted by lulu135 View Post
Cool thanks! One thing tho, could you include the .cpp files in the zip as well?
I second that. It would be nice if I didn't have to choose between an unfixed SDK mod and a fixed vanilla game.
__________________
Unit Statistics Mod - Kill list, damage counter and more. Keep track of your units and find out which one of them is the best!
CivMail - A small e-Mail client for Civ4
Teg_Navanis is offline   Reply With Quote
Old Oct 05, 2007, 05:02 PM   #10
ChickenSalad
Chieftain
 
Join Date: Oct 2006
Posts: 35
Nice job. Guess I can apply the patch now. Thanks!
ChickenSalad is offline   Reply With Quote
Old Oct 05, 2007, 05:11 PM   #11
ChinaBlue
Xenite
 
ChinaBlue's Avatar
 
Join Date: Dec 2006
Posts: 191
Terrific-thanks a lot bhruic
ChinaBlue is offline   Reply With Quote
Old Oct 05, 2007, 05:15 PM   #12
PieceOfMind
Drill IV Defender
 
PieceOfMind's Avatar
 
Join Date: Jan 2006
Posts: 6,402
Wow I'm impressed with how quick this was. I was reading about issues with the patch, went to sleep, woke up, and now they're fixed!

So I guess the trade thing is a confirmed bug?

Thanks for your efforts Bhruic!
__________________
Mods: Advanced Combat Odds, PIG Mod (v0.925 - 25/07/10) NEW, HEX Mod
Civ4 Articles: Unit Healing, FORTS in BtS... Everything there is to know, Optimising the Globe Theatre Draft City, First Strikes, Combat Odds and RNG
CiV,cIV,ciV,CIV,civ . Expressing your sophistication through abbreviation? civ5,civ4,civ3 etc. =
PieceOfMind is offline   Reply With Quote
Old Oct 05, 2007, 05:27 PM   #13
SevenSpirits
Immortal?
 
SevenSpirits's Avatar
 
Join Date: Jul 2007
Posts: 161
Ha! I started playing a game, noticed the resource bug, excitedly realized what the problem was and was about to go fix it myself, but I decided I'd check here first. You fixed it already! Thank you.
SevenSpirits is offline   Reply With Quote
Old Oct 05, 2007, 05:36 PM   #14
.Shane.
Spawn of Satin
 
.Shane.'s Avatar
 
Join Date: May 2005
Location: NorCal
Posts: 7,471
You rock! Thanks for the patches!
.Shane. is offline   Reply With Quote
Old Oct 05, 2007, 05:42 PM   #15
Nor Me
Chieftain
 
Join Date: Feb 2003
Posts: 43
Quote:
Originally Posted by Bhruic View Post
File: CvPlayerAI.cpp
Function: CvPlayerAI::AI_bonusTrade
Line: 6857
Replace:
Code:
	if (isHuman())
With:
Code:
	if (isHuman() && GET_PLAYER(ePlayer).isHuman())
Bh
Isn't there a danger that you won't be able to give the AI resources because the game thinks you don't like them enough?

At least you'd want another
Code:
	if (isHuman())
	{
		return NO_DENIAL;
	}
further down, just before bStrategic = false;, right?
Nor Me is offline   Reply With Quote
Old Oct 05, 2007, 05:43 PM   #16
Underdawg
King
 
Underdawg's Avatar
 
Join Date: Oct 2005
Location: Wet Coast... er... West Coast, CAN
Posts: 672
Just great.
Underdawg is offline   Reply With Quote
Old Oct 05, 2007, 05:44 PM   #17
Powerslave
Prince
 
Powerslave's Avatar
 
Join Date: Jun 2004
Location: Baltimore, MD
Posts: 386
Quote:
Originally Posted by SevenSpirits View Post
Ha! I started playing a game, noticed the resource bug, excitedly realized what the problem was and was about to go fix it myself, but I decided I'd check here first. You fixed it already! Thank you.
Same. I'm glad I didn't have to do anything. Bhruic, you've done us all an amazing service by posting this so quickly.
Powerslave is offline   Reply With Quote
Old Oct 05, 2007, 05:57 PM   #18
Bhruic
Emperor
 
Join Date: Nov 2005
Posts: 1,410
Quote:
Originally Posted by Nor Me View Post
Isn't there a danger that you won't be able to give the AI resources because the game thinks you don't like them enough?
You're absolutely right. Although I think it would be best to rearrange the check order a little as well. I don't think that it'll turn up a "worst enemy" for a human player, but it's best to be sure.

Bh
Bhruic is offline   Reply With Quote
Old Oct 05, 2007, 06:07 PM   #19
SevenSpirits
Immortal?
 
SevenSpirits's Avatar
 
Join Date: Jul 2007
Posts: 161
Quote:
Isn't there a danger that you won't be able to give the AI resources because the game thinks you don't like them enough?
I agree that if that is how you did it, it isn't a perfect fix. It would still allow you to get resources you don't need in the special cases where you are at war or they are your vassal. That seems like an unintentional loophole.

I think the correct, if inelegant, way to fix the problem is this:

Replace:

Spoiler:
Code:
	
	if (isHuman())
	{
		return NO_DENIAL;
	}

	if (GET_TEAM(getTeam()).isVassal(GET_PLAYER(ePlayer).getTeam()))
	{
		return NO_DENIAL;
	}

	if (atWar(getTeam(), GET_PLAYER(ePlayer).getTeam()))
	{
		return NO_DENIAL;
	}

	if (GET_PLAYER(ePlayer).getTeam() == getTeam())
	{
		return NO_DENIAL;
	}

	if (GET_TEAM(getTeam()).AI_getWorstEnemy() == GET_PLAYER(ePlayer).getTeam())
	{
		return DENIAL_WORST_ENEMY;
	}

	if (!isHuman() && (AI_corporationBonusVal(eBonus) > 0))
	{
		return DENIAL_JOKING;
	}

	if (GET_PLAYER(ePlayer).getNumAvailableBonuses(eBonus) > 0 && GET_PLAYER(ePlayer).AI_corporationBonusVal(eBonus) <= 0)
	{
		return (GET_PLAYER(ePlayer).isHuman() ? DENIAL_JOKING : DENIAL_NO_GAIN);
	}


with

Spoiler:
Code:
		
	if (! (GET_PLAYER(ePlayer).getNumAvailableBonuses(eBonus) > 0 && GET_PLAYER(ePlayer).AI_corporationBonusVal(eBonus) <= 0))
	{
		if (isHuman())
		{
			return NO_DENIAL;
		}

		if (GET_TEAM(getTeam()).isVassal(GET_PLAYER(ePlayer).getTeam()))
		{
			return NO_DENIAL;
		}

		if (atWar(getTeam(), GET_PLAYER(ePlayer).getTeam()))
		{
			return NO_DENIAL;
		}

		if (GET_PLAYER(ePlayer).getTeam() == getTeam())
		{
			return NO_DENIAL;
		}
	}

	if (GET_TEAM(getTeam()).AI_getWorstEnemy() == GET_PLAYER(ePlayer).getTeam())
	{
		return DENIAL_WORST_ENEMY;
	}

	if (!isHuman() && (AI_corporationBonusVal(eBonus) > 0))
	{
		return DENIAL_JOKING;
	}

	if (GET_PLAYER(ePlayer).getNumAvailableBonuses(eBonus) > 0 && GET_PLAYER(ePlayer).AI_corporationBonusVal(eBonus) <= 0)
	{
		return (GET_PLAYER(ePlayer).isHuman() ? DENIAL_JOKING : DENIAL_NO_GAIN);
	}


This completely removes all possibility of returning NO_DENIAL if there is no benefit to the recipient, without changing the order of the different types of denial.

(At least in an unofficial patch, I think it's better to not try to change how the game is "supposed" to work without good reason. If you do not mind giving the "joking/no gain" denial a higher priority than the "worst enemy" one then the easy fix is just to move that test to the top of the list.)

Last edited by SevenSpirits; Oct 05, 2007 at 06:15 PM.
SevenSpirits is offline   Reply With Quote
Old Oct 05, 2007, 06:11 PM   #20
Bhruic
Emperor
 
Join Date: Nov 2005
Posts: 1,410
They actually changed the order of denials from 3.02 -> 3.13. In 3.02, the DENIAL_JOKING : DENIAL_NO_GAIN actually came first. The reason they moved it is because of the Vassal issue. So I don't think putting it first again is a problem.

Anyway, I've made a change that should encompass all the situations properly.

Bh
Bhruic is offline   Reply With Quote
Reply

Bookmarks

Go Back Civilization Fanatics' Forums > CIVILIZATION IV > Civ4 - General Discussions > Unofficial BTS 3.13 patch

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Solver's unofficial BtS 3.17 patch Solver Civ4 - General Discussions 922 Oct 18, 2009 04:35 PM
BTS epic pbem Rho patch 3.13, unofficial patch 1.11 bathsheba666 Civ4 - PBEM Games 7 Jul 02, 2008 09:22 AM
Does this mod work with Unofficial BTS 3.13 patch? Melhisedek Civ4 - BTS Unaltered Gameplay (BUG, BAT and BULL) 3 Nov 13, 2007 06:45 AM
Solver's Unofficial BtS Patch Solver Civ4 - General Discussions 695 Oct 21, 2007 05:31 AM
request for sticky for Bhruic's unofficial 3.13 patch jray Site Feedback 2 Oct 10, 2007 12:32 AM



All times are GMT -6. The time now is 08:22 AM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
This site is copyright © 2000 - 2009, Civilization Fanatics' Center.
Support CFC: Amazon.com | EB Games | Amazon UK | Amazon DE | Amazon CA | Amazon FR