Skip to content

Commit

Permalink
v0.89rc (release candidate in need of a bit more testing):
Browse files Browse the repository at this point in the history
* New game option "Rise & Fall" added, which divides the game into chapters and lets the (single) human player control a different civ in each chapter. See manual. Not tested much yet. The new option replaces "Require Complete Kills", which had already been disabled in previous versions. [advc.700-707]
* Added a customized version of the PerfectMongoose map script (similar to Tectonics). See chapter "PerfectMongoose" in manual. [advc.021]
* When the standard map generator places a group of resources, the order in which the eligible tiles are processed is now randomized, and the placement probability decreases with each resource placed. This makes large clusters of the same resource less likely, especially on map scripts like PerfectMongoose that produce large areas of uniform terrain. [advc.021]
* The game no longer just crashes when an Permanent Alliance is formed. Still hardly tested though; there may be other issues with alliances. UWAI should now be able to handle the elimination of a team member. [advc.104t]
* Some quick UWAI improvements for team games, especially to make the AI more willing to declare war; but it's still very reluctant.
* UWAI tweaks for large games: Reduced impact of preemptive war and catching up as casus belli.
* Corrected UWAI willingness to talk in situations when the AI wants peace, but thinks that the human player wants peace more badly and therefore demands reparations (gold, tech, cities). Previously, the AI would then become willing to talk, but reject all proposals for peace. Also, the AI now agrees to fewer reparations after a while if the human doesn't have enough to give.
* Uninitialized memory bug fixed in K-Mod AI code. Had led to inconsistent PRNG sequences (maybe also OOS errors in multiplayer). Fixed two erroneous (or at least hazardous) uses of random numbers in my own code while searching for the bug, and added log output to my coin flip function (bernoulliSuccess) to make such errors easier to debug in the future. [advc.001n]
* Minor (but embarrassing) bug fixed in change advc.127; may have caused the Unit AI to miss possible attacks.
* Undone a small earlier change to AI found value (settling on top of resources) b/c I had misunderstood something. [advc.031]
* Reduced the trade value that the AI assigns to technologies (multiplier reduced from 150 to 125). This change makes the AI a bit less willing to do things in exchange for tech. [advc.551]
* Diplo penalty for capitulated vassals multiplied by a factor between 0.5 and 1.5 based on the number of cities controlled by the vassal. [advc.130w]
* Fixed an inconsistency in AI trade proposals when one side is in financial trouble and the other isn't. [advc.001l]
* The message about the death of a Great General states the respective owners of the dead unit and the unit who killed it, and indicates the location of the battle on the map. [advc.004u]
* AI attitude cache updated upon signing or canceling Open Borders. [advc.130p]
* The game no longer auto-saves right after loading an initial auto-save, and thus also doesn't delete all other auto-saves. All auto-saves are still cleared when starting a new game from the main menu or regenerating the map. [advc.044]
* Scale of the Dan Quayle screen adjusted; now require a normalized score of at least 100 000 for "Julius Caesar" (previously 15 000). [advc.043]
* Time victory countdown only shown when at most 30 turns remain. (Inspired by RFCEurope.) [advc.004]
* Corrected the color of messages about revolts; red and green had been switched (my bad). [advc.101]
* Repaired text in Global Warming advisor that I had messed up in v0.80 without ever noticing. [advc.137]
* Scoreboard is immediately updated when player changes his/her leader name through Alt+D. [advc.001m]
* The snowy land terrain type is now actually called "Snow" in help text rather than "Ice". [advc.004g]
* Loading screen hints added about Alt+D, Alt+X, Ctrl+Shift+X. [advc.008d]
* Help text for city health says "from Trait" about the bonus from Expansive trait (instead of "from Civilization"). [advc.004]
* Text labels of the sea level options for the Tectonics map script changed to better match the land ratios that the script actually produces. [advc.021a]
* Slight change in game turn sequence: AI Auto Play ends before the player gets to pick a diplo-vote proposal. [advc.127]
* Minor bug fixed in K-Mod code: integer overflow when a large amount of culture is added through WorldBuilder. [advc.001]
* The leading member of a team is now precomputed for performance reasons. This is also relevant in non-team games b/c single-civ teams are still technically teams. Probably no noticeable speedup though. [advc.003b]
* Utility function for rounding now properly inlined. [advc.003]
* Some UWAI logging code skipped when logging is disabled.
  • Loading branch information
f1rpo committed Oct 4, 2017
1 parent fcf9a50 commit e11525d
Show file tree
Hide file tree
Showing 76 changed files with 13,077 additions and 568 deletions.
Binary file modified Assets/CvGameCoreDLL.dll
Binary file not shown.
6 changes: 3 additions & 3 deletions Assets/Python/BUG/TradeUtil.py
Expand Up @@ -116,9 +116,9 @@
DOMESTIC_OVERSEAS_TRADE = 1
FOREIGN_TRADE = 2
FOREIGN_OVERSEAS_TRADE = 3
# advc.003c: XML isn't loaded when this line is executed; the value isn't used
# either, so I'm removing this line (to avoid a failed assertion)
#MAX_TRADE_ROUTES = gc.getMAX_TRADE_ROUTES()
# advc.003c: XML isn't loaded when this line is executed. Commented out b/c
# the value isn't even used.
#MAX_TRADE_ROUTES = gc.getDefineINT("MAX_TRADE_ROUTES")
FRACTIONAL_TRADE = False
TRADE_PROFIT_FUNC = None

Expand Down
Expand Up @@ -20,7 +20,8 @@ def onGameStart(argsList):
# advc.250c: Show DoM also when human starts advanced - actually always
# show DoM on game start, but for ordinary games, CvEventManager.py
# already show it.
if gc.getGame().getGameTurnYear() != START_YEAR or (gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_START) and not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_SPAH)):
# advc.704: RiseFall isn't initialized onGameStart; show the screen from the DLL instead
if (gc.getGame().getGameTurnYear() != START_YEAR or (gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_START) and not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_SPAH))) and not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_RISE_FALL):
if (gc.getGame().getGameTurn() == gc.getGame().getStartTurn()) or (gc.getGame().countNumHumanGameTurnActive() == 0):
for iPlayer in range(gc.getMAX_PLAYERS()):
pPlayer = gc.getPlayer(iPlayer)
Expand Down
20 changes: 18 additions & 2 deletions Assets/Python/Contrib/MoreCiv4lerts.py
Expand Up @@ -28,7 +28,8 @@ def __init__(self, eventManager):
## Init event handlers
# <advc.135b> One instance per player
for iPlayer in range(gc.getMAX_PLAYERS()):
if gc.getPlayer(iPlayer).isHuman():
# advc.706: Not just for humans
if gc.getPlayer(iPlayer).isHuman() or gc.getGame().isOption(GameOptionTypes.GAMEOPTION_RISE_FALL):
MoreCiv4lertsEvent(eventManager, iPlayer)
# <advc.135b>

Expand Down Expand Up @@ -156,20 +157,29 @@ def getCheckForForeignCities(self):

def onBeginActivePlayerTurn(self, argsList):
"Called when the active player can start making their moves."
iGameTurn = argsList[0]
#iGameTurn = argsList[0] # advc.003: Unused
# <advc.706>
if not gc.getPlayer(self.iOwner).isHuman():
pass # </advc.706>
iPlayer = gc.getGame().getActivePlayer()
if iPlayer == self.iOwner: # advc.135b
self.CheckForAlerts(iPlayer, PyPlayer(iPlayer).getTeam(), True)

def OnCityAcquired(self, argsList):
owner, playerType, city, bConquest, bTrade = argsList
# <advc.706>
if not gc.getPlayer(self.iOwner).isHuman():
pass # </advc.706>
iPlayer = city.getOwner()
if (not self.getCheckForDomVictory()): return
if (iPlayer == self.iOwner): # advc.135b
self.CheckForAlerts(iPlayer, PyPlayer(iPlayer).getTeam(), False)

def OnCityBuilt(self, argsList):
city = argsList[0]
# <advc.706>
if not gc.getPlayer(self.iOwner).isHuman():
pass # </advc.706>
iPlayer = city.getOwner()
# advc.135b: All uses replaced with self.iOwner
#iActivePlayer = gc.getGame().getActivePlayer()
Expand Down Expand Up @@ -198,11 +208,17 @@ def OnCityBuilt(self, argsList):
def OnCityRazed(self, argsList):
city, iPlayer = argsList
if (not self.getCheckForDomVictory()): return
# <advc.706>
if not gc.getPlayer(self.iOwner).isHuman():
pass # </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>
iPlayer = city.getOwner()
if (not self.getCheckForDomVictory()): return
if (iPlayer == self.iOwner): # advc.135b
Expand Down

0 comments on commit e11525d

Please sign in to comment.