Calling All Dawns Mod Development Thread

Graceheart the Leopard

Resident Amur leopard
Joined
Sep 24, 2007
Messages
3,476
CURRENTLY SEEKING PYTHON/SDK MODDERS. ANY ADDITION TO THE MODDING TEAM IS APPRECIATED. THANK YOU.

Calling All Dawns, named, of course, in honour of Christopher Tin's world music album, is the most recent mod I've been attempting to develop for the last two years or so. I've been trying to remedy various gameplay imbalances and historical inaccuracies that I believe exist in the game. I also plan to add a whole plethora of new civilizations leaders, and concepts to the game, as well, that will also enhance your gameplay.

An incomplete list of changes featuring in Calling All Dawns is below:

Spoiler Techs :

Everything from the Next War mod
Warrior Code (Requires Writing and Bronze Working)
Fermentation (Requires Pottery)


Spoiler Leaders :

Taizong of China (Pro/Org)
Harun al-Rashid of Arabia (Cre/Phi)
Pericles moved to Ind/Phi


Spoiler Civilizations :

The Holy Roman Empire has been removed and is largely been integrated with Germany (which now has the Rathaus and Landsknecht as their UB and UU), while Charlemagne is France's leader.

India's new Unique Building is the Dharamshala (Replaces Inn [see below]; +1 :) with State Religon and can turn 1 Citizen into a Priest)

England's new Unique Building is the Public House, which replaces the Tavern and has +1 :) per 10% :culture:

1 new civilization has been added as of now, the Mughal Empire:
Leader: Akbar (Cre/Chm)
UU: Bombard (Replaces Cannon; 15 :strength:)
UB: Mausoleum (The vanilla Indian UB)


Spoiler Civics :

Government
-Chiefdom
-Monarchy
-Oligarchy
-Republic
-Police State
-Technocracy

Legal
-Tradition
-Theonomy
-Absolutism
-Bureaucracy
-Nationhood
-Democracy

Labour
-Tribalism
-Slavery
-Serfdom
-Caste System
-Emancipation
-Utility Fogs


Spoiler Buildings :

Tavern (Requires Fermentation): +1 :), +1 :) with Wine, Barley, or Rice
Inn (Requires Fermentation and Currency): +1 :) with Wine and +50% Trade Route yield
A.I. Core (Requires Artificial Intelligence): +25% :science:, +2 free specialists
Mind Storage Facility (Requires Mind Uploading): +15% :science:, :culture:, and :gold:, and +50% :gp:


Current Issues:
  • GAMES CANNOT BE SAVED; LOADING A GAME WILL CAUSE IT TO CRASH! This is the error that you get upon the save game crash:
    Code:
    Traceback (most recent call last):
      File "BugEventManager", line 361, in _handleDefaultEvent
      File "RevolutionInit", line 96, in onGameStart
      File "RevolutionInit", line 146, in onGameLoad
      File "BarbarianCiv", line 102, in __init__
      File "SdToolKitCustom", line 292, in sdObjectExists
    AttributeError: 'list' object has no attribute 'has_key'
    Traceback (most recent call last):
      File "BugEventManager", line 361, in _handleDefaultEvent
      File "AIAutoPlay", line 154, in onGameStart
      File "AIAutoPlay", line 159, in onGameLoad
      File "SdToolKitCustom", line 292, in sdObjectExists
    AttributeError: 'list' object has no attribute 'has_key'
  • The Civilopedia entry for Cure for Cancer does not display its effects

Screenshots:

Spoiler :
OX84LTB.jpg


Spoiler :
WnmahEg.jpg


Spoiler :
hvAGfW5.jpg


Spoiler :
wY8FOb4.jpg


Spoiler :
TDL1Ovj.jpg
 
Nothing? :(
 
While I understand the removal of the HRE, and don't really care much about the German UB, I feel that getting rid of the Panzer for Landsknechts is a mistake. While you could argue that having a pike UU is more useful than a tank UU (I would disagree, seeing as Landsknechts are a particularly lackluster UU while Panzers are amazing, even if they come in so late), but terms of representing the German civ the Panzer simply does more justice.

While certainly Germany is more than just the 1870-1945, uber industrial and militaristic society as many like to stereotype it as, to have both the UU and UB come from the medieval era just completely ignores that time period, which was very important not just for Germany but for the world. The concept of lightning warfare and armoured-focused armies is much more influential than just a bunch of mercenaries.

I would therefore suggest you keep the HRE UB in Germany, but reintroduce the Panzer.

EDIT: France already has three leaders, so I'm wondering if you cut one or if 4 will become the new maximum amount of leaders for a civ.
 
Thank you for the advice, Omega, but right now, balance and what civ should get what UU isn't what I'm concerned about. I need to find a way to overcome the save game crash error make this mod playable first. Here's the error what the Log shows upon the savegame crash:

Code:
Traceback (most recent call last):
  File "BugEventManager", line 361, in _handleDefaultEvent
  File "RevolutionInit", line 96, in onGameStart
  File "RevolutionInit", line 146, in onGameLoad
  File "BarbarianCiv", line 102, in __init__
  File "SdToolKitCustom", line 292, in sdObjectExists
AttributeError: 'list' object has no attribute 'has_key'
Traceback (most recent call last):
  File "BugEventManager", line 361, in _handleDefaultEvent
  File "AIAutoPlay", line 154, in onGameStart
  File "AIAutoPlay", line 159, in onGameLoad
  File "SdToolKitCustom", line 292, in sdObjectExists
AttributeError: 'list' object has no attribute 'has_key'
 
Apparently the version of Python used in Civ4 there is, as the error says, no has_key(x) function associated with the object that is trying to use it. At least on the PC side. On the Mac side it might still exist since it uses a slightly older version of Python.

Instead of "foo.has_key(x)" you should try "x in foo". So a line of code like
Code:
if foo.has_key(x):
becomes a line of code like
Code:
if x in foo:
 
I looked at the error before, and wrote my thoughts here (so I believe you are wrong god-emperor, and the 'list', on which has_key is used, should really be a map, and it's read from the script data, so something other than SdToolkitCustom seems to mess the script data up. IIRC the removal of setScriptData(...) occurrences in other merged mods removed the python error, but not the crash on loading.)
 
You are probably right since it does specifically say 'list'. Also, I just checked and the version of Python used by Civ4 does still have the has_key function - it didn't actually get removed until v3, it was just "discouraged" for a few minor versions before that when the "in" way of doing it was added.

So I'm afraid the only way to fix it is to check everything that could affect it. Search all the Python in the mod for anything that uses scritpdata on the object or objects the scriptdata stores its stuff on and either make it use a different object or make it use the SdToolkit instead of what it is doing.

Sadly the error messages are probably not extremely helpful since they are caused by the data they are trying to look at having been corrupted before they got to it, so all you know is that it was already corrupted before they ran. So the data was probably corrupted when the save was made - anything that happens during the save and pre-save Python code is therefore a good place to start checking (things triggered by the OnPreSave and OnSave events which, by default, run the onPreSave and onSaveGame functions in the event handler(s)).
 
Why do you even need to mess with script data for ai autoplay when it can be done with one line of code...

Seriously, does anyone else realise that AI AutoPlay is a feature available in vanilla BTS all along.
What is the purpose of adding a mod comp to do the same thing....
 
Okay, as an experiment, I deleted the entire Python folder and pasted the vanilla Evolution file in the mod in its place. The bug is gone, but I can establish that the save-game crash still happened. From this, I can definitely conclude that it may not be the merged Python mods that's causing it, especially since the Python Error file is empty. :confused:

Here's the last part of the Python Errors 2 log. It may shine some light on what's going on:

Code:
init-ing world builder screen
load_module CvWBPopups
load_module CvCameraControls
load_module CvAdvisorUtils
load_module InputUtil
15:05:29 DEBUG: BugUtil - extending BugEventManager.preGameStart instead CvAppInterface
15:05:29 DEBUG: BugEventManager - adding event 'PreGameStart'
15:05:29 DEBUG: BugEventManager - adding event 'BeginActivePlayerTurn'
15:05:29 DEBUG: BugEventManager - adding event 'SwitchHotSeatPlayer'
15:05:29 DEBUG: BugEventManager - adding event 'LanguageChanged'
15:05:29 DEBUG: BugEventManager - adding event 'ResolutionChanged'
15:05:29 DEBUG: BugEventManager - adding event 'PythonReloaded'
15:05:29 DEBUG: BugEventManager - adding event 'unitUpgraded'
15:05:29 DEBUG: BugEventManager - adding event 'unitCaptured'
15:05:29 DEBUG: BugEventManager - adding event 'combatWithdrawal'
15:05:29 DEBUG: BugEventManager - adding event 'combatRetreat'
15:05:29 DEBUG: BugEventManager - adding event 'combatLogCollateral'
15:05:29 DEBUG: BugEventManager - adding event 'combatLogFlanking'
15:05:29 DEBUG: BugEventManager - adding event 'playerRevolution'
15:05:29 DEBUG: BugInit - game not fully initialized
PY:OnInit
 
Nobody? :(
 
A few thoughts...

The PythonErr2.log file almost never has anything useful in it -it normally ends with that "DEBUG: BugInit - game not fully initialized". It is the PythonErr.log file (no "2") that gets copies of the actual Python errors, and if it is empty then there most likely was no Python error. The PythonDbg.log file is also more interesting that PythonErr2.log, particularly since it continues past where PythonErr2 stops.

How sure are you that the crash is actually due to anything in Python?

Are you just trying the same save each time? It is possible that the save is corrupt so you'll never be able to recover it or get it to load. If you started a new game after reverting the Python and get the crash while trying to load a new save, then there is still a problem and there is a very good chance it is not in the Python.

If it can't load a save it made when using the Python it originally had which matches the DLL in wherever it came from then something has gone dreadfully wrong somewhere along the way. Probably something is not in its original state since I assume that whatever this is based on worked before you did any changes (especially if it was just BtS + BUG, or BULL). Bad art definitions can cause an immediate crash before you actually get into the game, and possibly some other XML, but that probably should always happen, not just when loading a save.

A debug version of whatever DLL you are using could help, particularly if you know anything about debugging a C++ program but even if you don't it could help since it can give more information when things do not match what it expects ("assert" pop-ups that a debug DLL can give are caused by checks it does for just this purpose: it asserts that some statement X is true and if it is not true then you get a message about it failing; this can point out bad art references, for example).

If you can't track down the problem it may be the case that you have to just take what you have and move it out of the mods folder and start over with a fresh copy of what you started with. Test that, just to be sure. Then add one category of stuff at a time, testing after each thing. The XML should go pretty quick: copy over the civics & test, the buildings & test, the units & test, and so on (order can matter since a unit can require a building and if it requires a building you added you had better add the buildings before the units). The last thing is to re-merge Python mod components one at a time (if adding BUG it should be first since it changes the way the rest of the Python is done; if the base mod you started with included BUG, or was BUG, then it is already in there from the start). This is an irritating thing to have to do, but sometimes it is faster than messing with the entire collection of parts and trying to figure out where the problem is. When doing a rebuild if it suddenly stops working you know that the group of stuff you added after the last test is where the problem is. If it takes you a week, or even a month, to rebuild the mod it may well be worth it if it works at the end of it - after all, how long has it been non-functional like this? The good news is that it is much easier to rebuild than it was to build in the first place since most of it is just copying things that you already have.
 
I have good news and bad news: the good news is that it didn't take me weeks or months to do this. The bad new is it's the Next War mod combined with Evolution that's the problem. Also, whenever I try to add in the Next War buildings to Evolution, it gives me a stupid error! :mad:

EDIT: Okay, if nobody minds, would someone else interested in this mod try and merge Evolution with NW? I'm starting to doubt my merging abilities... :sad:
 
Okay, I made a discovery: it's not the merge that's the problem: Evolution itself appears to have an inherent save game crash issue! :mad:
 
Back
Top Bottom