Skip to content

Commit

Permalink
More additions to v0.89rc:
Browse files Browse the repository at this point in the history
* Shift+F8 (Quick Load) briefly exits to main menu before loading the savegame. This is much faster than loading directly (though maybe not on all systems).
When exiting to the main menu, the game no longer forgets whether resource bubbles had been enabled. [advc.003d,advc.004m]
* In-game main menu renamed from "Main Menu" to "Game Menu" in help text. (The true "Main Menu" is where you go via "Exit to Main Menu".) [advc.004g]

* Improvements to AI willingness to talk in some specific situations:
** Refuse-to-talk (RTT) duration from embargoes reduced from 30 turns on average to 25. RTT duration after a declaration of war at the request of another civ reduced to 12.5 turns on average (previously 15 turns). [advc.130f]
** Refusal to talk after an embargo and refusal to sign a treaty after cancelation no longer depend on AI attitude. (Previously, as a side-effect of change 130j, the refusal durations were shortened when the other side was Annoyed or Furious and prolonged when Friendly.)
** Memory about recently canceled deals can decay only partially while at war. This means that the AI is never willing to sign Open Borders right after a war ends. [advc.130r]
** When a DoW is triggered through a defensive pact (DP), the AI refuses to talk for 12.5 turns on average. In previous versions, unless UWAI was disabled, there was nothing to prevent one of the DP allies from making peace after a couple of turns. Also, the RTT durations from DP and sponsored war no longer stack with the RTT duration from trade embargoes. [advc.104i]

* No more war-on-friend penalties for attacking a capitulated vassal (only for attacking the master). [advc.130h]
* Upon becoming a vassal, AI civs forget any "arrogant" demands.  (Because I don't want the diplomatic protection from accepting a demand to extend from the vassal to the master.) [advc.130o]
* When a peace treaty gets signed between two civs that already have a peace treaty, the turns-to-cancel on the existing treaty are reset to 10. (In BtS, the signing of the second treaty has no effect.) [advc.032]
* Replaced several instances of "pass" in my v0.89rc Python code with "return" after discovering that "pass" does not cause a function to return. My misconception had led to some unnecessary computations, mostly in Civ4lerts, and a couple of changes to PerfectMongoose had had no effect.

* Rise & Fall:
** Civs close to a victory condition are considered to be ranked higher than those not close to any victory. This is relevant for the computation of the Rise score (which is based on ranks). I've changed this because the ranking on the leader board is not a good measure of a civ's standing during the endgame. I'm using the BBAI victory stages to determine whether a civ is close (stage 3) or very close (stage 4) to victory. The dialog for civ selection now shows when a civ is close to victory.
** Bug fixed that had exempted vassals of previously played civs from AI trade restrictions.
** Bug fixed that had prevented diplomacy between AI civs on the first turn of a chapter.
** Auto Play countdown corrected; had been one turn ahead.
** In v0.89rc, the AI already got to make some decisions on the final turn of a chapter (after the player presses "End Turn"). Now the final turn is entirely under human control.
** Civ4lerts are no longer displayed on the first turn of a chapter.
** Redundant minimized tech choice popups no longer appear on the first turn of a chapter.

* Reduced display duration of Civ4lerts from long to normal. Had already meant to do this in v0.80, but missed one half of the alerts. [advc.106c]
* The message about an unclaimed resource revealed by a new tech is now based on the revealed owner (which can differ from the actual owner) of the resource tile. [advc.004r]
* Changed a few loading screen hints. [advc.008c,advc.008d]
  • Loading branch information
f1rpo committed Oct 13, 2017
1 parent 08e2f89 commit beb230a
Show file tree
Hide file tree
Showing 33 changed files with 517 additions and 174 deletions.
2 changes: 2 additions & 0 deletions Assets/Config/BULL Core.xml
Expand Up @@ -7,6 +7,7 @@
Copyright (c) 2010 The BUG Mod.
-->
<!-- advc.003d: getUserDir added -->
<mod id="BULL"
name="BULL Core"
module="BugDll"
Expand All @@ -19,6 +20,7 @@
<export function="getOptionINT" to="CvAppInterface"/>
<export function="getOptionFLOAT" to="CvAppInterface"/>
<export function="getOptionSTRING" to="CvAppInterface"/>
<export function="getUserDirStr" to="CvAppInterface"/>

<export module="CvModName" function="getNameAndVersion" to="CvAppInterface" as="getModNameAndVersion"/>
</mod>
Binary file modified Assets/CvGameCoreDLL.dll
Binary file not shown.
9 changes: 9 additions & 0 deletions Assets/Python/BUG/BugDll.py
Expand Up @@ -38,6 +38,8 @@
from CvPythonExtensions import *
import BugOptions
import BugUtil
# advc.003d:
import BugPath

gc = CyGlobalContext()

Expand Down Expand Up @@ -182,6 +184,13 @@ def castOptionValue(func, id, default):
except:
return default

# <advc.003d>
def getUserDirStr():
r = BugPath.getUserDir()
if r == None:
return ""
return str(r)
# </advc.003d>

def init():
"""
Expand Down
3 changes: 3 additions & 0 deletions Assets/Python/Contrib/Civ4lerts.py
Expand Up @@ -151,6 +151,9 @@ def addMessage(iPlayer, szString, szIcon, iFlashX=-1, iFlashY=-1, bOffArrow=Fals
Culture: Zoom to City, Ignore
"""
# <advc.706>
if gc.getGame().isRFBlockPopups():
return # </advc.706>
# advc.106c: Reduced time from LONG to normal
eventMessageTimeLong = gc.getDefineINT("EVENT_MESSAGE_TIME")
CyInterface().addMessage(iPlayer, True, eventMessageTimeLong,
Expand Down
16 changes: 10 additions & 6 deletions Assets/Python/Contrib/MoreCiv4lerts.py
Expand Up @@ -54,7 +54,11 @@ def _addMessageAtPlot(self, iPlayer, message, icon, plot, iColor=-1):

def _addMessage(self, iPlayer, szString, szIcon, iFlashX, iFlashY, bOffArrow, bOnArrow, iColor):
#Displays an on-screen message.
eventMessageTimeLong = gc.getDefineINT("EVENT_MESSAGE_TIME_LONG")
# <advc.706>
if gc.getGame().isRFBlockPopups():
return # </advc.706>
# advc.106c: Reduced time from LONG to normal
eventMessageTimeLong = gc.getDefineINT("EVENT_MESSAGE_TIME")
# advc.135b: Ignore iPlayer. Shouldn't be necessary b/c
# the iActivePlayer (on the caller side) should always
# be iOwner. Tbd.: Remove the iPlayer attribute from all
Expand Down Expand Up @@ -160,7 +164,7 @@ def onBeginActivePlayerTurn(self, argsList):
#iGameTurn = argsList[0] # advc.003: Unused
# <advc.706>
if not gc.getPlayer(self.iOwner).isHuman():
pass # </advc.706>
return # </advc.706>
iPlayer = gc.getGame().getActivePlayer()
if iPlayer == self.iOwner: # advc.135b
self.CheckForAlerts(iPlayer, PyPlayer(iPlayer).getTeam(), True)
Expand All @@ -169,7 +173,7 @@ def OnCityAcquired(self, argsList):
owner, playerType, city, bConquest, bTrade = argsList
# <advc.706>
if not gc.getPlayer(self.iOwner).isHuman():
pass # </advc.706>
return # </advc.706>
iPlayer = city.getOwner()
if (not self.getCheckForDomVictory()): return
if (iPlayer == self.iOwner): # advc.135b
Expand All @@ -179,7 +183,7 @@ def OnCityBuilt(self, argsList):
city = argsList[0]
# <advc.706>
if not gc.getPlayer(self.iOwner).isHuman():
pass # </advc.706>
return # </advc.706>
iPlayer = city.getOwner()
# advc.135b: All uses replaced with self.iOwner
#iActivePlayer = gc.getGame().getActivePlayer()
Expand Down Expand Up @@ -210,15 +214,15 @@ def OnCityRazed(self, argsList):
if (not self.getCheckForDomVictory()): return
# <advc.706>
if not gc.getPlayer(self.iOwner).isHuman():
pass # </advc.706>
return # </advc.706>
if (iPlayer == self.iOwner): # advc.135b
self.CheckForAlerts(iPlayer, PyPlayer(iPlayer).getTeam(), False)

def OnCityLost(self, argsList):
city = argsList[0]
# <advc.706>
if not gc.getPlayer(self.iOwner).isHuman():
pass # </advc.706>
return # </advc.706>
iPlayer = city.getOwner()
if (not self.getCheckForDomVictory()): return
if (iPlayer == self.iOwner): # advc.135b
Expand Down
9 changes: 4 additions & 5 deletions Assets/Python/K-Mod/AIAutoPlay.py
Expand Up @@ -143,11 +143,11 @@ def onBeginPlayerTurn( self, argsList ) :

if( game.getAIAutoPlay() == 1 and iPlayer > game.getActivePlayer() and gc.getActivePlayer().isAlive() ) :
# Forces isHuman checks to come through positive for everything after human players turn
# <advc.127> Commented out; pass instead. (The setAIAutoPlay
# <advc.127> Commented out; return instead. (The setAIAutoPlay
# call might be superfluous in any case.)
#self.checkPlayer()
#game.setAIAutoPlay(0)
pass # </advc.127>
return # </advc.127>

elif( self.bSaveAllDeaths ) :
if( game.getAIAutoPlay() == 0 and not gc.getActivePlayer().isAlive() and iPlayer > game.getActivePlayer() ) :
Expand All @@ -165,7 +165,7 @@ def onEndPlayerTurn( self, argsList ) :
#if (iPlayer == gc.getBARBARIAN_PLAYER() and game.getAIAutoPlay() == 1):
turnsLeft = game.getAIAutoPlay()
if turnsLeft > 1:
pass
return
# Find the closest player preceding the disabled human in the turn order
# (normally the barbarians)
disabledHuman = -1
Expand All @@ -174,7 +174,7 @@ def onEndPlayerTurn( self, argsList ) :
disabledHuman = x
break
if disabledHuman == -1:
pass
return
preceding = iPlayer
turnsLeftTarget = 0
m = gc.getMAX_PLAYERS()
Expand All @@ -189,7 +189,6 @@ def onEndPlayerTurn( self, argsList ) :
# </advc.127>
# About to turn off automation
self.checkPlayer() # advc.127: Un-commented this line.
pass

def checkPlayer( self ) :

Expand Down
2 changes: 1 addition & 1 deletion Assets/Python/Screens/CvVictoryScreen.py
Expand Up @@ -323,7 +323,7 @@ def showVotingScreen(self):
# <advc.703> Add info from Members tab
if not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_RISE_FALL):
self.drawTabs()
pass
return
screen.appendTableRow(szTable) # Empty row as separator
self.appendMemberRows(screen, szTable)
# </advc.703>
Expand Down

0 comments on commit beb230a

Please sign in to comment.