Ceremonial Rites not giving free culture bldg.

glssr60

Chieftain
Joined
Dec 10, 2008
Messages
26
Just downloaded and installed 9.1.17 beta and after enacting ceremonial rites I built second city and it did not give me the free culture bldg (usually monument). Thanks.
 
Does it give the building at the end of the turn, or not at all?

For v.18 beta I've added an update for the moment the city is created (previously it was only updating at the end of the turn).
 
Not at all in 17. Waited a turn, etc. I had Monastery and Opera House available in the cities, and neither were built.
 
That's very strange. I did a test and the scenario you describe worked, so there are external factors affecting it somehow. In this file:

CiVUP - Civ V Unofficial Patch\Core\CiVUP - Events.lua

Please change the logger level to "DEBUG." Then load a savegame, acquire the policy, and check what messages display in the tuner when you end your turn.
 
How do you load the tuner?
I had the same problem with Ceremonial Rites.
I had bought a monument in C2 and C 4. I had built a monumnet in c 1 and c3.

Try 1 the CR policy build a MONASTERY in cities 2 and 4 and nothing in 1 and 3.
Note that I had not built a temple in any city.

I decided load a save before theology. This time, a temple was built in C1 only.

Several turns later after theology, I tried CR again in another load.
This time no new culture building appeared in any of the 4 cities.

I was playing on prince, quick, with no other mods but yours.

Please guide me on the tuner. I have downloaded the Civ 5 SDK.
 
TU: Event Registration: Error BUILDING_tEMPLE
TU: Event Registration: Error BUILDING_tEMPLE
TU:?Event Registration: Error BUILDING_tEMPLE

INFOADDICT POSTS ALL AROUND.

SocialPolicyPopup: INFO TriggerPolicyAdopted 9 true

Units: Events.ActivePlayerTurnStart triggered: called Check MinesOnTurnStart.

I have little idea how this bug log works. I was running Firaxis live tuner, but don't know how to cut and paste or where to look. Above is the transcription.
Again the problem this game is that NO cultural buildings were built. However, all cities had a monument from both purchases and hammer-building.

I wish you the best. Please refer to us to some training on working with debugging.
 
@gdwitt
Thank you, that's the right information. It appears it tried to give the temple to your 3 cities but did not succeed, which is strange. I'll try and figure out how this could happen. :think:

The puzzling things is if I start a game and test this, everything works in every test I perform.
 
Last night, CR did not give a monument to my fourth city. The other three had mon's and received no temples.
I will try the tuner tonite.
 
Could someone attach a ZIP containing these things?

  • A savegame from before you pick up Ceremonial Rites when it doesn't work.
  • MODS folder
  • ModUserData folder
  • Cache folder
 
I did this, but the file is larger than 10mb so I can't attach it here. If you want to send me a PM, I can e-mail the zip file to you.

I also played past the turn on .94 with the latest patch, and it did give me a monument with ceremonial rights.
 
More analysis of Ceremonial Rites. I played 3 games up to about turn 55.
First time v 9.4 Hiawatha. Nothing was built nothing when pressed CR button.
Second time is attached as a save game and SDK text file.
Pressing CR built a monument in my 2 most undeveloped new cities, but not in my two two older cities.

Finally, I played England more as a test to turn 50.
Cerem Rites created:
C1: Temple! already had monum, lib, gran,stoneworks, wall
C2: nothing, had library wall
c3: nothing, had libr, gran, mon, wall
c4: MONUMENT! had library gran wall
The tuner was very interesting. it appeared that the program was calling policy 9 "legalism" and that thebes and sukothai also could not build culture builds.

TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM

TU - Event Registration: ERROR CheckFreeBuildings Thebes best FLAVOR_CULTURE building: -1

TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
TU - Event Registration: ERROR CheckFreeBuildings Sukhothai best FLAVOR_CULTURE building: -1
UnitsHerdsmen: onImprovementDestroyed(22, 31)
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
TU - Event Registration: ERROR CheckFreeBuildings Thebes best FLAVOR_CULTURE building: -1
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM

TU - Event Registration: ERROR CheckFreeBuildings Sukhothai best FLAVOR_CULTURE building: -1


TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM

TU - Event Registration: ERROR CheckFreeBuildings Thebes best FLAVOR_CULTURE building: -1

TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM

TU - Event Registration: ERROR CheckFreeBuildings Sukhothai best FLAVOR_CULTURE building: -1

Runtime Error: [string "C:\Users\steven\Documents\My Games\Sid Meie..."]:292: attempt to call global 'ProcessStackSizes' (a nil value)

Press CR policy
get:SocialPolicyPopup: INFO TriggerPolicyAdopted 9 true

SocialPolicyPopup: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
SocialPolicyPopup: ERROR CheckFreeBuildings London best FLAVOR_CULTURE building: BUILDING_TEMPLE
SocialPolicyPopup: ERROR CheckFreeBuildings Hastings best FLAVOR_CULTURE building: BUILDING_MONUMENT


NEXT TURN
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM

TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM

TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM

NEXT TURN

TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM

TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM

TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM

I attached what I could. This system would not let me attach the cache files or the moduserdata or the mods that I used.
If you want to try to load my england save,
here are the mods that I used:
NO infoaddict since it was filling up the tuner screen
Enhanced Food and Happiness
EpicSpeedTech
Extra Diplomacy Text v2
Unit Herdsmen v2
Global Unlimited Units per tile v1
Garrison Training
Goody Huts no maps
Scout and Worker Start
Single Unit Graphics
TreeGrowth (doesn't work)
THAL v 9.6
 

Attachments

Thank you for the immensely helpful error report! I'll explain a few parts of it:

Code:
CheckFreeBuildings Sukhothai best FLAVOR_CULTURE building: -1
CheckFreeBuildings returns -1 if there's no building available to give (such as if Thebes built a Monument and doesn't have Philosophy yet). It keeps checking until it can give a building.

Code:
INFO TriggerPolicyAdopted 9 true
CheckFreeBuildings HasPolicy POLICY_LEGALISM
Policy ID #9 has the internal name of Legalism, but the display name of Ceremonial Rites. I change only display names (for compatibility reasons). "True" at the end means it's a policy, and not a policy tree.

Now... all the stuff above makes sense and indicates things are working as they should. This part below has me insanely confused:

Code:
SocialPolicyPopup: ERROR CheckFreeBuildings London best FLAVOR_CULTURE building: BUILDING_TEMPLE
SocialPolicyPopup: ERROR CheckFreeBuildings Hastings best FLAVOR_CULTURE building: BUILDING_MONUMENT
Immediately after this message in the code is "city:SetNumRealBuilding(buildingID, 1)". I don't know how it can display the message, yet not give the building. Could you change one thing?

  1. Do the normal Common Checklist (move all mods but CiVUP-VEM out of the Mods folder, clear cache, and clear moduserdata).
    .
  2. Open this file:
    CiVUP - Civ V Unofficial Patch\Core\CiVUP - Events.lua
    .
  3. Do a Find for this text (it should be in the "CheckFreeBuildings" section):
    city:SetNumRealBuilding(buildingID, 1)
    .
  4. On the next line, add:
    logger:Error("Awarded Building")
    .
  5. Save the file.
  6. Load your game.
  7. Earn the policy.
I'm wondering if it will display "Awarded Building". :think:

I'm really baffled about this problem, and will post in the main Lua forum to see if anyone has a clue what's wrong.
 
This trial was made to confirm that the error originates in Thal's mod v9.6
Attached is the save game which should load only with v9.6
For once, I didn't use my favorite mods.
I waited until had philosophy before pressing Ceremonial Rites.

Below is the tuner turned on two turns before the event.
You notice that two other civs are struggling with errors from the CR policy.
You will also notice that the program is naming policy 9 (CR) "Legalism."

City1 (Paris): had mon + 3buildings given no temple
City 2: had mon plus 3 builings given no temple
city 3: had monument and walls GIVEN TEMPLE
city 4: had 0 GIVEN MONUMENT
city 5: had 0 given nothing with Ceremonial Rites





[ Lua State = Main State ]
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
NotificationPanel: Unknown Notification, Adding generic 130
NotificationPanel: type=0 toolTip=Suleiman has entered the Classical Era! strSummary=Suleiman has entered the Classical Era!
NotificationPanel: Unknown Notification, Adding generic 133
NotificationPanel: type=0 toolTip=A [ICON_CONNECTED] trade route between Orleans and your capital, Paris, has been established! strSummary=[ICON_CONNECTED] Trade route established!
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
CiVUP - Events: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
CiVUP - Events: ERROR CheckFreeBuildings Memphis best FLAVOR_CULTURE building: BUILDING_BURIAL_TOMB
SocialPolicyPopup: INFO TriggerPolicyAdopted 9 true
SocialPolicyPopup: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
SocialPolicyPopup: ERROR CheckFreeBuildings Lyon best FLAVOR_CULTURE building: BUILDING_TEMPLE
SocialPolicyPopup: ERROR CheckFreeBuildings Troyes best FLAVOR_CULTURE building: BUILDING_MONUMENT
 

Attachments

I replayed the scenrio described in the last posting with LUA addition requested by Thal. (logger:Error("Awarded Building")
This time, I earned an monument in my two small cities and temple in Paris.
Lyon received nothing. Last try it got a temple.
It seems that the decision to award a culture building is random and doesn't depend on what's already there as long as your tech tree allows it.
Pretty good if it can be consistent.
What else can i try?
You can see the Tuner log below. I starts 6 turns back to show you that Egypt is struggling with the same policy
SocialPolicyPopup: INFO TriggerPolicyAdopted 4 true
Tutorial: City building complete
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
TU - Event Registration: ERROR CheckFreeBuildings Thebes best FLAVOR_CULTURE building: -1
NotificationPanel: Unknown Notification, Adding generic 131
NotificationPanel: type=0 toolTip=Suleiman has entered the Classical Era! strSummary=Suleiman has entered the Classical Era!
NotificationPanel: Unknown Notification, Adding generic 134
NotificationPanel: type=0 toolTip=A [ICON_CONNECTED] trade route between Orleans and your capital, Paris, has been established! strSummary=[ICON_CONNECTED] Trade route established!

TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
TU - Event Registration: ERROR CheckFreeBuildings Thebes best FLAVOR_CULTURE building: -1
CiVUP - Events: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
CiVUP - Events: ERROR CheckFreeBuildings Thebes best FLAVOR_CULTURE building: -1
CiVUP - Events: ERROR CheckFreeBuildings Memphis best FLAVOR_CULTURE building: BUILDING_BURIAL_TOMB
CiVUP - Events: ERROR Awarded Building
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
TU - Event Registration: ERROR CheckFreeBuildings Thebes best FLAVOR_CULTURE building: -1
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
TU - Event Registration: ERROR CheckFreeBuildings Thebes best FLAVOR_CULTURE building: -1
LeaderHeadRoot: Handling LeaderMessage: 0, The time has come to put down our arms.
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
TU - Event Registration: ERROR CheckFreeBuildings Thebes best FLAVOR_CULTURE building: -1
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
TU - Event Registration: ERROR CheckFreeBuildings Thebes best FLAVOR_CULTURE building: -1
TU - Event Registration: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
TU - Event Registration: ERROR CheckFreeBuildings Thebes best FLAVOR_CULTURE building: -1
NotificationPanel: Unknown Notification, Adding generic 167
NotificationPanel: type=0 toolTip=A [ICON_CONNECTED] trade route between Lyon and your capital, Paris, has been established! strSummary=[ICON_CONNECTED] Trade route established!
LeaderHeadRoot: Handling LeaderMessage: 0, I've heard many stories of your powerful military. The villains of this world would be wise to fear your might.
SocialPolicyPopup: INFO TriggerPolicyAdopted 9 true
SocialPolicyPopup: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
SocialPolicyPopup: ERROR CheckFreeBuildings Paris best FLAVOR_CULTURE building: BUILDING_TEMPLE
SocialPolicyPopup: ERROR Awarded Building
SocialPolicyPopup: ERROR CheckFreeBuildings Lyon best FLAVOR_CULTURE building: BUILDING_TEMPLE
SocialPolicyPopup: ERROR Awarded Building
SocialPolicyPopup: ERROR CheckFreeBuildings Troyes best FLAVOR_CULTURE building: BUILDING_MONUMENT
SocialPolicyPopup: ERROR Awarded Building
 
Thank you, that confirms it's a problem with the vanilla function SetNumRealBuilding. It did not place the building in the city. This is in the game core only Firaxis has access to, so we'll have to figure out what the bug is without actually looking at the code. :undecide:

Spatzimaus brought up one possibility in a thread I started in the Lua forums. In cities like Lyon that should have received a temple, is the temple actually available in the production panel? SetNumRealBuilding silently fails if the city does not have the prerequisite building. I do check city:CanConstruct(buildingID), so perhaps I'm using the wrong parameters for CanConstruct. :think:

I'm starting to think it's a problem with CanConstruct, another vanilla function we don't have direct access to.
 
Spatzimaus brought up a good point in a thread I started in the Lua forums. The algorithm does not check to see if the city in question has the prerequisite building. In cities like Lyon that should have received a temple, did it have a Monument, or nothing at all?

In my current game the cities with monuments built temples, but the one with nothing built a monastery.
 
NEWS!
Playing as India with about 10 mods and tuner.
CR policy gives me only 2 temples in 2 cities out of 4. 2 with monuments got nothing. Yes, they did have temples in the production lists.
SocialPolicyPopup: INFO TriggerPolicyAdopted 9 true
SocialPolicyPopup: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
SocialPolicyPopup: ERROR CheckFreeBuildings Delhi best FLAVOR_CULTURE building: BUILDING_TEMPLE
SocialPolicyPopup: ERROR Awarded Building
SocialPolicyPopup: ERROR CheckFreeBuildings Mumbai best FLAVOR_CULTURE building: BUILDING_TEMPLE
SocialPolicyPopup: ERROR Awarded Building




I noticed that the tuner would checkfreebuildlings every other turn or so.

30 turns later, I had built temples in the one other city. CivUp then decides to build cultural in all 4 cities: 3 monasteries and a temple (see below). It appears that the CR policy built a temple AND a monastery within 30 turns. Now it appears overpowered. I really had little use for the monastery though.

CiVUP - Events: ERROR CheckFreeBuildings HasPolicy POLICY_LEGALISM
CiVUP - Events: ERROR CheckFreeBuildings Delhi best FLAVOR_CULTURE building: BUILDING_MONASTERY
CiVUP - Events: ERROR Awarded Building
CiVUP - Events: ERROR CheckFreeBuildings Mumbai best FLAVOR_CULTURE building: BUILDING_MONASTERY
CiVUP - Events: ERROR Awarded Building
CiVUP - Events: ERROR CheckFreeBuildings Vijayanagara best FLAVOR_CULTURE building: BUILDING_TEMPLE
CiVUP - Events: ERROR Awarded Building
CiVUP - Events: ERROR CheckFreeBuildings Pataliputra best FLAVOR_CULTURE building: BUILDING_MONASTERY
CiVUP - Events: ERROR Awarded Building
 
Back
Top Bottom