2.7 Beta5

Tholal

Emperor
Joined
May 19, 2009
Messages
1,676
Installer attached. Not compatible with previous saves!

PATCH NOTES:
  • Fixed a couple of error messages related to BUG stuff
  • Some buildings are now immune to the City Fire event
  • Game interface now shows Turn number rather than BC/AD
  • New civilopedia texts from the Lore Compendium and Bestiary
  • Message shown when roads are pillaged
  • Messages shown when Wonders are captured or destroyed
  • Tolerant civs now use terrain yield from the original owner of the city
  • Info stats screen only shows units/buildings that have been built/destroyed
  • Fixed OOS cause by creating a Puppet State
  • Unit cycling is now interrupted by units that can cast some spells (determined by new XML flag in spellinfos.xml)
  • Fixed error caused by Inquisition completing outside of a city
  • Fixed a crash with Require Complete Kills option.
  • UI: Attitude modifier, free promotion and mutation chance are now displayed in the bonus help and sevopedia

You can browse the repository to see what has changed - https://bitbucket.org/Tholal/more-naval-ai/commits/all
 

Attachments

  • More Naval AI v2.7 Beta5 Patch.zip
    6.5 MB · Views: 407
Thanks Tholal!

I had some trouble sleeping last night, so I went ahead and merged it with my mod, although I'm tired enough now that I'll need to get some sleep before doing some more playtesting.

I noticed that you don't seem to have included the WorldBuilder version 17b patch yet. I'm pretty sure I shared it months ago. Should I made a new version of the files for this patch?


I'm not really familiar with the newly used method of caching things at the start of CustomFunctions.py. What are its advantages? Should I be using it for more things in my modmod?
 
Hi,

we tried to start a multiplayer (2-players) game with evolve as vpn, and it won't start. The host crashes with the first click on the map. After crash the host player wasn't able to reconnect to the game.

We found a log file with this:
21:03:50 DEBUG: BugUtil - extending BugEventManager.preGameStart instead CvAppInterface
21:03:50 DEBUG: BugEventManager - adding event 'PreGameStart'
21:03:50 DEBUG: BugEventManager - adding event 'BeginActivePlayerTurn'
21:03:50 DEBUG: BugEventManager - adding event 'SwitchHotSeatPlayer'
21:03:50 DEBUG: BugEventManager - adding event 'LanguageChanged'
21:03:50 DEBUG: BugEventManager - adding event 'ResolutionChanged'
21:03:50 DEBUG: BugEventManager - adding event 'PythonReloaded'
21:03:50 DEBUG: BugEventManager - adding event 'unitUpgraded'
21:03:50 DEBUG: BugEventManager - adding event 'unitCaptured'
21:03:50 DEBUG: BugEventManager - adding event 'combatWithdrawal'
21:03:50 DEBUG: BugEventManager - adding event 'combatRetreat'
21:03:50 DEBUG: BugEventManager - adding event 'combatLogCollateral'
21:03:50 DEBUG: BugEventManager - adding event 'combatLogFlanking'
21:03:50 DEBUG: BugEventManager - adding event 'playerRevolution'
21:03:50 DEBUG: BugInit - game not fully initialized
PY:OnInit

The last version we had installed before updating to 2.7beta5 was 2.6.
 
Great! Thank you Tholal :)

I'm not really familiar with the newly used method of caching things at the start of CustomFunctions.py. What are its advantages? Should I be using it for more things in my modmod?

It is called lazy initialization. The most important advantage over preparing the data at the beginning of the method that is going to use it is that the data created only once, instead of every time that the method is called. This saves time, specially if the method is called very frequently. If you have a method that is being called a lot and needs to initialize a lot of stuff at the beginning, using this is probably a good idea.

Another advantage of lazy initialization is that the data is never initialized if the method is never used, saving memory and time until the data is actually used. In methods that are not called in all games like this one (CustomFunctions.doCityFire) this saves memory and time until they are actually used.

----

Edit: I was thinking on applying this caching to other parts of the code while I was writing this post so I gave the rest of CustomFunctions and CvSpellInterface a look. The following methods are called very frequently in some games, and they do a lot of getInfoTypeForString calls (which imply a python -> c++ -> python context change whenever they are called). This means a lot of time wasted in them.

CustomFunctions

doHellTerrain
doTurnKhazad
doTurnLuchuirp

CvSpellInterface

postCombatMimic
reqAddToWolfPack
reqArcaneLacuna (Could be reused for spellArcaneLacuna)
reqCrewBuccaneers
reqCrewLongshoremen
reqCrewNormalCrew
reqCrewSkeletonCrew
reqCrownOfBrillance
reqDestroyUndead (Could be reused for spellDestroyUndead)
reqDispelMagic
reqHeal
reqPirateCove
reqRepair (Could be reused for spellRepair)
reqRevelation (Could be reused for spellRevelation)
reqSanctify (Could be reused for spellSanctify)
reqSpring
reqSprint
reqTakeEquipmentBuilding
reqTakeEquipmentPromotion
reqTakeEquipmentUnit
reqTeachSpellcasting
reqVitalize

Although these may be the most serious offenders, there are a ton of getInfoTypeForString calls being done everywhere. I think that I may be able to create a cache for all of the python at once, to store all getInfoTypeForString with lazy initialization without having to change the actual code everywhere. So huge changes would cause a lot of bugs, and make merges with any past, current and future mods a nightmare, while if my solution works all of the code and any mods on top of it would get the optimization for free. I will look into it and post an update when I reach a conclusion.
 
I noticed that you don't seem to have included the WorldBuilder version 17b patch yet. I'm pretty sure I shared it months ago. Should I made a new version of the files for this patch?

Looks like I missed downloading that one. If you want to make a new version, that's great. Otherwise I'll dig up the old post.
 
Here is a Worldbuilder update, bringing Platybuilder version 4.17b in line with MNAIv2.7beta5. There is really not much too it, except for fixing a few xml typos and making AIAutoPlay from worldbuilder work correctly.

There is still a bug which is causing the game to crash when I try to load a WorldBuilder save file made with this version. It have not re-familiarized myself with this code nearly enough yet to figure out how to fix that.




Shortly before merging I ran into a bug with the revolution code. (I had copied the error into a reply in this thread, but then accidentally closed Chrome and lost it after already starting a new game and overwriting PythonErr.py.)

It happened when I agreed to set a city free to form the Hippus. It was the Calabim city of Don'tgonearthe Castle, belonging to Decius. I was playing as Varn of the Malakim but had just formed a permanent alliance with Decius a couple turns earlier and was using the Control Whole Team game option of my modmod. I thought that I was still on the Malakim turn when the option to set the Calabim city free came up, but perhaps I had accidentally ended my turn already and it was just the first thing to happen after switching.

Anyway, the bug prevented a new state from being formed, but did not cause a crash or anything serious.
 

Attachments

  • World Builder 4.17b for MNAI v 2.7Beta5.7z
    1.1 MB · Views: 261
Hi,

while we were trying to reinstall the earlier Patch, we recognized that the origin donwload-link to FFH2 mod links to an error page:
http://forums.civfanatics.com/threads/mod-fall-from-heaven-ii.171398/

There are more Points we were interested in, like special multiplayer startposition conditions (starting as far away as possible from each other, reminding the different map types cylindric, etc.).
There seems to be a bug because of all holy or disciple units allow to cast a new technologie.
Another bug seems to be, that promotions for human players are only allowed to be selected one round later than the AI is allowed. This seems to be unfair, especially if you were defending your city and little doom Stacks knock on your door.

Where to report these features/bugs, the linked lists are from 2015, are they still in use?

Anyway great work, keep on going!

Yours

KingGonzo
 
One more point, if two AI players are in war and want you to join the war, you should get a positive point from party you refused to decare war on. Oherwise both parties will hate you without a chance to solve th problem. :)
 
Been playing a bit with this version, and seems to be more stable at some maps than 2.6.3. However, when opening "Against the Wall" I ran into the following errors while choosing the scenario settings (leader and civ names):

Python exception

Traceback (most recent call last):

File CivScreensInterface, line 741 in handleInput
File CvEspionageAdvisor, line 375 in handleInput
File CvEspionageAdvisor, line 511 in loadScenario
File CvWBDesc line 2590 in applyMap

RuntimeError: unidentifiable C++ exception

(behind the rest of the errors)
Python exception: Can't find enum for type tag None [OK]
 
I assume to install this beta Version, I just need to run the installer linked here (of course on top of v3.19 BTS with base FFH2 with latest patch "o" ;) ) However, both this beta installer (and also latest non-beta installer of the More-Naval-AI-mod) claim, that it necessary to install it "on top of the More-Naval-AI-mod" on the first site of the installation process. Minor, but can be quite confusing :crazyeye:
 
The game freezes when the Hyborem stack attacks my stack.
 

Attachments

  • Arendel Phaedra TURN-0567.CivBeyondSwordSave
    902.9 KB · Views: 244
Top Bottom